An MCP server for interacting with Gerrit via curl
Project description
🐍 Gerrit MCP Server
An MCP (Model Context Protocol) server for interacting with the Gerrit code
review system. This server allows a language model like Gemini to query changes,
retrieve details, and manage reviews by executing curl commands against the
Gerrit REST API.
This server can be run as a persistent HTTP server or on-demand via STDIO.
📚 Documentation
For detailed information, please see the documents in the docs/ directory:
- Configuration: A detailed guide to the
gerrit_config.jsonfile and all authentication methods. - Testing Guide: Instructions on how to run the unit, integration, and E2E tests.
- Gemini CLI Setup: How to configure the Gemini CLI to use this server.
- Best Practices: Tips for using the server effectively.
- Contributing: Guidelines for contributing to the project.
- Available Tools: A list of all available tools and their descriptions.
- Example Use Cases: Scenarios demonstrating how to use the server.
🚀Getting Started
从 PyPI 安装(推荐)
对于快速使用,可以直接从 PyPI 安装:
# 通过 uvx 直接运行(无需安装)
uvx gerrit-mcp-server stdio
# 或安装后使用
uv pip install gerrit-mcp-server
gerrit-mcp-server stdio
# 指定端口运行 HTTP 服务器
gerrit-mcp-server --host localhost --port 6322
安装后,请按照下面的 配置服务器 部分创建配置文件。
从源码安装
如果要从源码安装,请按以下步骤操作:
1. Prerequisites
1. Prerequisites
Before you begin, ensure you have the following tools installed and available in
your system's PATH.
- Python 3.11+: The build script requires a modern version of Python.
- curl: The standard command-line tool for transferring data with URLs.
2. Build the Environment
Run the build script from the root of the gerrit-mcp-server project directory.
This will create a Python virtual environment, install all dependencies, and
make the server ready to run.
./build-gerrit.sh
3. Configure the Server
You will need to create a gerrit_config.json file inside the
gerrit_mcp_server directory. Copy the provided sample file
gerrit_mcp_server/gerrit_config.sample.json and customize it for your
environment. See the Configuration Guide for
details on all available options.
cp gerrit_mcp_server/gerrit_config.sample.json gerrit_mcp_server/gerrit_config.json
4. Run the Server (HTTP Mode)
To run the server as a persistent background process, use the server.sh script:
- Start the server:
./server.sh start - Check the status:
./server.sh status - Stop the server:
./server.sh stop
For on-demand STDIO mode, please see the Gemini CLI Setup Guide.
Security
This is not an officially supported Google product. This project is not eligible for the Google Open Source Software Vulnerability Rewards Program.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gerrit_mcp_server-1.0.2.tar.gz.
File metadata
- Download URL: gerrit_mcp_server-1.0.2.tar.gz
- Upload date:
- Size: 22.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2449a0ffbe2a2d3b573c049c7778374ffc3b22b4a7e21fa08c0fe45549834d77
|
|
| MD5 |
73bc50705d5c60bcd7b874827752bdb4
|
|
| BLAKE2b-256 |
aba2b57bffddfb7015cd62214e35241fa696d48670ce86fdc906760d5e19d4d5
|
File details
Details for the file gerrit_mcp_server-1.0.2-py3-none-any.whl.
File metadata
- Download URL: gerrit_mcp_server-1.0.2-py3-none-any.whl
- Upload date:
- Size: 25.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f3c1849eef9bc9fadd16a29ab390c2bb6ca2509bc35a52c4f92ec7990cb9fb6d
|
|
| MD5 |
228170b2414f55b526058f3052c70580
|
|
| BLAKE2b-256 |
60c81fc370dae578bc916187473eea7cde82dd857f58dca6413afadd4234aeaf
|