mcp-gerrit-code-review
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| GERRIT_URL | No | The URL of the Gerrit server (e.g., https://gerrit.example.com). For HTTP mode, typically includes username in URL or use GERRIT_USERNAME. For SSH mode, can be in format ssh://user@host:port. | |
| GERRIT_SSH_KEY | No | Path to the SSH private key, defaults to ~/.ssh/id_rsa. | ~/.ssh/id_rsa |
| GERRIT_PASSWORD | No | Your HTTP password (required for HTTP mode). | |
| GERRIT_SSH_HOST | No | SSH hostname of the Gerrit server (required for SSH mode). | |
| GERRIT_SSH_PORT | No | SSH port, defaults to 29418. | 29418 |
| GERRIT_SSH_USER | No | SSH username for Gerrit (required for SSH mode). | |
| GERRIT_USERNAME | No | Your Gerrit username (required for HTTP mode). | |
| GERRIT_TRANSPORT | No | Transport mode: 'http' (default) or 'ssh'. | http |
| GERRIT_SSH_KEY_PASSPHRASE | No | Passphrase for the SSH private key (optional). |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| query_changesA | Query Gerrit changes using Gerrit's query syntax. Returns a list of changes matching the query. Common queries: 'status:open', 'status:merged', 'project:myproject', 'owner:self', 'reviewer:self', 'is:watched'. |
| get_change_detailsA | Get detailed information about a specific Gerrit change. Returns full change metadata including owner, labels, messages, revisions, and reviewers. |
| list_change_filesA | List files modified in a Gerrit change. Returns file paths with status (A=Added, D=Deleted, R=Renamed, W=Rewritten, M=Modified), size, and line counts. |
| get_file_diffA | Get the diff of a specific file in a Gerrit change. Returns the unified diff content including added, removed, and modified lines with context. |
| get_commit_messageA | Get the full commit message for a revision of a Gerrit change. Includes subject, body, author, committer, and parent commits. |
| post_reviewA | Post a review on a Gerrit change. Use this to vote on labels (e.g. Code-Review: +1), leave a cover message, mark as ready, or mark as work-in-progress. This is a mutation — use intentionally. |
| post_review_commentA | Post an inline comment on a specific file/line in a Gerrit change. Use this for line-by-line code review comments. Can reply to existing comments. This is a mutation — use intentionally. |
| list_change_commentsA | List all comments on a Gerrit change. Returns inline comments (with file path, line, and range) and file-level comments. Includes unresolved status and reply chains. |
| submit_changeA | Submit a Gerrit change for merging. The change must be ready to submit (all required labels approved, no merge conflicts). This is a mutation — use intentionally and confirm with the user before calling. |
| abandon_changeA | Abandon a Gerrit change. The change will no longer be considered for submission. Provide a reason message. This is a mutation — use intentionally and confirm with the user before calling. |
| restore_changeA | Restore an abandoned Gerrit change back to active status. This is a mutation — use intentionally. |
| list_reviewersA | List all reviewers of a Gerrit change. Returns reviewers, CC'd users, and removed reviewers along with their approval status. |
| add_reviewerA | Add a reviewer to a Gerrit change. Accepts account ID, username, email address, or group name. The reviewer will be notified. This is a mutation — use intentionally. |
| get_accountA | Get details of a specific Gerrit account. Use 'self' to get the currently authenticated user's account info. |
| query_accountsA | Search for Gerrit accounts by name, username, or email. Useful for finding reviewers or looking up account details. |
| list_projectsA | List Gerrit projects accessible to the current user. Can filter by prefix and optionally include descriptions. |
| get_server_versionA | Get the Gerrit server version string. Returns the version of the connected Gerrit instance. |
| get_server_infoA | Get Gerrit server configuration info. Returns server capabilities, authentication methods, change settings, download schemes, and plugin info. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 18 tools
Each tool targets a distinct resource and action: account queries, project listing, change lifecycle, diff retrieval, review posting, and comment management. Even within the change-related tools, each one covers a separate aspect (details, files, diffs, commit message, comments, reviewers) with no meaningful overlap.
All tool names follow a consistent verb_noun pattern in lower_snake_case, such as list_*, get_*, query_*, post_*, add_*, and *_change. The verbs are consistently used to differentiate read vs. mutation operations without mixing conventions.
With 18 tools, the server is slightly above the typical 3-15 range but each tool earns its place for a comprehensive Gerrit integration. The count feels justified given the breadth of code review workflows, though it is a bit heavy compared to leaner MCP servers.
The tool set covers the full Gerrit code review lifecycle: querying changes, inspecting diffs and files, managing reviewers, posting reviews and comments, and executing state transitions (submit, abandon, restore). There are no obvious dead ends for common review tasks, and the lack of a 'create change' tool is appropriate since Gerrit changes are created via git push.