gerrit
null - (mirror of https://gerrit.googlesource.com/./gerrit-mcp-server)
claude mcp add --transport stdio gerritcodereview-gerrit-mcp-server python -m gerrit_mcp_server.server \ --env GERRIT_PASSWORD="Gerrit password or token (optional if using OAuth/token auth)" \ --env GERRIT_USERNAME="Gerrit username (optional if using basic auth)" \ --env GERRIT_API_BASE_URL="URL of Gerrit REST API (e.g., https://<host>/a/)"
How to use
The Gerrit MCP Server provides a programmatic interface to interact with a Gerrit code review system using the Model Context Protocol. It exposes tools that allow a language model to query changes, retrieve details about specific reviews, and perform actions via Gerrit’s REST API by issuing curl-style requests under the hood. The server can run as a persistent HTTP service for continuous query access or be invoked on-demand in STDIO mode for single-request processing, depending on your workflow. You can explore the available tools and their capabilities in the documentation under Available Tools. The server is designed to be integrated with Gemini or similar agents, enabling natural language queries to translate into Gerrit operations such as listing changes, fetching change details, adding comments, and managing reviews.
How to install
Prerequisites:
- Python 3.11+
- curl (for testing REST interactions, optional but recommended)
- Access to a Gerrit instance (with appropriate API credentials)
Installation steps:
-
Clone the repository and navigate to the project root: git clone https://github.com/example/gerrit-mcp-server.git cd gerrit-mcp-server
-
Build/setup the environment using the provided build script: ./build-gerrit.sh
This creates a Python virtual environment and installs dependencies
-
Create or customize the configuration file for Gerrit: cp gerrit_mcp_server/gerrit_config.sample.json gerrit_mcp_server/gerrit_config.json
Edit gerrit_mcp_server/gerrit_config.json to point to your Gerrit instance and auth details
-
Run the server (HTTP mode) in the background: ./server.sh start
Use ./server.sh status to check status and ./server.sh stop to stop
-
Optional: run in STDIO mode via Gemini CLI setup as described in the documentation:
See docs/gemini-cli.md for instructions on configuring Gemini to communicate with this server
-
Verify the server is reachable, for example by making a test request to the root endpoint or using the available tools documented in docs/available_tools.md.
Additional notes
Tips and notes:
- Ensure your Gerrit API credentials have sufficient permissions for the actions you plan to perform.
- If using HTTP mode, consider securing the server behind a reverse proxy and enabling authentication.
- The configuration file (gerrit_config.json) supports multiple authentication methods; review docs/configuration.md for details.
- The build script abstracts environment setup; if you modify environment variables, restart the server to pick up changes.
- For debugging, consult docs/testing.md to run unit/integration tests and verify tool behavior before production use.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP