PR Review MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
git clone https://github.com/<your-username>/pr-review-mcp.git
cd pr-review-mcp
pip install -r requirements.txt
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add -e "GITHUB_TOKEN=${GITHUB_TOKEN}" -e "GITHUB_REPO=${GITHUB_REPO}" pr-review -- python "<FULL_PATH_TO_AUTO_REVIEW_CLAUDEMCP>/dist/index.js"

Replace <FULL_PATH_TO_AUTO_REVIEW_CLAUDEMCP>/dist/index.js with the actual folder you prepared in step 1.

Required:GITHUB_TOKENGITHUB_REPO+ 1 optional
README.md

AI-assisted code review tool for developers/AQA engineers

PR Review MCP Server

AI-assisted code review tool for developers/AQA engineers

A Python MCP (Model Context Protocol) server that connects Claude Desktop to GitHub Pull Requests. It fetches PR diffs, filters out binary and asset files (Unity .meta, images, audio, shaders, etc.), and gives Claude only the actual code to review.

Built as a QA automation tool to speed up pull request reviews using AI.

Requirements

  • Python 3.11+
  • Claude Desktop

Installation

git clone https://github.com/<your-username>/pr-review-mcp.git
cd pr-review-mcp
pip install -r requirements.txt

Authentication

The server looks for credentials in this order:

  1. Environment variables (GITHUB_TOKEN, GITHUB_REPO) — for Claude Desktop
  2. OS keychain (via keyring) — for Claude Code and local development
  3. Interactive prompt — fallback from the terminal

Option A — Keychain (recommended for Claude Code)

Run the server once manually to store your credentials in the OS keychain:

python server.py

You will be prompted for:

  1. GITHUB_TOKEN — A GitHub Personal Access Token (classic) with repo scope. Generate one at github.com/settings/tokens.
  2. GITHUB_REPO — The repository in owner/repo format (e.g. octocat/Hello-World).

Both values are stored securely in your OS keychain and will not be prompted again.

Option B — Environment variables (recommended for Claude Desktop)

Pass credentials directly in the MCP config (see examples below). This avoids the interactive prompt, which does not work in Claude Desktop's background processes.

Claude Desktop Configuration

Add the following to your Claude Desktop config file:

Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "pr-review": {
      "command": "python",
      "args": ["C:\\path\\to\\pr-review-mcp\\server.py"],
      "env": {
        "GITHUB_TOKEN": "ghp_your_token_here",
        "GITHUB_REPO": "owner/repo"
      }
    }
  }
}

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "pr-review": {
      "command": "python",
      "args": ["/path/to/pr-review-mcp/server.py"],
      "env": {
        "GITHUB_TOKEN": "ghp_your_token_here",
        "GITHUB_REPO": "owner/repo"
      }
    }
  }
}

Note: If you already stored credentials in the keychain (Option A), you can omit the env block — the server will find them automatically.

After editing the config, restart Claude Desktop.

Claude Code Configuration

Option A — CLI command:

claude mcp add pr-review -- python /path/to/pr-review-mcp/server.py

Option B — create .mcp.json in your project root:

{
  "mcpServers": {
    "pr-review": {
      "command": "python",
      "args": ["/path/to/pr-review-mcp/server.py"]
    }
  }
}

Then restart Claude Code.

Usage

Once configured, Claude Desktop will have two new tools:

  • list_open_prs — Lists open PRs in the configured repository.
  • get_pr_diff — Fetches the code diff for a specific PR number, filtering out binary/asset files.

Example prompts in Claude Desktop:

  • "List open PRs"
  • "Review PR #42"
  • "What changed in PR #15?"

Reset Tokens

To clear stored credentials and re-enter them:

python server.py --reset

Then run python server.py again to enter new values.

Troubleshooting

Errors are automatically logged to error_report.log in the project directory.

To enable verbose debug logging, add MCP_DEBUG to your config:

"env": {
  "GITHUB_TOKEN": "ghp_your_token_here",
  "GITHUB_REPO": "owner/repo",
  "MCP_DEBUG": "1"
}

Or set it in your terminal before running manually:

MCP_DEBUG=1 python server.py

Common issues:

  • latin-1 codec error — Your GITHUB_TOKEN contains non-ASCII characters. Make sure you copied the real token, not a placeholder.
  • Server hangs on startup — Credentials are missing and the server is waiting for interactive input. Use environment variables (Option B) or run python server.py manually first to save them to keychain.
  • 401 Unauthorized — Token is invalid or expired. Run python server.py --reset and enter a new token.

Architecture

Claude Desktop  ──MCP──▶  server.py  ──REST API──▶  GitHub
                              │
                         keyring (OS)
                         secure token storage

Описание

MCP-сервер для автоматизации код-ревью пулл-реквестов с помощью Claude AI.

Что это?

Это инструмент для QA-инженеров, который подключает Claude Desktop к GitHub и позволяет ИИ анализировать изменения в пулл-реквестах. Сервер автоматически фильтрует бинарные файлы и ассеты (Unity .meta, текстуры, аудио, шейдеры и т.д.), передавая Claude только код для ревью.

Что умеет?

  • list_open_prs — показать список открытых PR в репозитории
  • get_pr_diff — получить diff конкретного

Tools (2)

list_open_prsLists open PRs in the configured repository.
get_pr_diffFetches the code diff for a specific PR number, filtering out binary/asset files.

Environment Variables

GITHUB_TOKENrequiredGitHub Personal Access Token (classic) with repo scope
GITHUB_REPOrequiredThe repository in owner/repo format
MCP_DEBUGEnables verbose debug logging

Configuration

claude_desktop_config.json
{"mcpServers": {"pr-review": {"command": "python", "args": ["/path/to/pr-review-mcp/server.py"], "env": {"GITHUB_TOKEN": "ghp_your_token_here", "GITHUB_REPO": "owner/repo"}}}}

Try it

List open PRs
Review PR #42
What changed in PR #15?

Frequently Asked Questions

What are the key features of PR Review MCP Server?

Fetches GitHub pull request diffs for AI analysis. Automatically filters out binary and asset files like images and Unity meta files. Supports secure credential storage via OS keychain. Provides verbose debug logging for troubleshooting. Integrates directly with Claude Desktop and Claude Code.

What can I use PR Review MCP Server for?

Automating initial code review feedback for developers. Helping QA engineers quickly understand changes in a pull request. Filtering out noise from non-code assets during AI-assisted code reviews. Streamlining the PR review process by summarizing changes directly in Claude.

How do I install PR Review MCP Server?

Install PR Review MCP Server by running: git clone https://github.com/<your-username>/pr-review-mcp.git && cd pr-review-mcp && pip install -r requirements.txt

What MCP clients work with PR Review MCP Server?

PR Review MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep PR Review MCP Server docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare