Overview
Wire the GitHub MCP server into Claude Desktop and ask Claude to review a PR end-to-end. It fetches the diff, reads the modified files in context, and produces a review with severity-tagged comments and suggested code. You still post the review — Claude is the reviewer, not the approver.
How it works
- Install the official GitHub MCP server (Docker or npm).
- Provide a GitHub PAT with pull_request:read and contents:read scopes only.
- Register in Claude Desktop config.
- Ask: 'Review PR #482 in org/repo.' Claude fetches diff + relevant file context.
- Output: markdown-formatted review with inline suggestions; you paste it into GitHub or use the create-review tool if enabled.
Benefits
- Consistent first-pass reviews on every PR.
- Catches obvious bugs and missing tests before humans burn cycles.
- Junior devs get instant feedback outside working hours.
Use cases
- Small teams without dedicated reviewers.
- OSS maintainers with high PR volume.
- Contractors handing back review-ready work.
Step-by-step guide
Step 1: Create a scoped PAT
Fine-grained token, only the target repos. Read-only where possible.
Step 2: Install and register the server
docker run ghcr.io/github/github-mcp-server, or the npm variant. Register in claude_desktop_config.json.
Step 3: Prompt template
'Review PR #N in {org}/{repo}. Group comments by severity (blocker/nit/question). Include suggested code changes as diffs.'
Step 4: Human gate
Never enable auto-post on first rollout. Always paste in reviews yourself for the first 20 PRs.
Step 5: Add repo context to prompts
Reference your team's style guide inline — 'we prefer named exports, no default exports'.
Example
Review output: 'Blocker (src/auth.ts:42): This bypasses the middleware — attach requireAuth. Nit (src/user.ts:88): consider useMemo here. Question (tests/api.test.ts): why is this expected to be null?'