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.
Command
Section titled “Command”miucr mcp # stdio MCP server (default transport)miucr mcp --transport stdioThe 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_run
Section titled “review_run”Review local git changes (staged, a range, or a single commit) and return gated findings, anchored to line numbers from the reviewed revision.
| Argument | Type | Notes |
|---|---|---|
staged | bool | Review staged changes against the index. |
from | string | Range mode: base ref (use with to). |
to | string | Range mode: target ref (use with from). |
commit | string | Review a single commit against its parent. |
gate | string | none|info|low|medium|high|critical. Defaults to high. |
expand | int | Context lines above/below each hunk. Defaults to 5; 0 disables. |
token_budget | int | Approximate 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).
review_get
Section titled “review_get”Fetch a persisted review by id, as returned from a prior review_run.
| Argument | Type | Notes |
|---|---|---|
id | string | The review id returned by a prior review_run. |
Returns { id, repo_dir, mode, head_sha, created_at, findings, stats }.
Host setup
Section titled “Host setup”Claude Code
Section titled “Claude Code”Use the CLI:
claude mcp add --transport stdio miucr -- miucr mcp --transport stdioOr 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 = 10tool_timeout_sec = 120
[mcp_servers.miucr.env]ANTHROPIC_API_KEY = "..."Reference: OpenAI Codex configuration reference.
Troubleshooting
Section titled “Troubleshooting”- 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).