
cayirtepeomer/gerrit-code-review-mcp
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
cayirtepeomer/gerrit-code-review-mcp - кандидат на сервер MCP, импортированный из https://github.com/cayirtepeomer/gerrit-code-review-mcp.
Обзор
cayirtepeomer/gerrit-code-review-mcp - кандидат на сервер MCP, импортированный из https://github.com/cayirtepeomer/gerrit-code-review-mcp.
Обзор (машинный перевод)
Этот MCP-сервер обеспечивает интеграцию с системой обзора кода Gerrit, позволяя помощникам ИИ просматривать изменения кода и их детали через простой интерфейс.
Особенности
Сервер предоставляет оптимизированный набор инструментов для проверки кода:
###Изменить детали
Получает полную информацию об изменениях, включая файлы и наборы патчей Показывает подробную информацию для каждого измененного файла
- Отображает изменения файлов, вставки и удаления
- Поддержка просмотра конкретных наборов патчей
- возвращает подробные изменения, в том числе:
- Проектная и отраслевая информация
- Автор и рецензент детали
- Комментарии и обзор истории
- Изменения файлов с дифф-контентом Текущая информация о патче
###Сравните различия в патчах
Сравните различия между двумя патчсетами изменения Просмотр определенных различий файлов или всех измененных файлов Анализ модификаций кода в версиях patchset Отслеживать эволюцию изменений с помощью итераций обзора
Обратная связь
- Обратная связь с резюме, ярлыки для голосования (например,
{"Code-Review": 1}) и комментарии inline/file-level - Нацелить конкретный патчсет или по умолчанию на последнюю редакцию
Эта страница переведена автоматически. Технические детали смотрите в оригинале.
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
}
}
}