Skip to content

MCP integration

miucr mcp exposes the review engine to MCP clients over standard input/output, so a coding agent (Claude Code, Codex, …) can run reviews as a first-class tool instead of shelling out and parsing text.

Terminal window
miucr mcp # stdio MCP server (default transport)
miucr mcp --transport stdio

The server reviews the repository in its current working directory, so launch it from (or point the host at) the repo you want reviewed.

The global --timeout flag applies to each call. Tool outputs are byte-bounded (default 1 MiB); an oversized result fails with review.output_too_large rather than flooding the host.

Review local git changes (staged, a range, or a single commit) and return gated findings, anchored to line numbers from the reviewed revision.

ArgumentTypeNotes
stagedboolReview staged changes against the index.
fromstringRange mode: base ref (use with to).
tostringRange mode: target ref (use with from).
commitstringReview a single commit against its parent.
gatestringnone|info|low|medium|high|critical. Defaults to high.
expandintContext lines above/below each hunk. Defaults to 5; 0 disables.
token_budgetintApproximate token budget; over budget degrades context. 0 disables.

Select exactly one mode (staged, from+to, or commit) — the same validation as the CLI. Returns { id, findings, stats }; id is the persisted review id (use it with review_get).

Fetch a persisted review by id, as returned from a prior review_run.

ArgumentTypeNotes
idstringThe review id returned by a prior review_run.

Returns { id, repo_dir, mode, head_sha, created_at, findings, stats }.

Use the CLI:

Terminal window
claude mcp add --transport stdio miucr -- miucr mcp --transport stdio

Or add a project-scoped .mcp.json:

{
"mcpServers": {
"miucr": {
"type": "stdio",
"command": "miucr",
"args": ["mcp", "--transport", "stdio"],
"env": { "ANTHROPIC_API_KEY": "..." }
}
}
}

Reference: Claude Code MCP documentation.

Codex reads MCP server entries from ~/.codex/config.toml under mcp_servers.<id>:

[mcp_servers.miucr]
command = "miucr"
args = ["mcp", "--transport", "stdio"]
startup_timeout_sec = 10
tool_timeout_sec = 120
[mcp_servers.miucr.env]
ANTHROPIC_API_KEY = "..."

Reference: OpenAI Codex configuration reference.

  • If the host cannot start the server, use a full path from which miucr.
  • If no tools appear, restart the host and check its MCP panel.
  • If a review returns no findings, confirm the server’s working directory is the repo and that the selected mode actually has changes.
  • If output fails with review.output_too_large, narrow the review (fewer files, a smaller range).