Claude DesktopIntermediate9 min readUpdated Jun 8, 2026

Claude + MCP: In-Editor GitHub Code Review Assistant

Use the GitHub MCP server to let Claude Desktop review open PRs — fetch diffs, understand the changes, and suggest a review comment set.

claudemcpgithubcoding

Download this template

Grab a structured copy of "Claude + MCP: In-Editor GitHub Code Review Assistant" as JSON (for programmatic import) or Markdown (for docs and README files). Both are licensed CC-BY-4.0 with attribution.

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

  1. Install the official GitHub MCP server (Docker or npm).
  2. Provide a GitHub PAT with pull_request:read and contents:read scopes only.
  3. Register in Claude Desktop config.
  4. Ask: 'Review PR #482 in org/repo.' Claude fetches diff + relevant file context.
  5. 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?'

FAQs

Related resources

Workflows, articles, and tools that pair with this build.