MCP Migration Advisor
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Migration Advisor Analyze this migration for risks: ALTER TABLE users DROP COLUMN email;"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Migration Advisor
MCP server for database migration risk analysis. Detects dangerous schema changes before they hit production.
Why This Tool?
Database migration failures cause outages. This tool analyzes your Flyway and Liquibase migrations before they run — detecting destructive operations, lock risks, and data loss patterns.
Unlike MigrationPilot (PG-only, raw SQL analysis), this tool parses Liquibase XML and YAML changelogs natively — extracting changeSets, detecting conflicts between changeSet IDs, and validating rollback completeness. It works across database types, not just PostgreSQL.
Related MCP server: DBM MCP Server
Features
Lock Risk Analysis: Detects DDL operations that acquire heavy table locks (ACCESS EXCLUSIVE, SHARE locks)
Data Loss Detection: Finds column drops, type changes that truncate, TRUNCATE/DELETE without WHERE
Risk Scoring: Calculates 0-100 risk score based on severity of detected issues
Flyway Support: Parses V__*.sql and R__*.sql migration filenames
Liquibase Support: Parses XML and YAML changelogs with changeSet extraction
Conflict Detection: Identifies duplicate changeSet IDs and ordering issues
Rollback Validation: Checks rollback completeness for each changeSet
Actionable Recommendations: Every risk includes a specific safe alternative
Pro Tier
Generate exportable diagnostic reports (HTML + PDF) with a Pro license key.
Full JVM thread dump analysis report with actionable recommendations
PDF export for sharing with your team
Priority support
$9.00/month — Get Pro License
Pro license key activates the generate_report MCP tool in mcp-jvm-diagnostics.
Installation
npx mcp-migration-advisorOr install globally:
npm install -g mcp-migration-advisorClaude Desktop Configuration
Add to ~/.claude/claude_desktop_config.json:
{
"mcpServers": {
"migration-advisor": {
"command": "npx",
"args": ["-y", "mcp-migration-advisor"]
}
}
}Quick Demo
Try these prompts in Claude:
"Analyze this migration for risks: ALTER TABLE users DROP COLUMN email;" — Returns risk score (0-100), lock risks, data loss warnings, and safe alternatives
"Generate a rollback for this migration: CREATE TABLE orders (...); CREATE INDEX idx_orders_user ON orders(user_id);" — Produces reverse DDL in correct order
"Score this Liquibase changelog: [paste XML]" — Parses changeSets and calculates overall risk
Tools
analyze_migration
Full analysis of a SQL migration file. Returns lock risks, data loss analysis, and recommendations.
Parameters:
filename— Migration filename (e.g.,V2__add_user_email.sql)sql— The SQL content
analyze_liquibase
Full analysis of a Liquibase XML changelog. Parses changeSets and applies the same lock risk and data loss analysis.
Parameters:
xml— The Liquibase XML changelog content
analyze_liquibase_yaml
Full analysis of a Liquibase YAML changelog. Parses changeSets from YAML format and applies the same lock risk and data loss analysis. Supports all standard change types: createTable, dropTable, addColumn, dropColumn, modifyDataType, createIndex, renameTable, renameColumn, and more.
Parameters:
yaml— The Liquibase YAML changelog content
score_risk
Quick risk score (0-100) with verdict (LOW/MODERATE/HIGH RISK).
Parameters:
filename— Migration filenamesql— The SQL content
generate_rollback
Generate reverse DDL to undo a SQL migration. Produces rollback SQL with warnings for irreversible operations.
Parameters:
filename— Migration filenamesql— The SQL content
Reverses automatically:
CREATE TABLE → DROP TABLE
ADD COLUMN → ALTER TABLE ... DROP COLUMN
CREATE INDEX → DROP INDEX (preserves CONCURRENTLY)
ADD CONSTRAINT → DROP CONSTRAINT
SET NOT NULL → DROP NOT NULL
RENAME → reverse RENAME
Warns on irreversible:
DROP TABLE, DROP COLUMN (data loss)
Column type changes (original type unknown)
DROP INDEX, DROP CONSTRAINT (original definition unknown)
Includes Flyway schema_history cleanup statement.
detect_conflicts
Detect conflicts between two SQL migration files. Identifies same-table modifications, same-column changes, lock contention risks, and drop dependencies that could cause failures if applied concurrently or in the wrong order.
Parameters:
filename_a— First migration filename (e.g.,V3__add_email.sql)sql_a— SQL content of the first migrationfilename_b— Second migration filename (e.g.,V4__modify_users.sql)sql_b— SQL content of the second migration
Detects:
Same column conflicts (CRITICAL) — both migrations modify the same column on the same table
Drop dependencies (CRITICAL) — one migration drops a table the other modifies, causing order-dependent failures
Lock contention (WARNING) — both migrations require exclusive locks on the same table, risking lock wait timeouts
Returns a conflict report with severity levels, affected tables/columns, and whether the migrations can safely run concurrently.
What It Detects
Pattern | Severity | Why It's Dangerous |
NOT NULL without DEFAULT | CRITICAL | Full table rewrite with ACCESS EXCLUSIVE lock |
Column type change | CRITICAL | Table rewrite, data truncation risk |
CREATE INDEX (not CONCURRENTLY) | HIGH | SHARE lock blocks all writes |
DROP TABLE CASCADE | CRITICAL | Drops all dependent objects |
DROP COLUMN | HIGH | Irreversible data loss |
SET NOT NULL | HIGH | Full table scan with lock |
FOREIGN KEY constraint | MEDIUM | Locks both tables for validation |
TRUNCATE / DELETE without WHERE | CERTAIN data loss | All rows permanently deleted |
Limitations & Known Issues
Static analysis only: Analyzes SQL text without database connectivity. Cannot check actual table sizes, row counts, or existing schema to calibrate risk.
PostgreSQL-focused: Lock risk recommendations are primarily for PostgreSQL. MySQL and SQLite lock behaviors differ and may not be fully covered.
Complex DDL: Stored procedures, triggers, and dynamic SQL within migrations are classified as "OTHER" and receive generic risk assessment.
Liquibase support: Handles standard XML and YAML changesets. JSON Liquibase format and custom change types are not supported.
Rollback limitations: Auto-generated rollbacks cannot reverse DROP TABLE, DROP COLUMN, or type changes (data is lost). These produce warnings instead of rollback SQL.
Multi-statement transactions: The parser splits on semicolons. Statements containing semicolons inside strings or dollar-quoted blocks may be split incorrectly.
No execution: The advisor analyzes but never executes migrations. All recommendations are advisory.
Database-specific DDL: Parser targets PostgreSQL/MySQL DDL syntax. Oracle PL/SQL or SQL Server T-SQL may not be fully recognized.
Part of the MCP Java Backend Suite
mcp-db-analyzer — PostgreSQL/MySQL/SQLite schema analysis
mcp-spring-boot-actuator — Spring Boot health, metrics, and bean analysis
mcp-jvm-diagnostics — Thread dump and GC log analysis
mcp-redis-diagnostics — Redis memory, slowlog, and client diagnostics
License
MIT
End-of-life: 2026-05-10.
This MCP server is no longer maintained or distributed. The Corporation
has pivoted to Apify marketplace actors. See
irrationalways on Apify and
irrcorp/bzp-poland-tenders for current Corporation work.
The npm package has been unpublished. The repository is archived for historical reference only.
Available Tools
6 toolsanalyze_liquibaseA
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 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.
Inputs: xml (required).
analyze_liquibase_yamlA
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.
Inputs: yaml (required).
analyze_migrationA
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.
Inputs: sql (required), filename (required).
detect_conflictsA
Detect structural conflicts between two SQL migration files — same-table modifications, same-column changes, lock contention, and drop dependencies. Use this when two migrations touch the same schema objects and you need to know if ordering or concurrent execution matters. Note: only structural conflicts are detected (same table/column); semantic conflicts such as two migrations adding different indexes on the same column are not reported.
Inputs: sql_a (required), sql_b (required), filename_a (required), filename_b (required).
generate_rollbackA
Generate reverse DDL to undo a SQL migration. Produces rollback SQL with warnings for irreversible operations (DROP TABLE, DROP COLUMN, type changes). Includes Flyway schema_history cleanup.
Inputs: sql (required), filename (required).
score_riskA
Calculate the combined risk score (0-100) for a SQL migration. Aggregates both lock risk severity (ACCESS EXCLUSIVE, SHARE locks) and data loss potential (DROP, TRUNCATE, type changes) into a single score. Useful for CI gates and automated migration review pipelines.
Inputs: sql (required), filename (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a distinct purpose: analyze different input formats, score risk, generate rollback, and detect conflicts. No two tools overlap in functionality.
All tool names follow a consistent snake_case pattern with clear verb_noun structure (e.g., analyze_migration, generate_rollback), making them predictable for an agent.
With 6 tools, the server is well-scoped for a migration advisor. Each tool covers a necessary aspect without redundancy or excess.
The tools cover analysis, scoring, rollback generation, and conflict detection for SQL and Liquibase formats. A minor gap is the lack of a tool for overall migration order validation or automatic fixing, but the core advisory workflow is complete.
Maintenance
Related MCP Connectors
Detects database migration table locks, terraform cost leaks, and OWASP API flaws.
Review your AI agent's database changes on your schema, with plain-language risk, before they run.
Scans schema metadata to classify PHI, score HIPAA readiness, and generate compliant migrations.
Database change control: schemas, change scripts, approvals, rollback, drift and audit
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables safe database migration workflows by detecting frameworks, reviewing migration risk and drift, generating migration files with explicit approval, and providing rollback guidance—without ever applying migrations or executing rollbacks.712 npm1MIT
- AlicenseNot gradedqualityCmaintenanceEnables developers and coding agents to submit structured database schema changes to a shared coordinator, compare them against accepted migration history and other active work, and receive reports on safe changes, stale bases, dependencies, and conflicts before migrations are finalized. It supports CI-controlled deployment coordination without exposing application database credentials.Apache 2.0
- AlicenseBqualityCmaintenanceEnables AI coding assistants to analyze DDL migration scripts before execution, flagging table-locking, destructive, and backward-incompatible changes, estimating lock duration and risk, and inspecting schema diffs through MCP tools.4MIT
- AlicenseNot gradedqualityCmaintenanceEnables assessing database change risk, estimating impact, generating rollback plans, prechecking change windows, and orchestrating dry-run, canary, apply, and rollback with approval gates and auditable state transitions.MIT