migrationpilot — Claude Code MCP server
A local MCP server checks PostgreSQL migrations before DDL runs and gives an agent a pass/fail decision.
claude mcp add migrationpilot -- npx -y migrationpilotWhat migrationpilot does
migrationpilot performs local, deterministic analysis of PostgreSQL migration files. It uses PostgreSQL’s parser and evaluates 112 rules, reporting violations, risk scoring, and lock details. Its main MCP tool, check_before_apply, lets an agent gate a DDL change before writing or running it.
The server exposes seven tools, including analyze_migration for a single migration. It resolves .migrationpilotrc.yml in the same way as the CLI, so the agent’s result matches the CI check. That makes it suitable for a pre-merge migration gate.
Node 22 or newer is required. The PostgreSQL parser is bundled, and the server requires no account.
What it helps with
- check a PostgreSQL migration before applying DDL
- spot dangerous locks in ALTER TABLE statements
- block an agent before a critical schema change
- align agent checks with the CI result
Example prompts for the agent
- Check
migration.sqlbefore applying it and explain every violation. - Run the migration gate before this DDL and stop when the verdict is fail.
- Analyze this migration and report the lock type for each statement.
How to install migrationpilot
Platform CLI
claude mcp add migrationpilot -- npx -y migrationpilotPlatform CLI
codex mcp add migrationpilot -- npx -y migrationpilotConfig file
{
"mcpServers": {
"migrationpilot": {
"command": "npx",
"args": [
"-y",
"migrationpilot"
]
}
}
}Config file
{
"servers": {
"migrationpilot": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"migrationpilot"
]
}
}
}Platform CLI
gemini mcp add migrationpilot npx -y migrationpilotStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about migrationpilot
How do I install migrationpilot in Claude Code?
Run claude mcp add migrationpilot -- npx -y migrationpilot.
What does migrationpilot do?
It analyzes PostgreSQL migrations against 112 rules and returns violations, risk information, and a pass/fail decision before DDL execution.
What does migrationpilot require?
It requires Node 22 or newer. The PostgreSQL parser is included in the server build.