mcp-as-a-judge — Claude Code MCP server: plan and code review gates
A validation layer between your coding assistant and the model: plans, diffs and tests get judged before a task can close.
claude mcp add mcp-as-a-judge -- uvx mcp-as-a-judgeWhat mcp-as-a-judge does
The server turns a coding task into a sequence of checkpoints. The assistant registers it with set_coding_task, submits the plan to judge_coding_plan, the changes to judge_code_change, the tests to judge_testing_implementation, and the final gate is judge_coding_task_completion. When requirements are vague, raise_missing_requirements asks you for the missing details; raise_obstacle brings trade-offs and blockers to a human decision.
Everything rests on MCP sampling and elicitation, so client support decides whether it works at all. In Claude and Cursor that support is partial and LLM_API_KEY is mandatory — without a key the server cannot judge a plan or a diff. GitHub Copilot in VS Code is listed with full support and needs no key. Docker Desktop or Python 3.13+ is required to run it.
Each judgement is a separate model call, not a lint pass inside the IDE. Existing rules and agents still apply; the judge adds approval gates on top of them. The README suggests large-context models, 1M tokens and up, for better analysis — a weak model makes the verdicts shallow.
What it helps with
- review a plan before the agent starts editing files
- catch security gaps and thin tests in a diff
- force library reuse instead of hand-rolled replacements
- surface open questions when requirements are unclear
- block task completion until code and tests pass
Example prompts for the agent
- Register the task with
set_coding_taskand send the plan to the judge - Run
judge_code_changeon the current diff and list the risks - Call
raise_missing_requirementsand ask me for the missing details
How to install mcp-as-a-judge
Platform CLI
claude mcp add mcp-as-a-judge -- uvx mcp-as-a-judgeuvx runs the command named after the package; if the README names another one, use uvx --from mcp-as-a-judge <command>
Platform CLI
codex mcp add mcp-as-a-judge -- uvx mcp-as-a-judgeuvx runs the command named after the package; if the README names another one, use uvx --from mcp-as-a-judge <command>
Config file
{
"mcpServers": {
"mcp-as-a-judge": {
"command": "uvx",
"args": [
"mcp-as-a-judge"
]
}
}
}uvx runs the command named after the package; if the README names another one, use uvx --from mcp-as-a-judge <command>
Config file
{
"servers": {
"mcp-as-a-judge": {
"type": "stdio",
"command": "uvx",
"args": [
"mcp-as-a-judge"
]
}
}
}uvx runs the command named after the package; if the README names another one, use uvx --from mcp-as-a-judge <command>
Platform CLI
gemini mcp add mcp-as-a-judge uvx mcp-as-a-judgeuvx runs the command named after the package; if the README names another one, use uvx --from mcp-as-a-judge <command>
Step 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 mcp-as-a-judge
How do I install mcp-as-a-judge in Claude Code?
Run claude mcp add mcp-as-a-judge -- uvx mcp-as-a-judge. Then set LLM_API_KEY for the server, because Claude lacks full MCP sampling and judging will not work without it.
What does mcp-as-a-judge do?
It gates each stage of a coding task: plan, code changes, tests and completion. A model evaluates every stage, and ambiguous calls go back to the user.
Does it replace Cursor rules or Copilot agents?
No. Rules and agents keep working as before; the judge adds enforceable approval gates on the plan, the diffs and the tests.