MCP server for database migration risk analysis — Flyway and Liquibase XML/YAML/SQL support with lock detection and conflict analysis
Server provides 6 well-intentioned tools for database migration analysis with detailed descriptions (avg 180+ chars) and clear use cases. However, critical gaps exist: (1) parameter descriptions are present but lack format/constraint details (e.g., 'filename' and 'sql' lack guidance on expected formats, line limits, or encoding); (2) output schemas are completely undocumented, callers cannot see what fields to expect from analyze_migration, score_risk, or detect_conflicts; (3) error handling is minimal (generic try-catch with no recovery guidance); (4) no tool annotations (readOnlyHint present in metadata but not declared in schema). Tool names are clear and action-oriented (analyze_*, score_*, generate_*, detect_*), following verb_noun convention. Composition is sound, each tool has one responsibility. But lack of output schema documentation and sparse parameter constraints significantly limit LLM usability.
Analyze a Liquibase XML changelog for lock risks, data loss potential, and unsafe patterns. Supports all major change types: createTable, dropTable, addColumn, dropColumn, modifyDataType, addNotNullConstraint, createIndex, dropIndex, addForeignKeyConstraint, dropForeignKeyConstraint, renameTable, renameColumn. Inline <sql> changeSets are also analyzed for TRUNCATE, DELETE without WHERE, and UPDATE without WHERE. Returns lock risk severity (ACCESS EXCLUSIVE, SHARE locks) and data loss risk per operation.
Analyze a Liquibase YAML changelog for lock risks, data loss potential, and unsafe patterns. Supports all major change types: createTable, dropTable, addColumn, dropColumn, modifyDataType, addNotNullConstraint, createIndex, dropIndex, addForeignKeyConstraint, dropForeignKeyConstraint, renameTable, renameColumn. Inline sql changeSets are also analyzed for TRUNCATE, DELETE without WHERE, and UPDATE without WHERE. Returns lock risk severity (ACCESS EXCLUSIVE, SHARE locks) and data loss risk per operation.
Analyze a SQL migration file for lock risks, data loss potential, and unsafe patterns. Detects: ACCESS EXCLUSIVE locks (DROP TABLE, ADD COLUMN NOT NULL, type changes, CREATE INDEX without CONCURRENTLY), data loss operations (TRUNCATE, DELETE without WHERE, UPDATE without WHERE, DROP COLUMN), and cascade risks. Supports Flyway versioned (V__*.sql) and repeatable (R__*.sql) migrations, as well as plain SQL files.
Detect conflicts between two migration files. Identifies: same table modifications, same column modifications, lock contention (both require exclusive locks on same table), and drop dependencies (one drops a table the other modifies). Returns conflict severity (CRITICAL, WARNING, INFO) and whether migrations can run concurrently.
Output schemas completely undocumented. Tools return markdown text but LLMs cannot parse structured fields (lock severity, risk score, conflict type, etc.). Callers must infer output format from examples.
Parameter descriptions lack format constraints. 'sql' and 'xml'/'yaml' parameters do not specify encoding, max size, or expected structure. 'filename' lacks guidance on naming conventions (Flyway vs Liquibase format).
Error handling is generic. Catch-all try-catch returns raw error messages with no recovery guidance. LLMs cannot determine if error is retryable, user-fixable, or fatal.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 58 | 2026-07-28+ | v2 |
Generate reverse DDL to undo a migration. Handles: CREATE TABLE → DROP TABLE, ADD COLUMN → DROP COLUMN, CREATE INDEX → DROP INDEX, ADD CONSTRAINT → DROP CONSTRAINT, RENAME → reverse RENAME. Warns on irreversible operations (DROP TABLE, DROP COLUMN, type changes) that require manual intervention or backup restoration.
Calculate overall risk score (0-100) for a migration based on lock risks and data loss potential. Returns a numeric risk score with severity classification (LOW RISK, MODERATE RISK, HIGH RISK).
Tool annotations declared in metadata (Risk: READ_ONLY) but not in schema. MCP spec requires readOnlyHint in tool definition for proper client-side enforcement.
score_risk description is vague ('Calculate overall risk score') compared to analyze_* tools. Does not explain when to call score_risk vs using risk score embedded in analyze_migration output.