pr-review-mcp
Reads local git diffs for a branch to assemble multi-track PR review prompts and reports.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@pr-review-mcp review branch feature/my-branch and format the report as markdown"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
pr-review-mcp
MCP server for multi-track PR reviews from local git diffs.
npm package: aggrowal-pr-review-mcp
Documentation
Related MCP server: IRIS Regression Memory
Quickstart
Run via
npx:
npx -y aggrowal-pr-review-mcpAttach in your MCP client (Cursor/Claude-style example):
{
"mcpServers": {
"pr-review": {
"command": "npx",
"args": ["-y", "aggrowal-pr-review-mcp"],
"env": {}
}
}
}This server is keyless by default. No Anthropic/OpenAI keys are required.
Configure project once:
configure_project
name: your-repo-folder
repoUrl: https://github.com/org/repo
mainBranch: mainRun review:
@pr_review branch: feature/my-branch
@pr_review branch: feature/my-branch format: markdownpr_review now uses a strict staged loop:
Stage
prepare: server returnssessionId, assembled prompt, coverage contract, andnextAction.callTemplate.Stage
validate: host sends a draft report back; server validates schema + contract.Stage
repair(if needed): server returns exact gaps and a correction prompt.Stage
final: server returns validated review JSON (and optional markdown summary).
Most IDE agents can chain this automatically after the initial @pr_review branch: ... call.
If your host does not auto-chain, call pr_review again with sessionId + draftReport.
Troubleshooting: checks do not kick in
Common bypass symptoms:
Host returns free-form findings directly, but you do not see staged JSON envelopes with
ok,stage, andmeta.Response lacks
nextAction.callTemplatefromprepareorrepair.MCP logs do not show
pr_review: prepare stage startingandpr_review: validate stage starting.
Manual recovery flow:
Run
@pr_review branch: <branch-name>.Copy
nextAction.callTemplatefrom the returnedpreparepayload.Fill
draftReportwith your generated JSON report.Call
pr_reviewagain with that payload.Repeat with the returned
repaircall template until stagefinal.
Debug checklist:
Set
PR_REVIEW_LOG=debugin the MCP server environment.Re-run
@pr_review branch: <branch-name>.Confirm stage logs appear in order: prepare start -> validate start -> (repair or final).
If no stage logs appear, your host likely bypassed the MCP tool call.
Review contract enforcement
Detailed reference: docs/architecture.md#review-contract-enforcement.
Core guarantees:
Server builds a per-track execution contract from matched skill checklists.
Final model output must satisfy schema and contract coverage checks.
Missing/extra track, heading, or subpoint coverage causes correction retry and then structured error if unresolved.
Status taxonomy remains:
blocker | needs_improvement | nudge | looks_good.
Token efficiency strategy
Detailed reference: docs/architecture.md#token-efficiency-strategy.
Current strategy:
Keep a single
pr_reviewcall from IDE.Inject shared changed-files payload once for all tracks.
Remove repeated per-track prompt boilerplate while preserving checklist semantics.
Emit prompt telemetry (
static,payload,tracks,total) for visibility.Retry through explicit staged validation when output fails schema/contract checks.
Skill prompt format contract (must keep)
Each skill prompt must keep this shape so parser and coverage validation remain stable:
## What to checkheading lines in
### <Letter>. <Title>formatnumbered checks (
1.,2., ...)## Rules
If you change this format, update parser logic in src/prompt/assemble.ts and related tests.
Prompt-injection hardening
Detailed reference: docs/architecture.md#prompt-injection-hardening.
Hardening model:
Treat diff and file payloads as untrusted data.
Wrap untrusted content in sentinel boundaries.
Escape sentinel collisions in payload.
Keep reviewer
reviewInstructionsin trusted section only.
Future change checklist
Before finalizing behavior changes:
Keep coverage-contract integrity for track/heading/subpoint accounting.
Keep skill parseability (
### Letter. Heading+ numbered checks).Preserve token discipline via dedupe and concise wording.
Preserve trusted/untrusted boundary model and path sanitization.
Run
npm testandnpm run build.
Development
npm run build
npm run dev
npm test
npm start
npm run smoke:mcpAvailable Tools
3 toolsconfigure_projectA
Register or update a project in the PR review config. Run this once per project.
Inputs: name (required), repoUrl (required), mainBranch.
list_projectsB
List all configured projects.
Inputs: no named parameters.
pr_reviewB
Run staged keyless PR review. Host must chain prepare -> validate/repair using nextAction.callTemplate.
Inputs: cwd, model, branch, format, +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
The three tools target clearly different operations: project registration, project listing, and running a review. The only mild ambiguity is that pr_review bundles a multi-stage prepare/validate/repair workflow into one tool, making its exact behavior less obvious from the surface, but it does not overlap with the config tools.
configure_project and list_projects follow a clean verb_noun pattern, while pr_review deviates to a noun-style name. The deviation is minor and still readable, so the set is mostly consistent.
Three tools is on the lean side but each serves a distinct role in a narrow domain (configure, list, review). It is well-scoped for a focused PR review server, though slightly thin.
The surface covers project setup and running a review, but there is no way to remove/update a project explicitly, inspect past review results, or check status outside the chained pr_review flow. These are notable gaps that could force agents into awkward workarounds.
Maintenance
Related MCP Connectors
Live GitHub repo AST X-Ray, 42 coding-agent DoD gates, Git worktree guards & brownfield baselines.
AI-native git hosting — repos, PRs, issues, CI gates, and AI code review over MCP (60 tools).
Turn described changes into reviewed pull requests: propose, triage, review, dependency audits.
Audit and repair any public GitHub repo. Free survey; paid source, unified diffs and a pull request.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables multi-agent code review with P0/P1/P2 severity scoring by orchestrating locally installed AI CLIs (Claude, Codex) to perform parallel analysis, deterministic scoring, and consensus-building on git diffs.2MIT
- AlicenseNot gradedqualityBmaintenanceEnables deterministic behavioral regression review of pull-request diffs by checking changed code against approved incident-derived contracts. It exposes read-only tools to assess diffs and pull requests, list and fetch contracts, and report outcomes over stdio without mutating repositories.MIT
- FlicenseNot gradedqualityNot gradedmaintenanceEnables automated semantic analysis of Git pull request diffs to detect breaking REST/GraphQL API schema changes, integrating with MCP-compatible clients for AI-driven code review.-
- AlicenseAqualityBmaintenanceEnables an MCP-capable assistant to review GitLab merge requests, GitHub pull requests, and pre-push local branches against ticket requirements, domain rubrics, compiler/lint pre-passes, blast-radius analysis, and SonarQube findings, and to draft inline comments or follow-up tasks in the user's chosen language. Nothing reaches a remote host until a human approves the exact content in an interactive terminal.3MIT