# Let Claude review your pull requests

> Reviews wait days, and small issues slip through when everyone is busy.

This setup is for small engineering teams whose pull requests sit waiting for a reviewer. Claude reads the diff through the GitHub MCP server, checks it against your conventions and the linked Linear issue, and leaves review comments. You get a first-pass review on every PR so human reviewers can focus on design and intent.

## Steps

1. **Create a fine-grained GitHub token**: In GitHub, go to Settings > Developer settings > Fine-grained tokens and create a token for only the repositories you want reviewed. Give it read access to contents and read and write access to pull requests so Claude can comment. Set an expiry date and note it somewhere.
   Tip: A 90-day expiry is a reasonable balance between safety and having to rotate often.
2. **Add the GitHub MCP server**: In Claude Code, run claude mcp add with GitHub's official MCP server, either the remote server or the local Docker image, and pass the token. In Cursor, add the same server under Settings > MCP. Ask the agent to list open PRs in one repo to confirm the connection.
   Tip: If the list comes back empty, check that the token includes that repository.
3. **Give it your review checklist**: Write your review rules into CLAUDE.md, a Cursor rule, or a short prompt you reuse: naming, error handling, test expectations, what to ignore. Include examples of comments you consider useful and ones you consider noise. Claude will then point at specific lines instead of giving generic advice.
   Tip: Tell it to skip style issues your linter already catches.
4. **Link the ticket**: Add Linear's remote MCP server and authorise it with OAuth. When a PR references an issue ID, ask Claude to read the issue and check the change against its acceptance criteria. Missing criteria become a review comment instead of a surprise after merge.
   Tip: Put the Linear issue ID in the branch name or PR title so Claude can find it.

## Prompts to try

- Review PR 142 in acme/web against our checklist and leave inline comments on anything that breaks it.
- Read the Linear issue linked in PR 142 and tell me which acceptance criteria the diff does not cover.
- List open pull requests in acme/api that have had no review for more than two days.
- Summarise what PR 87 changes in three bullet points for the release notes.
- Check PR 142 for missing tests on the new functions and suggest test cases.

## What you need

- A GitHub account with access to the repositories
- A fine-grained personal access token
- Claude Code or Cursor
- A Linear workspace if you want acceptance-criteria checks

## Limits

- Claude reviews the diff and files it reads; it does not run your app, so it can miss runtime and integration problems.
- Very large PRs may not fit in one pass, so split them or ask for a review by directory.
- Review quality depends on how clearly you describe your conventions.

## Security notes

- Never grant merge or admin permissions.
- Keep a human approval on every merge.

## MCP servers

- [GitHub MCP Server](https://github.com/github/github-mcp-server): repository-read, issue-write, pull-request-write
- [Linear MCP Server](https://linear.app/docs/mcp): issue-read, issue-write, project-read

## FAQ

**Does Claude approve or merge pull requests?**

It can only do what the token allows and what you approve. Keep merge decisions with people; use Claude for comments and summaries, and leave approvals to your human reviewers.

**Do I need a paid GitHub plan?**

No. Fine-grained tokens and the GitHub MCP server work on free accounts. You do need a Claude plan that includes Claude Code, or a Cursor plan, to run the agent.

**Will it see private repositories?**

Only the private repositories you select when you create the token. Code from those repos goes to the model provider as part of the conversation, so check your company's policy first.

**Can this run on every PR automatically?**

This setup is interactive: you ask for a review. For automatic reviews on each PR, look at running Claude Code in GitHub Actions, which is a separate setup.

## Tools

- **[GitHub](https://suiteintent.com/t/github?m=GB)**: Code hosting, issues and pull requests. · Best for: Teams reviewing code through pull requests · Free plan · 10000
- **[Linear](https://suiteintent.com/t/linear?m=GB)**: Fast, keyboard-first issue tracker. · Best for: Startups planning work in cycles · Free plan · Free for startups
