PR Reviewer MCP Server
Connects Claude to GitHub, enabling listing repositories, browsing open pull requests, and inspecting PR diffs for code review.
README
PR Reviewer MCP Server
An MCP (Model Context Protocol) server that connects Claude to GitHub, allowing it to list repositories, browse open pull requests, and inspect PR diffs — all from within Claude Code.
Prerequisites
- Python 3.11+
- uv — fast Python package manager
- Claude Code CLI installed (
npm i -g @anthropic-ai/claude-code) - A GitHub Personal Access Token with
reposcope
Setup
1. Clone the repository
git clone https://github.com/subhamyadav580/pr-reviewer.git
cd pr-reviewer
2. Install dependencies
uv sync
This creates a .venv and installs all pinned dependencies from uv.lock.
3. Get a GitHub Personal Access Token
Go to GitHub → Settings → Developer settings → Personal access tokens and create a token with at minimum the repo scope (add read:org if your org repos are private).
4. Register the MCP server with Claude Code
Run this once — it registers the server at user scope so it's available in every project:
claude mcp add pr-reviewer -s user \
-e GITHUB_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxx \
-e GITHUB_ORG=your-github-org-name \
-- /absolute/path/to/pr-reviewer/.venv/bin/python \
/absolute/path/to/pr-reviewer/main.py
Replace:
ghp_xxxxxxxxxxxxxxxxxxxx— your GitHub PATyour-github-org-name— the GitHub org you want to query (e.g.my-company)/absolute/path/to/pr-reviewer— the full path where you cloned this repo
Verify it was registered:
claude mcp list
You should see pr-reviewer in the output.
5. (Optional) Install the /review-pr slash command
The repo ships with a review-pr.md slash command that gives Claude a structured, step-by-step review workflow. Copy it into your global Claude commands folder:
mkdir -p ~/.claude/commands
cp /absolute/path/to/pr-reviewer/review-pr.md ~/.claude/commands/review-pr.md
Now in any Claude Code session type /review-pr and Claude will:
- List all org repositories for you to pick from
- Show open PRs in the selected repo
- Fetch the PR details and diff
- Post a structured review with Blockers / Suggestions / Positives and a merge recommendation
Available MCP Tools
| Tool | Description |
|---|---|
list_org_repositories |
Lists all repositories in the configured GitHub org |
list_open_pull_requests(repo_full_name) |
Lists open PRs for a repo (e.g. "my-org/my-repo") |
get_pull_request_details(repo_full_name, pr_number) |
Returns PR metadata: title, body, author, file count, additions/deletions |
get_pull_request_diff(repo_full_name, pr_number) |
Returns per-file diffs with the raw unified diff patch |
Usage
Once registered you can talk to Claude naturally:
"List all open PRs in my org" "Show me the diff for PR #42 in my-org/backend" "Review PR #15 in my-org/frontend — flag bugs and style issues"
Or use the /review-pr slash command for a guided, structured review flow.
Project Structure
pr-reviewer/
├── main.py # MCP server — all tool definitions
├── review-pr.md # Slash command for Claude Code (/review-pr)
├── pyproject.toml # Project metadata and dependencies
├── uv.lock # Pinned dependency versions
├── .python-version # Python version pin (3.11)
└── .env.example # Template — copy to .env for local use
Claude Desktop
If you prefer Claude Desktop instead of the CLI, add this to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):
{
"mcpServers": {
"pr-reviewer": {
"command": "/absolute/path/to/pr-reviewer/.venv/bin/python",
"args": ["/absolute/path/to/pr-reviewer/main.py"],
"env": {
"GITHUB_TOKEN": "ghp_xxxxxxxxxxxxxxxxxxxx",
"GITHUB_ORG": "your-github-org-name"
}
}
}
}
Restart Claude Desktop after saving.
Development
Run the server manually to test it:
uv run python main.py
To add a new tool, define a function decorated with @mcp.tool() in main.py. FastMCP exposes it to Claude automatically.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。