English | Русский
Unified MCP control plane for AI pull request reviews on GitHub.
Modern pull requests often attract multiple AI reviewers, but their comments arrive in different formats, different places, and different timelines. pr-review-mcp turns that noise into one MCP-native workflow: it normalizes review output from seven agent sources, exposes 19 focused tools, and adds orchestration primitives for parallel review handling.
If you use Claude Code, Claude Desktop, or another MCP client to process GitHub reviews, this server gives you one place to list findings, inspect details, invoke agents, wait for them server-side, and coordinate worker agents without building your own review pipeline.
pr_await_reviewsadds a server-side wait loop for AI reviews, so clients no longer need to poll GitHub manually while agents finish posting.pr_invokenow returnssince,invokedAgentIds, andawaitHint, making the handoff intopr_await_reviewsexplicit and reliable.- Claude Code integration is stronger with
skills/review/SKILL.md, a dedicated skill that wraps/pr:reviewinto an autonomous review workflow. - CI now runs build, tests, and coverage on Node 20 and 22 through GitHub Actions.
- Coverage reporting is part of the release baseline with
@vitest/coverage-v8; v0.3.0 records 225 Vitest test cases and a 51.7% statement coverage baseline. - Qodo completion tracking is more accurate because persistent issue comments are detected via
updated_at, not onlycreated_at. - Agent status polling was simplified by extracting shared logic into
fetchAgentStatusForAgents, removing duplicated code paths. - Ten dependency vulnerabilities were resolved as part of the release hardening work.
- Automates multi-agent PR review workflows with 19 MCP tools, 3 prompts, and 1 dynamic PR resource.
- Eliminates review-source fragmentation by normalizing comments from CodeRabbit, Gemini, Copilot, Sourcery, Qodo, Codex, and Greptile.
- Prevents polling loops in clients with
pr_await_reviews, a server-side monitor for agent completion. - Coordinates parallel workers safely with file-level partition claiming, progress reporting, and orchestration status checks.
- Surfaces machine-readable review data through structured outputs on key tools such as
pr_summary,pr_list,pr_get,pr_get_work_status, andpr_progress_check. - Supports local and shared deployments through
stdioby default and StreamableHTTP withpr-review-mcp --httporpr-review-mcp --http 8080. - Protects operational workflows with confirmation flows for destructive actions such as merge and coordination reset.
- Ships with Claude Code assets including
.claude-plugin/plugin.json,.mcp.json, and the review skill for slash-command driven orchestration.
graph TD
Client["MCP Client<br/>Claude Code / Claude Desktop / Inspector"]
Client -->|stdio| Server
Client -->|StreamableHTTP| Server
subgraph Server["pr-review-mcp v0.3.0"]
subgraph Interface["MCP Interface"]
Resource["Resource<br/>pr://{owner}/{repo}/{pr}"]
PromptReview["Prompt<br/>review"]
PromptReviewBg["Prompt<br/>review-background"]
PromptSetup["Prompt<br/>setup"]
end
subgraph Analysis["Analysis Tools (7)"]
T1["pr_summary"]
T2["pr_list_prs"]
T3["pr_list"]
T4["pr_get"]
T5["pr_changes"]
T6["pr_poll_updates"]
T7["pr_await_reviews"]
end
subgraph Action["Action Tools (6)"]
T8["pr_invoke"]
T9["pr_resolve"]
T10["pr_labels"]
T11["pr_reviewers"]
T12["pr_create"]
T13["pr_merge"]
end
subgraph Orchestration["Orchestration Tools (6)"]
T14["pr_claim_work"]
T15["pr_report_progress"]
T16["pr_get_work_status"]
T17["pr_reset_coordination"]
T18["pr_progress_update"]
T19["pr_progress_check"]
end
Monitor["ReviewMonitor<br/>server-side wait + backoff"]
Extractors["Extractors<br/>severity / prompt / nitpick / multi-issue"]
Adapters["Adapters<br/>Qodo / Greptile"]
State["Coordination State<br/>partitions / progress / phases"]
end
PromptReview --> T8
PromptReview --> T14
PromptReview --> T18
PromptReviewBg --> T18
PromptSetup --> T8
Resource --> T1
Analysis --> Monitor
Analysis --> Extractors
Action --> Adapters
Orchestration --> State
Monitor --> State
Server --> GitHub["GitHub GraphQL + REST API"]
State --> Workers["Parallel Worker Agents"]
| Tool | Description |
|---|---|
pr_summary |
Return PR review totals, resolution counts, severity breakdowns, file hotspots, and nitpick stats. |
pr_list_prs |
List open pull requests in a repository with review activity and change stats. |
pr_list |
Enumerate review comments with filters for resolution state, file, source, and severity. |
pr_get |
Fetch full detail for a single review thread, including the original body and extracted prompt data. |
pr_changes |
Return incremental review updates since a cursor for lightweight refresh workflows. |
pr_poll_updates |
Poll for comments, commits, and agent status changes when you need a non-blocking refresh loop. |
pr_await_reviews |
Block server-side until selected review agents post updates or a timeout is reached. |
| Tool | Description |
|---|---|
pr_invoke |
Trigger one agent or all configured agents for a PR review run. |
pr_resolve |
Resolve a GitHub review thread after the issue is handled. |
pr_labels |
List, add, remove, or set pull request labels. |
pr_reviewers |
Request or remove human and team reviewers on a pull request. |
pr_create |
Create a new pull request from existing branches. |
pr_merge |
Merge a pull request with confirmation-aware safety checks. |
| Tool | Description |
|---|---|
pr_claim_work |
Claim the next pending file partition for a worker agent. |
pr_report_progress |
Report completion, failure, or skip status for a claimed partition. |
pr_get_work_status |
Inspect the current coordination run, partition counts, and reviewed or pending agents. |
pr_reset_coordination |
Clear the active coordination run after explicit confirmation. |
pr_progress_update |
Publish orchestrator phase transitions for background workflows. |
pr_progress_check |
Read orchestrator phase history and coordination progress in one call. |
| Prompt | Slash Command | Description |
|---|---|---|
review |
/pr:review |
Main autonomous PR review orchestrator for a PR number, URL, or owner/repo#N. |
review-background |
/pr:review-background |
Fire-and-forget variant that keeps its own progress tracking without blocking the main chat thread. |
setup |
/pr:setup |
Guided setup prompt for repository-level review configuration and agent defaults. |
pr://{owner}/{repo}/{pr} is a dynamic MCP resource that returns pull request metadata and a current review summary in one JSON payload. Use it when a client needs a machine-readable snapshot without issuing multiple tool calls.
Example URI:
pr://thebtf/pr-review-mcp/2
Returned data includes PR metadata such as title, state, author, branch names, mergeability, review decision, timestamps, and the same summary dimensions exposed by pr_summary.
-
Install the server:
npm install -g pr-review-mcp
-
Add it to your MCP client:
{ "mcpServers": { "pr": { "command": "pr-review-mcp", "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_your_token_here" } } } } -
Verify the binary and version:
pr-review-mcp --version
Expected output:
pr-review-mcp v0.3.0
- Node.js
>=20.0.0 - A GitHub Personal Access Token with
reposcope - An MCP client such as Claude Code, Claude Desktop, or MCP Inspector
npm install -g pr-review-mcppr-review-mcp --versionUse the globally installed binary in your client config:
{
"mcpServers": {
"pr": {
"command": "pr-review-mcp",
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_your_token_here"
}
}
}
}git clone https://github.com/thebtf/pr-review-mcp.git
cd pr-review-mcp
npm install
npm run buildWhen running from a clone, point your client at the built entry point:
{
"mcpServers": {
"pr": {
"command": "node",
"args": ["D:/path/to/pr-review-mcp/dist/index.js"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_your_token_here"
}
}
}
}Start a StreamableHTTP server on the default port:
pr-review-mcp --httpOr specify a port explicitly:
pr-review-mcp --http 8080-
Update the package:
npm install -g pr-review-mcp@0.3.0
-
If your client automation waits for agents, switch from manual polling loops to the new pattern:
- Call
pr_invoke - Read
sinceandinvokedAgentIdsfrom its response - Pass those values into
pr_await_reviews
- Call
-
If you copied older README examples, migrate repository config to the nested format actually consumed by
pr_invoke:{ "version": 1, "invoke": { "agents": ["coderabbit", "gemini", "codex"], "defaults": { "focus": "best-practices", "incremental": true } } } -
Claude Code users can now rely on
skills/review/SKILL.mdfor a richer/pr:reviewworkflow. -
CI now validates build, tests, and coverage on Node 20 and 22, so local compatibility checks should target the same matrix.
| Variable | Required | Default | Description |
|---|---|---|---|
GITHUB_PERSONAL_ACCESS_TOKEN |
Yes | None | GitHub Personal Access Token with repo scope. The server exits early if it is missing. |
PR_REVIEW_AGENTS |
No | coderabbit |
Comma-separated agent IDs used when pr_invoke resolves agent: "all" without repository config. |
PR_REVIEW_MODE |
No | sequential |
Review invocation mode: sequential or parallel. |
Valid agent IDs are coderabbit, sourcery, qodo, gemini, codex, copilot, and greptile.
Create .github/pr-review.json in the reviewed repository to define repository-specific defaults:
{
"version": 1,
"invoke": {
"agents": ["coderabbit", "gemini", "codex"],
"defaults": {
"focus": "best-practices",
"incremental": true
}
}
}Config resolution order is:
.github/pr-review.jsonPR_REVIEW_AGENTSandPR_REVIEW_MODE- Built-in defaults (
coderabbit,sequential)
invoke.defaults maps directly to the options accepted by pr_invoke, so you can preconfigure values such as focus and incremental at the repository level.
Use the analysis tools to summarize and drill into the review state:
{
"name": "pr_summary",
"arguments": {
"owner": "thebtf",
"repo": "pr-review-mcp",
"pr": 2
}
}Then list unresolved findings:
{
"name": "pr_list",
"arguments": {
"owner": "thebtf",
"repo": "pr-review-mcp",
"pr": 2,
"resolved": false
}
}Trigger one or more AI reviewers:
{
"name": "pr_invoke",
"arguments": {
"owner": "thebtf",
"repo": "pr-review-mcp",
"pr": 2,
"agent": "all"
}
}Use the returned since and invokedAgentIds in pr_await_reviews:
{
"name": "pr_await_reviews",
"arguments": {
"owner": "thebtf",
"repo": "pr-review-mcp",
"pr": 2,
"since": "2026-03-28T10:00:00.000Z",
"agents": ["coderabbit", "gemini"],
"timeoutMs": 600000,
"pollIntervalMs": 30000
}
}In Claude Code, start the orchestrator:
/pr:review 2
Under the hood, the prompt uses orchestration tools such as pr_claim_work, pr_report_progress, pr_progress_update, and pr_progress_check to distribute unresolved comment partitions across worker agents and track progress until review handling is complete.
The repository ships with Claude Code assets:
.claude-plugin/plugin.jsondeclares the packaged plugin metadata and MCP server bootstrap..mcp.jsonprovides an MCP server config that points at the builtdist/index.js.skills/review/SKILL.mddefines the review skill used by/pr:review.
Available slash commands:
/pr:review/pr:review-background/pr:setup
Minimal Claude Code configuration with the global binary:
{
"mcpServers": {
"pr": {
"command": "pr-review-mcp",
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_your_token_here"
}
}
}
}| Source | Bot Login Pattern | Comment Type | Notes |
|---|---|---|---|
| CodeRabbit | coderabbitai[bot] |
Inline review threads | Supports focus, file filtering, and incremental review options. |
| Gemini | gemini-code-assist[bot] |
Inline review threads | Invoked through mention-based review commands. |
| Copilot | copilot-pull-request-reviewer[bot] |
Inline review threads | Parsed as a standard review-thread source. |
| Sourcery | sourcery-ai[bot], sourcery-ai-experiments[bot] |
Inline review threads | Detection accepts both production and experiments bot patterns. |
| Qodo | qodo-code-review[bot] |
Issue comment | Persistent review comment updated per commit; readiness uses updated_at. |
| Codex | chatgpt-codex-connector[bot] |
Inline review threads | Mention-based invocation, parsed as a regular review source. |
| Greptile | greptile-apps[bot] |
Issue overview plus inline review threads | Posts an overview issue comment and may also add inline findings. |
Qodo and Greptile are handled through dedicated adapters because they do not behave like simple inline review-only sources.
The server checks prerequisites on startup and exits early if the token is not configured. Add the token to the env block of your MCP server entry and restart the client.
pr_invoke only reads the nested config under invoke.agents and invoke.defaults. Invalid JSON falls back to default agents, so validate the file shape before assuming repository config is active.
Use the packaged CLI entry point:
pr-review-mcp --httpOr:
pr-review-mcp --http 8080If you run from a clone instead, build first and invoke node dist/index.js --http.
- Confirm the agent is enabled through
.github/pr-review.jsonorPR_REVIEW_AGENTS. - Check whether the agent already reviewed the PR;
pr_invokeskips reviewed agents unlessforceis set. - Use
pr_await_reviewsfor a blocking wait orpr_poll_updatesif your client needs periodic status refreshes. - For Qodo, remember that new activity may update one persistent issue comment rather than create fresh review threads.
Contributions are welcome. Start with CONTRIBUTING.md for setup, validation, and PR submission guidance.
MIT. See LICENSE.