Gerrit Review MCP Server
GerritレビューMCPサーバー
この MCP サーバーは Gerrit コード レビュー システムとの統合を提供し、AI アシスタントがシンプルなインターフェースを通じてコードの変更とその詳細をレビューできるようにします。
特徴
サーバーは、コードレビュー用の合理化されたツールセットを提供します。
変更の詳細を取得
fetch_gerrit_change(change_id: str, patchset_number: Optional[str] = None)ファイルやパッチセットを含む完全な変更情報を取得します
変更されたファイルごとに詳細な差分情報を表示します
ファイルの変更、挿入、削除を表示します
特定のパッチセットのレビューをサポート
以下を含む包括的な変更の詳細を返します:
プロジェクトとブランチの情報
著者および査読者の詳細
コメントとレビュー履歴
差分コンテンツを含むファイルの変更
現在のパッチセット情報
パッチセットの違いを比較する
fetch_patchset_diff(change_id: str, base_patchset: str, target_patchset: str, file_path: Optional[str] = None)変更の2つのパッチセットの違いを比較する
特定のファイルの違いや変更されたすべてのファイルを表示する
パッチセットのバージョン間でコードの変更を分析する
レビューの反復を通じて変更の進行を追跡する
使用例
完全な変更を確認します。
# Fetch latest patchset of change 23824
change = fetch_gerrit_change("23824")特定のパッチセットを比較します。
# Compare differences between patchsets 1 and 2 for change 23824
diff = fetch_patchset_diff("23824", "1", "2")特定のファイルの変更を表示します。
# Get diff for a specific file between patchsets
file_diff = fetch_patchset_diff("23824", "1", "2", "path/to/file.swift")Related MCP server: Chromium CodeSearch MCP
前提条件
Python 3.10 以上 (Python 3.11 を推奨)
Gerrit HTTP アクセス資格情報
Gerrit設定から生成されたHTTPパスワード
mcp[cli]パッケージリポジトリへのアクセス(プライベートパッケージ)
インストール
このリポジトリをクローンします:
git clone <repository-url>
cd gerrit-review-mcp仮想環境を作成してアクティブ化します。
# For macOS/Linux:
python -m venv .venv
source .venv/bin/activate
# For Windows:
python -m venv .venv
.venv\Scripts\activateこのパッケージを依存関係とともに編集可能モードでインストールします。
pip install -e .構成
環境変数を設定します。
export GERRIT_HOST="gerrit.example.com" # Your Gerrit server hostname
export GERRIT_USER="your-username" # Your Gerrit username
export GERRIT_HTTP_PASSWORD="your-http-password" # Your Gerrit HTTP passwordまたは、 .envファイルを作成します。
GERRIT_HOST=gerrit.example.com
GERRIT_USER=your-username
GERRIT_HTTP_PASSWORD=your-http-passwordHTTPパスワードを生成します:
Gerritウェブインターフェースにログインする
設定 > HTTP認証情報に移動します
新しいパスワードを生成する
パスワードを環境または.envファイルにコピーします
MCP構成
このMCPサーバーをCursorで使用するには、 ~/.cursor/mcp.jsonファイルに設定を追加する必要があります。必要な設定は次のとおりです。
{
"mcpServers": {
"gerrit-review-mcp": {
"command": "/path/to/your/workspace/gerrit-code-review-mcp/.venv/bin/python",
"args": [
"/path/to/your/workspace/gerrit-code-review-mcp/server.py",
"--transport",
"stdio"
],
"cwd": "/path/to/your/workspace/gerrit-code-review-mcp",
"env": {
"PYTHONPATH": "/path/to/your/workspace/gerrit-code-review-mcp",
"VIRTUAL_ENV": "/path/to/your/workspace/gerrit-code-review-mcp/.venv",
"PATH": "/path/to/your/workspace/gerrit-code-review-mcp/.venv/bin:/usr/local/bin:/usr/bin:/bin"
},
"stdio": true
}
}
}/path/to/your/workspace実際のワークスペースパスに置き換えてください。例えば、プロジェクトが/Users/username/projects/gerrit-code-review-mcpにある場合は、そのパスを使用してください。
構成内のすべてのパスが以下を指していることを確認します。
仮想環境のPythonインタープリタ
プロジェクトの
server.pyファイル正しい作業ディレクトリ
PATH内の仮想環境のbinディレクトリ
実装の詳細
サーバーは Gerrit REST API を使用して Gerrit と対話し、次の機能を提供します。
高速かつ信頼性の高い変更情報検索
HTTPダイジェスト認証を使用した安全な認証
さまざまな Gerrit REST エンドポイントのサポート
クリーンで保守しやすいコードベース
安全な通信のためのHTTPS暗号化
トラブルシューティング
接続の問題が発生した場合:
HTTPパスワードが正しく設定されていることを確認してください
GERRIT_HOST設定を確認する
GerritサーバーでHTTPSアクセスが有効になっていることを確認する
curl を使用して接続をテストします。
curl -u "username:http-password" https://your-gerrit-host/a/changes/アカウントの Gerrit アクセス権限を確認する
ライセンス
このプロジェクトは MIT ライセンスに基づいてライセンスされています。
貢献
貢献を歓迎します!ご協力をお願いします:
リポジトリをフォークする
機能ブランチを作成する
変更を加える
プルリクエストを送信する
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI assistants to review GitLab merge requests by fetching changes, analyzing diffs, adding comments, and managing approvals through the GitLab API. Supports complete merge request analysis, file-specific reviews, and version comparisons.124MIT
- AlicenseAqualityNot gradedmaintenanceEnables AI assistants to search and explore Chromium and PDFium source code, check Gerrit code reviews with test results and bot errors, search issues, and analyze commit history through Google's official APIs.16232619
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Phabricator for task management and code review workflows, including viewing and commenting on tasks, managing differential revisions, and providing intelligent review analysis with code context.7MIT
- AlicenseAqualityCmaintenanceMCP Server providing AI agents with tooling for Gerrit code review workflows via stdio transport.18141MIT
Related MCP Connectors
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Connect AI assistants to your GitHub-hosted Obsidian vault to seamlessly access, search, and analy…
Git-backed platform for skills, tools, and context for AI agents
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/cayirtepeomer/gerrit-code-review-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server