# Gerrit Code Review

This MCP server lets an AI agent inspect Gerrit changes, diffs, and discussions, then post reviews or change states when write groups are enabled.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 9
- Author: GaijinEntertainment
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/GaijinEntertainment/go-gerrit-mcp
- Updated: 2026-10-09
- HTML: https://affpapa.org/en/nevibecode/mcp/gerrit-code-review

## What it does

Gerrit Code Review uses stdio to expose Gerrit actions as model-readable, semantically tagged text. An agent can search with Gerrit’s change query syntax, inspect a change, list revision files, open a file diff, and read comment threads. Unresolved discussions are the default comment view.

Access is split into `read`, `comment`, and `transition` groups. A fresh setup exposes reading only. Write tools appear only after explicit configuration, while `own-changes-only` blocks comments, votes, and state transitions on changes owned by other accounts until that restriction is disabled.

The server targets Gerrit 3.13+ and takes HTTP credentials from `GERRIT_URL`, `GERRIT_USERNAME`, and `GERRIT_TOKEN`. It can run in Docker, with settings passed through environment variables. All three variables are required for startup.

## Requirements
- Needs: Docker
- Environment variables: `GERRIT_URL`, `GERRIT_USERNAME`, `GERRIT_TOKEN`, `GERRIT_MCP_GROUPS`, `GERRIT_MCP_PROJECTS`, `GERRIT_MCP_OWN_CHANGES_ONLY`, `GERRIT_MCP_REVIEW_NOTIFICATIONS`, `GERRIT_MCP_REVIEW_NOTIFICATIONS_POLL_INTERVAL`, `GERRIT_MCP_REVIEW_NOTIFICATIONS_INCLUDE_OWN`, `GERRIT_MCP_REVIEW_NOTIFICATIONS_EXCLUDE_ACCOUNTS` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env GERRIT_URL=<GERRIT_URL> --env GERRIT_USERNAME=<GERRIT_USERNAME> --env GERRIT_TOKEN=<GERRIT_TOKEN> --env GERRIT_MCP_GROUPS=<GERRIT_MCP_GROUPS> --env GERRIT_MCP_PROJECTS=<GERRIT_MCP_PROJECTS> --transport stdio gerrit-code-review -- docker run -i --rm -e GERRIT_URL -e GERRIT_USERNAME -e GERRIT_TOKEN -e GERRIT_MCP_GROUPS -e GERRIT_MCP_PROJECTS ghcr.io/gaijinentertainment/go-gerrit-mcp:1.1.3
```
Replace <…> with your own values. 6 more environment variables are in the server README

### Codex

**Platform CLI**
```bash
codex mcp add gerrit-code-review --env GERRIT_URL=<GERRIT_URL> --env GERRIT_USERNAME=<GERRIT_USERNAME> --env GERRIT_TOKEN=<GERRIT_TOKEN> --env GERRIT_MCP_GROUPS=<GERRIT_MCP_GROUPS> --env GERRIT_MCP_PROJECTS=<GERRIT_MCP_PROJECTS> -- docker run -i --rm -e GERRIT_URL -e GERRIT_USERNAME -e GERRIT_TOKEN -e GERRIT_MCP_GROUPS -e GERRIT_MCP_PROJECTS ghcr.io/gaijinentertainment/go-gerrit-mcp:1.1.3
```
Replace <…> with your own values. 6 more environment variables are in the server README

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "gerrit-code-review": {
            "command": "docker",
            "args": [
                "run",
                "-i",
                "--rm",
                "-e",
                "GERRIT_URL",
                "-e",
                "GERRIT_USERNAME",
                "-e",
                "GERRIT_TOKEN",
                "-e",
                "GERRIT_MCP_GROUPS",
                "-e",
                "GERRIT_MCP_PROJECTS",
                "ghcr.io/gaijinentertainment/go-gerrit-mcp:1.1.3"
            ],
            "env": {
                "GERRIT_URL": "<GERRIT_URL>",
                "GERRIT_USERNAME": "<GERRIT_USERNAME>",
                "GERRIT_TOKEN": "<GERRIT_TOKEN>",
                "GERRIT_MCP_GROUPS": "<GERRIT_MCP_GROUPS>",
                "GERRIT_MCP_PROJECTS": "<GERRIT_MCP_PROJECTS>"
            }
        }
    }
}
```
Replace <…> with your own values. 6 more environment variables are in the server README

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "gerrit-code-review": {
            "type": "stdio",
            "command": "docker",
            "args": [
                "run",
                "-i",
                "--rm",
                "-e",
                "GERRIT_URL",
                "-e",
                "GERRIT_USERNAME",
                "-e",
                "GERRIT_TOKEN",
                "-e",
                "GERRIT_MCP_GROUPS",
                "-e",
                "GERRIT_MCP_PROJECTS",
                "ghcr.io/gaijinentertainment/go-gerrit-mcp:1.1.3"
            ],
            "env": {
                "GERRIT_URL": "<GERRIT_URL>",
                "GERRIT_USERNAME": "<GERRIT_USERNAME>",
                "GERRIT_TOKEN": "<GERRIT_TOKEN>",
                "GERRIT_MCP_GROUPS": "<GERRIT_MCP_GROUPS>",
                "GERRIT_MCP_PROJECTS": "<GERRIT_MCP_PROJECTS>"
            }
        }
    }
}
```
Replace <…> with your own values. 6 more environment variables are in the server README

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e GERRIT_URL=<GERRIT_URL> -e GERRIT_USERNAME=<GERRIT_USERNAME> -e GERRIT_TOKEN=<GERRIT_TOKEN> -e GERRIT_MCP_GROUPS=<GERRIT_MCP_GROUPS> -e GERRIT_MCP_PROJECTS=<GERRIT_MCP_PROJECTS> gerrit-code-review docker run -i --rm -e GERRIT_URL -e GERRIT_USERNAME -e GERRIT_TOKEN -e GERRIT_MCP_GROUPS -e GERRIT_MCP_PROJECTS ghcr.io/gaijinentertainment/go-gerrit-mcp:1.1.3
```
Replace <…> with your own values. 6 more environment variables are in the server README

## When to use it
- search Gerrit changes with a query
- inspect a revision’s file diff
- review unresolved comment threads
- post comments and update a change state

## Example prompts
- Search Gerrit for open changes in project `core` and show their owners.
- Inspect this change, including its files, diff, and unresolved discussions.
- Review my change and post a comment about the issue you found.

## Similar
- [open-code-review](https://affpapa.org/en/nevibecode/skills/open-code-review.md) — skill · 6900 installs
- [om-code-review](https://affpapa.org/en/nevibecode/skills/om-code-review.md) — skill · 3000 installs
- [om-review-prs](https://affpapa.org/en/nevibecode/skills/om-review-prs.md) — skill · 2600 installs
- [difit-review](https://affpapa.org/en/nevibecode/skills/difit-review.md) — skill · 1900 installs
- [hunk-review](https://affpapa.org/en/nevibecode/skills/hunk-review.md) — skill · 1800 installs
- [review-delta](https://affpapa.org/en/nevibecode/skills/review-delta.md) — skill · 1200 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
