CodeReview MCP Server
Integrates with GitHub pull requests by reviewing public PRs read-only, optionally posting the CodeReview report as a PR review comment and setting a codereview commit status, and exporting SARIF findings for GitHub code scanning.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
CodeReview
One agent builds. Independent models review. A deterministic gate decides.
CodeReview is a review gate for AI-written code. A panel of models from different providers reviews every change, cross-checks each other's findings, and issues a recorded verdict: PASS, BLOCKED, or INCONCLUSIVE. The model that wrote the code is never the only one that checked it, and the builder can never approve its own work.
Ships as a CLI and an MCP server, so your coding agents can submit their own work to the gate before it merges. You bring your own API keys and assign models per role; your code goes to the providers you chose, nowhere else. MIT licensed. Python 3.11+, POSIX (Windows and macOS desktop apps in the works).
builder ──diff──▶ deterministic checks ──▶ reviewer A (correctness/security)
(secrets, injection, │
data-loss, your tests) ▼
reviewer B (operations/reliability)
│
┌───── gate ◀───────┘
│ PASS / BLOCKED / INCONCLUSIVE
▼
fix or rebut ──▶ verification round ──▶ PASS only when
every reviewer agrees
the block is resolvedQuick start
pip install codereview-loop # or: pip install -e . from a clone
export GEMINI_API_KEY=... # any two providers are a good start
export OPENAI_API_KEY=...
# Review the staged diff in the current repo
codereview --repo . --staged --provider gemini --provider openai
echo $? # 0 = PASS, 1 = BLOCKED, 2 = INCONCLUSIVEFirst run? codereview setup walks you through picking providers, keys, and a model per role. CodeReview ships no default panel: it never quietly substitutes a vendor-chosen lineup.
The report lands in codereview-out/ as Markdown (for humans) + JSON (for tooling), and every run writes one versioned verdict record you keep.
Related MCP server: AI Workbench MCP
Why
Self-review is not review. The model that wrote the code shares its blind spots. Independent providers catch different things.
LLM opinions are not a gate. Findings are structured, merged across reviewers (consensus raises confidence, never lowers severity), and the pass/block decision is made by deterministic rules over those findings.
Every claim needs evidence. A model finding must carry a quote copied verbatim from the diff, validated deterministically. One that cannot be re-grounded goes to a human instead of silently blocking.
No silent substitutes. Failed providers, rotated accounts, fallback seats, degraded runs: all recorded on the report, never hidden.
What you get
Multi-model panel - 10+ provider presets (OpenAI, Gemini, Anthropic, DeepSeek, MiniMax, Moonshot, NVIDIA, xAI, Mistral, OpenRouter) plus any OpenAI-compatible endpoint, or seat a coding agent itself (Claude Code, Gemini CLI, your own wrapper) as a reviewer.
Cross-family confirmation - a blocker raised by one vendor family is put to a seat from another; a refutation counts only with a validated quote. Unresolved disputes route to the human gate.
Evidence runner - executes your tests, lint, and SAST in a sandbox (throwaway tree, no network by default, your API keys never reach the process) and stores hashed results. A claims mode re-runs the commands a builder's report claims it ran and downgrades the ones the re-run contradicts.
The loop driver -
codereview loopruns the full cycle: review, hand BLOCKED findings to your builder agent, verify the fix, repeat up to--max-rounds, then hand back to a human.GitHub PR review - read-only review of public PRs with no token;
--postadds the report as a PR review comment (never auto-approves) and sets acodereviewcommit status.MCP server -
codereview mcp serveexposes the gate (run_gate/get_verdict) so agents submit their own work before merge.Workflows and intake - multi-step build workflows where each step must PASS and is committed as its approval record;
codereview intaketurns an issue report into a ranked, testable solution plan before any code is written.Release records -
codereview record-verifymachine-checks whether a record may be called clean: gate PASS, not degraded, tests passed, at least two vendor families, reviewed range unchanged.Disputes and precedents - an append-only disposition store and content-addressed precedents, so a settled rebuttal stays settled until the judged code changes.
SARIF export - findings where your other tools live: GitHub code scanning and most static-analysis surfaces.
Account pools - when a free quota dies, the next account reviews; every rotation is on the record.
Benchmark: prove it, don't pitch it
The repo ships a labelled corpus (36 cases, public + holdout splits) and the harness to score any panel:
codereview bench run --config panel-gemini-nvidia --split public
codereview bench report --publicHeadline metric is the escaped-defect rate: defects the gate would have shipped.
The default strict gate is deliberately unforgiving. In registered confirmation testing it caught every seeded defect (recall 1.00, 7 of 7; Wilson 95% interval [0.646, 1.000], a small sample) at 0.583 merged blocking precision, and it blocked 94% of clean changes (32 of 34; 95% interval [0.809, 0.984]). The registered confirmation failed its clean-change threshold. (Record: bench/generation-v2/RESULTS-2026-11-05.md, attempt 1.) That is the trade, stated plainly: strict is a high-recall gate for code you cannot afford to get wrong, with a documented waiver path. A balanced profile exists; an opt-in corroborated profile failed its registered confirmation and is marked dev-only. Numbers, intervals, and provenance: bench/README.md.
Gate profiles
Set per project in .codereview.toml or per run with --gate-profile:
strict(default) - every blocking-severity finding blocks, whoever raised it.balanced- a blocking finding raised solely by the operations lens is demoted to a visible minor unless corroborated. Demote, never delete.corroborated- opt-in, dev evidence only (failed its registered confirmation).quiet- rejected by testing; naming it is an error.
Privacy and safety
Keys come from environment variables only; nothing is stored or logged. Known secret shapes in the diff are redacted before anything is sent to a provider. Feedback is opt-in and off by default. The evidence sandbox and its limits are documented in THREAT-MODEL.md; exactly what any report sends is in PRIVACY.md.
Docs
bench/- benchmark corpus, harness, and every registered result, including the failuresTHREAT-MODEL.md- every control, trust boundary, and residual risk, stated plainlyPRIVACY.md/SECURITY.md- what leaves your machine; how to report security problemsexamples/- evidence configs, agent-seat wrappersFull command and policy reference - everything trimmed from the old README, preserved verbatim
If something goes wrong
codereview --version, then re-run the failing command.codereview support-bundlewrites one redacted zip you can attach to an issue.A crash exits 2, never 0 or 1, and writes a redacted crash note.
Security problems: see
SECURITY.md; do not open a public issue.
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Related MCP Connectors
Pre-execution governance for AI agents. Deterministic PASS/FAIL/REVIEW verdicts, replayable proof.
Multi-LLM council: 25+ frontier models in parallel, consensus scoring, verdict-first code review.
Git-native policy layer for AI agents: check_action verdicts against rules approved via PR.
17 QA judges for agents: LLM outputs, agent runs, PR diffs, APIs, MCP servers. Verdict + gate.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables multi-model code review by fanning out issues to multiple LLMs simultaneously, diffing their unique insights, optionally running debate rounds, and dispatching subagents to implement fixes with git commits.72MIT
- AlicenseCqualityDmaintenanceEnables acceptance gates for AI coding-agent runs by recording evidence, running deterministic validation, applying a quality gate, and rendering auditable outcomes.757 PyPIApache 2.0
- AlicenseAqualityBmaintenanceEnables verification of AI coding agent self-reports against git diff truth and a deterministic gate, producing pass/regenerate/reject directives to ensure claimed work matches actual changes.6AGPL 3.0
- FlicenseNot gradedqualityDmaintenanceRuns a multi-agent code review pipeline via MCP, analyzing git diffs for security, quality, and logic issues and returning a pass/fail verdict.-