Gerrit Review MCP Server

by cayirtepeomer

37 stars
775 downloads
Not rated
GitHub

About

This MCP server provides integration with Gerrit code review system, allowing AI assistants to review code changes and their details through a simple interface.

Details

Author
cayirtepeomer
GitHub stars
37
Downloads
775
Categories
Developer Tools, Other

- Fetch complete change details with files and diffs.
- Compare differences between two patchsets.
- Submit review feedback with labels and inline comments.
- Control Gerrit notification scope (NONE, OWNER, OWNER_REVIEWERS, ALL).
- Exclude file patterns from reviews (e.g., .pbxproj$, node_modules/).
- Support for self-signed TLS certificates and custom CA bundles.

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Gerrit Review MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install via Smithery (npx -y @smithery/cli install @cayirtepeomer/gerrit-code-review-mcp --client claude) or manually by cloning the repo, creating a virtual environment, and running pip install -e .. Configure environment variables (GERRIT_HOST, GERRIT_USER, GERRIT_HTTP_PASSWORD, optionally GERRIT_EXCLUDED_PATTERNS, GERRIT_SSL_VERIFY, GERRIT_CA_BUNDLE) and add the server to your ~/.cursor/mcp.json or .roo/mcp.json. The server exposes three tools: fetch_gerrit_change, fetch_patchset_diff, and submit_gerrit_review.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "gerrit review mcp server": {
            "gerrit-code-review-mcp": {
                "command": "npx",
                "args": [
                    "-y",
                    "@smithery/cli",
                    "install",
                    "@cayirtepeomer/gerrit-code-review-mcp",
                    "--client",
                    "claude"
                ]
            }
        }
    }
}

McpServers

{
    "gerrit-code-review-mcp": {
        "command": "npx",
        "args": [
            "-y",
            "@smithery/cli",
            "install",
            "@cayirtepeomer/gerrit-code-review-mcp",
            "--client",
            "claude"
        ]
    }
}

Gerrit Review MCP Server

smithery badge

This MCP server provides integration with Gerrit code review system, allowing AI assistants to review code changes and their details through a simple interface.

Features

The server provides a streamlined toolset for code review:

Fetch Change Details

fetch_gerrit_change(change_id: str, patchset_number: Optional[str] = None)
- Fetches complete change information including files and patch sets - Shows detailed diff information for each modified file - Displays file changes, insertions, and deletions - Supports reviewing specific patch sets - Returns comprehensive change details including: - Project and branch information - Author and reviewer details - Comments and review history - File modifications with diff content - Current patch set information

Compare Patchset Differences

fetch_patchset_diff(change_id: str, base_patchset: str, target_patchset: str, file_path: Optional[str] = None)
- Compare differences between two patchsets of a change - View specific file differences or all changed files - Analyze code modifications across patchset versions - Track evolution of changes through review iterations

Submit Review Feedback

submit_gerrit_review(
    change_id: str,
    message: Optional[str] = None,
    patchset_number: Optional[str] = None,
    labels: Optional[Dict[str, int]] = None,
    comments: Optional[List[Dict[str, Any]]] = None,
    notify: str = "OWNER",
)
- Post summary feedback, vote labels (e.g., {"Code-Review": 1}), and inline/file-level comments - Target a specific patchset or default to the latest revision - Control Gerrit's notification behaviour (notify: NONE, OWNER, OWNER_REVIEWERS, ALL) - Comment payloads accept dictionaries with path, message, and optional Gerrit comment fields (line, side, range, ...)

Example Usage

Review a complete change:
```python

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.