Back to Browse

Codereview MCP Server

Developer ToolsLow Risk8.2MCP RegistryLocal
Free

Server data from the Official MCP Registry

Multi-model review gate for AI-written code: independent reviewers, one deterministic verdict.

About

Multi-model review gate for AI-written code: independent reviewers, one deterministic verdict.

Security Report

8.2
Low Risk8.2Low Risk

CodeReview is a multi-model code review gate that reads API keys from environment variables, redacts known secret shapes before sending data to providers, and validates fixture and precedent paths against repository containment. The main concerns are operator-supplied shell execution for test and builder commands, which is documented as intentional, and the analyzed source is truncated, so the GitHub PR and MCP serve modules were not reviewed. Package verification found 1 issue.

3 files analyzed · 7 issues found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

File System Read

Reads files on your machine. Normal for tools that analyze or process local data.

File System Write

Writes or modifies files on your machine. Check that this is expected for the tool.

HTTP Network Access

Connects to external APIs or services over the internet.

process_spawn

Check that this permission is expected for this type of plugin.

Shell Command Execution

Runs commands on your machine. Be cautious — only use if you trust this plugin.

env_vars

Check that this permission is expected for this type of plugin.

What You'll Need

Set these up before or after installing:

Provider API key. Bring any two providers (OpenAI, Gemini, Anthropic, DeepSeek) and assign models per role in `codereview setup`.Required

Environment variable: OPENAI_API_KEY

Provider API key. Bring any two providers (OpenAI, Gemini, Anthropic, DeepSeek) and assign models per role in `codereview setup`.Required

Environment variable: GEMINI_API_KEY

How to Install

Add this to your MCP configuration file:

{
  "mcpServers": {
    "codereview-loop": {
      "command": "uvx",
      "args": [
        "codereview-loop==0.13.5"
      ],
      "env": {
        "GEMINI_API_KEY": "your-gemini-api-key-here",
        "OPENAI_API_KEY": "your-openai-api-key-here"
      }
    }
  }
}

Some servers take additional arguments. See the repository for details.

Documentation

View on GitHub

From the project's GitHub README.

CodeReview

PyPI License: MIT Python 3.11+

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 resolved

Quick 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 = INCONCLUSIVE

First 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.

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 loop runs 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; --post adds the report as a PR review comment (never auto-approves) and sets a codereview commit status.
  • MCP server - codereview mcp serve exposes 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 intake turns an issue report into a ranked, testable solution plan before any code is written.
  • Release records - codereview record-verify machine-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 --public

Headline 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 failures
  • THREAT-MODEL.md - every control, trust boundary, and residual risk, stated plainly
  • PRIVACY.md / SECURITY.md - what leaves your machine; how to report security problems
  • examples/ - evidence configs, agent-seat wrappers
  • Full command and policy reference - everything trimmed from the old README, preserved verbatim

If something goes wrong

  1. codereview --version, then re-run the failing command.
  2. codereview support-bundle writes one redacted zip you can attach to an issue.
  3. A crash exits 2, never 0 or 1, and writes a redacted crash note.
  4. Security problems: see SECURITY.md; do not open a public issue.

License

MIT

Reviews

No reviews yet

Be the first to review this server!