# CodeReview

> CodeReview is an open-source MCP server for developer tools. Multi-model review gate that checks AI-written code before it merges. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, API, Linux, macOS, Self-hosted
- **Repository:** https://github.com/phpatch/codereview
- **MCP Registry name:** io.github.PHPatch/codereview
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-27

## About

Independent models from different providers review each code change, cross-check one another's findings, and produce a recorded verdict of PASS, BLOCKED or INCONCLUSIVE. Findings must quote the diff verbatim, and checks run in a sandbox with no network access by default, so a builder agent never approves its own work.

It runs as a command-line tool or as an MCP server, letting coding agents submit their work to the gate before merge. A loop driver can hand blocked findings back to a builder, re-verify the fix, and escalate to a person after a set number of rounds. A GitHub PR mode reviews public pull requests without a token and can post the report as a review comment.

You supply your own API keys and assign models to each review role, and code is sent only to the providers you choose. It suits teams using AI coding agents who want an auditable, deterministic gate on generated changes.

## Features

- **Multi-model review panel:** Reviewers from several providers examine each diff, and any OpenAI-compatible endpoint can be added.
- **Deterministic pass or block:** Pass and block decisions follow fixed rules applied to structured findings rather than model opinion.
- **Evidence-grounded findings:** Each model finding must include a quote from the diff that is checked automatically.
- **Sandboxed test runner:** Tests, lint and SAST run in a throwaway tree with no network by default and no exposure of API keys.
- **Review loop driver:** Runs review, hands blocked findings to a builder agent, verifies fixes and repeats up to a round limit.
- **GitHub PR review:** Reads public pull requests without a token and can post reports and a commit status.
- **SARIF export:** Exports findings in SARIF format for GitHub code scanning and other static-analysis tools.

## Good for

- Gating AI-generated code changes before they merge into a repository
- Letting a coding agent submit its own diff to a review gate and act on the verdict
- Running independent model reviews on pull requests from public GitHub repositories
- Recording auditable verdicts for changes that need a release sign-off

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add codereview --env OPENAI_API_KEY='<OPENAI_API_KEY>' --env GEMINI_API_KEY='<GEMINI_API_KEY>' -- uvx codereview-loop
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "codereview": {
      "command": "uvx",
      "args": [
        "codereview-loop"
      ],
      "env": {
        "OPENAI_API_KEY": "<OPENAI_API_KEY>",
        "GEMINI_API_KEY": "<GEMINI_API_KEY>"
      }
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "codereview": {
      "command": "uvx",
      "args": [
        "codereview-loop"
      ],
      "env": {
        "OPENAI_API_KEY": "<OPENAI_API_KEY>",
        "GEMINI_API_KEY": "<GEMINI_API_KEY>"
      }
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "codereview": {
      "command": "uvx",
      "args": [
        "codereview-loop"
      ],
      "env": {
        "OPENAI_API_KEY": "<OPENAI_API_KEY>",
        "GEMINI_API_KEY": "<GEMINI_API_KEY>"
      }
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "codereview": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "codereview-loop"
      ],
      "env": {
        "OPENAI_API_KEY": "<OPENAI_API_KEY>",
        "GEMINI_API_KEY": "<GEMINI_API_KEY>"
      }
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add codereview --env OPENAI_API_KEY='<OPENAI_API_KEY>' --env GEMINI_API_KEY='<GEMINI_API_KEY>' -- uvx codereview-loop
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.codereview]
command = "uvx"
args = ["codereview-loop"]
env = { OPENAI_API_KEY = "<OPENAI_API_KEY>", GEMINI_API_KEY = "<GEMINI_API_KEY>" }
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "codereview": {
      "command": "uvx",
      "args": [
        "codereview-loop"
      ],
      "env": {
        "OPENAI_API_KEY": "<OPENAI_API_KEY>",
        "GEMINI_API_KEY": "<GEMINI_API_KEY>"
      }
    }
  }
}
```

Or run: gemini mcp add -s user -e OPENAI_API_KEY='<OPENAI_API_KEY>' -e GEMINI_API_KEY='<GEMINI_API_KEY>' codereview uvx -- codereview-loop

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "codereview": {
      "command": "uvx",
      "args": [
        "codereview-loop"
      ],
      "env": {
        "OPENAI_API_KEY": "<OPENAI_API_KEY>",
        "GEMINI_API_KEY": "<GEMINI_API_KEY>"
      }
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "codereview": {
      "command": "uvx",
      "args": [
        "codereview-loop"
      ],
      "env": {
        "OPENAI_API_KEY": "<OPENAI_API_KEY>",
        "GEMINI_API_KEY": "<GEMINI_API_KEY>"
      }
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "codereview": {
      "command": "uvx",
      "args": [
        "codereview-loop"
      ],
      "env": {
        "OPENAI_API_KEY": "<OPENAI_API_KEY>",
        "GEMINI_API_KEY": "<GEMINI_API_KEY>"
      }
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "codereview": {
      "command": "uvx",
      "args": [
        "codereview-loop"
      ],
      "env": {
        "OPENAI_API_KEY": "<OPENAI_API_KEY>",
        "GEMINI_API_KEY": "<GEMINI_API_KEY>"
      }
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "codereview": {
      "command": "uvx",
      "args": [
        "codereview-loop"
      ],
      "env": {
        "OPENAI_API_KEY": "<OPENAI_API_KEY>",
        "GEMINI_API_KEY": "<GEMINI_API_KEY>"
      }
    }
  }
}
```

The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "codereview": {
      "command": "uvx",
      "args": [
        "codereview-loop"
      ],
      "env": {
        "OPENAI_API_KEY": "<OPENAI_API_KEY>",
        "GEMINI_API_KEY": "<GEMINI_API_KEY>"
      }
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "codereview": {
      "command": "uvx",
      "args": [
        "codereview-loop"
      ],
      "env": {
        "OPENAI_API_KEY": "<OPENAI_API_KEY>",
        "GEMINI_API_KEY": "<GEMINI_API_KEY>"
      }
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "codereview": {
      "command": "uvx",
      "args": [
        "codereview-loop"
      ],
      "env": {
        "OPENAI_API_KEY": "<OPENAI_API_KEY>",
        "GEMINI_API_KEY": "<GEMINI_API_KEY>"
      }
    }
  }
}
```

## Tools

From the tool list in its README, going by the names, 1 of 2 tools changes data. From the server's own tool labels and tool names; not verified by us.

- `run_gate` (name suggests: changes): Runs the review gate on submitted work.
- `get_verdict` (name suggests: reads): Returns the verdict for a previous gate run.

## FAQ

### Which providers can I use?

Presets exist for OpenAI, Gemini, Anthropic, DeepSeek, MiniMax, Moonshot, NVIDIA, xAI, Mistral and OpenRouter, plus any OpenAI-compatible endpoint. You bring your own API keys.

### Does CodeReview come with a default set of models?

No. You choose providers and assign a model per role during setup.

### What license is CodeReview under?

MIT.

### Which platforms are supported?

It runs on POSIX systems; Windows and macOS desktop apps are described as in development.

### Is CodeReview free?

Yes. CodeReview is open source, so you can use and self-host it for free.

### How do I add CodeReview to Claude Code?

Run this command in your terminal: claude mcp add codereview --env OPENAI_API_KEY='<OPENAI_API_KEY>' --env GEMINI_API_KEY='<GEMINI_API_KEY>' -- uvx codereview-loop

### What are the best alternatives to CodeReview?

The closest alternatives to CodeReview are Panel Review, Review MCP, ReviewGate, Myopic and Multi-MCP.

## Where this comes from

- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Panel Review](https://ai-powered.com/mcp/panel-review): Panel Review is an MCP server for developer tools.
- [Review MCP](https://ai-powered.com/mcp/review-mcp): Review MCP is a paid MCP server for developer tools.
- [ReviewGate](https://ai-powered.com/mcp/reviewgate): ReviewGate is a free MCP server for developer tools.
- [Myopic](https://ai-powered.com/mcp/myopic): Myopic is an open-source MCP server for developer tools.
- [Multi-MCP](https://ai-powered.com/mcp/multi-mcp): Multi-MCP is an open-source MCP server for developer tools.
- [ThinkReview](https://ai-powered.com/mcp/thinkreview): ThinkReview is an MCP server for developer tools.
- [no_human](https://ai-powered.com/mcp/no-human): no_human is a freemium MCP server for developer tools.
- [Verificate MCP](https://ai-powered.com/mcp/verificate-mcp): Verificate MCP is an MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/codereview
