
cayirtepeomer/gerrit-code-review-mcp
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
cayirtepeomer/gerrit-code-review-mcp は [https://github.com/cayirtepeomer/gerrit-code-review-mcp.] からインポートされた MCP サーバーの候補です
概要
cayirtepeomer/gerrit-code-review-mcp は [https://github.com/cayirtepeomer/gerrit-code-review-mcp.] からインポートされた MCP サーバーの候補です
概要(AI 翻訳)
このMCPサーバーは、Gerritコードレビューシステムと統合し、AIアシスタントがコード変更と詳細を簡単なインターフェイスで確認できるようにします。
##特徴
サーバは、コードレビューのための合理化されたツールセットを提供します。
##Fetch 変更内容
- ファイルやパッチセットを含む完全な変更情報を表示する
- 各修正ファイルの詳細な差分情報を表示
- ファイルの変更、インサート、削除の表示
- 特定のパッチセットのレビューをサポート
- 以下のような包括的な変更の詳細を返します。
- プロジェクトとブランチ情報
- 著者とレビュー担当者の詳細
- コメントとレビュー履歴
- diff コンテンツのファイル変更
- 現在のパッチセット情報
パッチセットの違いを比較する
- 変更の2つのパッチセットの違いを比較する
- 特定のファイルの違いや変更されたファイルを表示する
- パッチセットバージョン間でコード変更を分析する
- レビューの反復による変化の進化を追跡する
投稿レビューフィードバック
- 投稿要約フィードバック、投票ラベル(例、
{"Code-Review": 1})、およびインライン/ファイルレベルのコメント - 特定のパッチセットまたはデフォルトを最新のリビジョンにターゲット
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
Gerrit Review MCP Server
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:
# Fetch latest patchset of change 23824
change = fetch_gerrit_change("23824")
Submit review feedback with a vote and inline comment:
submit_gerrit_review(
change_id="23824",
message="Looks good overall",
labels={"Code-Review": 1},
comments=[{"path": "src/app.py", "line": 42, "message": "Nice refactor."}],
patchset_number="2", # optional: target a specific patchset
notify="OWNER_REVIEWERS", # optional: adjust notification scope
)
Compare specific patchsets:
# Compare differences between patchsets 1 and 2 for change 23824
diff = fetch_patchset_diff("23824", "1", "2")
View specific file changes:
# Get diff for a specific file between patchsets
file_diff = fetch_patchset_diff("23824", "1", "2", "path/to/file.swift")
Prerequisites
- Python 3.10 or higher (Python 3.11 recommended)
- Gerrit HTTP access credentials
インストール
npx -y @smithery/cli install @cayirtepeomer/gerrit-code-review-mcp --client claude設定
{
"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
}
}
}