Skip to content

MCP integration

Two ways to let an agent (Claude Code, Codex, Cursor) run reviews. Install the skill if you want the simplest path. Run the MCP server if your host wants a tool protocol instead of shelling out and parsing text.

The skill teaches the agent to call miucr review and read the JSON envelope. Install it once:

Terminal window
curl -fsSL https://cr.miu.sh/skill.md --create-dirs -o ~/.claude/skills/miucr/SKILL.md

For Codex, Cursor, or other agents that read ~/.agents/skills/, use -o ~/.agents/skills/miucr/SKILL.md.

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 the repo you want reviewed, or point the host at that directory.

  • Each tool call uses the review timeout: [review].timeout in config, default 30m. Pass --timeout to miucr mcp to override it.
  • Tool output is capped at 1 MiB. A larger result fails with review.output_too_large.
  • The server needs a provider key in its environment, like the CLI. Set it in the host’s env block (below) or export it before the host launches miucr. See Credentials.

review_run reviews local git changes and returns gated findings anchored to line numbers from the reviewed revision. Pick exactly one mode (staged, from with to, or commit), the same rule as the CLI. Returns { id, findings, stats }. The id is the saved review id.

ArgumentTypeNotes
stagedboolReview staged changes against the index.
fromstringRange mode: base ref. Use with to.
tostringRange mode: target ref. Use with from.
commitstringReview one commit against its parent.
gatestringnone, info, low, medium, high, or critical. Default high.
expandintContext lines above and below each hunk. Default 5, 0 disables.
token_budgetintApproximate token budget. Over budget, context degrades. 0 disables.
instructionstringExtra steer for this review. Fenced, context-only, cannot change the finding schema.

review_get fetches a saved review by id from a prior review_run. Returns { id, repo_dir, mode, head_sha, created_at, findings, stats }.

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

Or a project-scoped .mcp.json:

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

See the Claude Code MCP docs.

Put this in .cursor/mcp.json (project) or ~/.cursor/mcp.json (all projects):

{
"mcpServers": {
"miucr": {
"command": "miucr",
"args": ["mcp"],
"env": { "ANTHROPIC_API_KEY": "..." }
}
}
}

Invoke it from the composer with @miucr review_run {"staged": true}.

Add to ~/.codex/config.toml (global) or .codex/config.toml (project, trusted projects only). Codex supports stdio only.

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

Check with codex mcp list. See the Codex configuration reference.

SymptomFix
Host cannot start the serverUse the full path from which miucr.
No tools appearRestart the host and check its MCP panel.
No findings returnedConfirm the working directory is the repo and the chosen mode has changes.
review.output_too_largeNarrow the review: fewer files or a smaller range.