Docs / Integrations / MCP server
MCP server
kedgeway mcp runs an MCP server over stdio, so an AI assistant such as Claude Code or Cursor can diagnose a repo directly. It exposes five tools.
Tools
| Tool | Input | Returns |
|---|---|---|
diagnose | { path | url, ref?, fixture?, failOn?, format? } | A text summary and the Diagnosis JSON, or a SARIF 2.1.0 log with format: "sarif". |
findings_reference | none | The 18 finding codes with severity, meaning, and what migrate does for them. |
migrate | { path | url, ref?, fixture?, write? } | Summary, including the guide, plus the plan JSON and a unified diff. A dry run unless write: true. |
ecosystem_snapshot | { fixture? } | The ecosystem snapshot: live via Raven unless a fixture is given. |
pr | { path, fixture?, base?, branch?, repo?, dry_run?, refresh_lockfiles?, label?, draft? } | Opens or updates the migration pull request. dry_run: true returns the title and body instead. |
Remote repositories
diagnose and migrate take exactly one of path or url. url is an https or ssh git URL, or owner/repo. ref is a branch or tag and only applies with url. The repository is shallow-cloned into a temporary directory and deleted afterwards. See Remote repositories.
migrate with url is always a dry run. write: true returns an error, even with --allow-write.
Opening a pull request
The pr tool runs the same flow as kedgeway pr: it creates the branch kedgeway/migrate-<major> from the base, applies the manifest edits, commits, force-pushes that branch and creates or updates one pull request. It needs a local checkout with a clean working tree: url is refused with an error.
The pr tool never accepts allow_any_branch: a branch outside kedgeway/ is refused.
Configure your assistant
For Claude Code add this to .mcp.json; for Cursor, to .cursor/mcp.json:
{
"mcpServers": {
"kedgeway": { "command": "kedgeway", "args": ["mcp"] }
}
}Login
diagnose, migrate and ecosystem_snapshot read the path or fixture you give them from the local disk. migrate with write: true edits files there, but only if you started the server with kedgeway mcp --allow-write. Without that flag write: true returns an error and dry runs still work. The tool is annotated as destructive and non-read-only.