
一个 Python MCP(模型上下文协议)服务器,连接 Claude Desktop 和 GitHub 拉取请求。它获取 PR 差异,过滤二进制和资源文件(Unity `.meta`)、图片、音频、着色器等。
概览
一个 Python MCP(模型上下文协议)服务器,连接 Claude Desktop 和 GitHub 拉取请求。它获取 PR 差异,过滤二进制和资源文件(Unity .meta、图片、音频、着色器等),只给 Claude 实际代码供审查。 作为一款QA自动化工具,利用AI加快拉取请求审核。 服务器按以下顺序查找凭证: 1. (GITHUB_TOKEN, GITHUB_REPO) — 用于 Claude Desktop 2.(通过钥匙圈) — 用于 Claude Code 和本地开发 3.— 终端的备份 手动运行一次服务器,将你的凭证存入操作系统密钥串: 1. — 一个带有仓库范围的 GitHub 个人访问令牌(经典版)。在 github.com/settings/tokens 生成一个。2. — 拥有者/仓库格式的仓库(例如 octocat/Hello-World)。 这两个数值都会安全地存储在你的操作系统钥匙串中,不会再被提示。 直接在MCP配置中传递凭证(见下文示例)。
概述(AI 翻译)
为开发者/AQA工程师提供的AI辅助代码审查工具
一个 Python MCP(模型上下文协议)服务器,连接 Claude Desktop 和 GitHub 拉取请求。它获取 PR diff,过滤二进制和资源文件(Unity .meta、图片、音频、着色器等),只给 Claude 实际代码供审查。
作为一款QA自动化工具,利用AI加快拉取请求审核。
要求
- Python 3.11+
- Claude桌面
安装
认证
服务器按以下顺序查找凭证:
- 环境变量 (
GITHUB_TOKEN,GITHUB_REPO) — 用于 Claude Desktop - OS 钥匙扣(通过
keyring)——用于 Claude 代码和本地开发 - 交互提示 — 终端的备选
选项A — 钥匙扣(推荐用于Claude Code)
手动运行一次服务器,将你的凭证存入操作系统密钥串:
您将被提示进行:
- GITHUB_TOKEN — 一个具有
repo范围的GitHub个人访问令牌(经典版)。在 github.com/settings/tokens 处生成一个。 - GITHUB_REPO —
owner/repo格式的仓库(例如octocat/Hello-World)。
这两个数值都会安全地存储在你的操作系统钥匙串中,不会再被提示。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
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//pr-review-mcp.git
cd pr-review-mcp
pip install -r requirements.txt
Authentication
The server looks for credentials in this order:
- Environment variables (
GITHUB_TOKEN,GITHUB_REPO) — for Claude Desktop - OS keychain (via
keyring) — for Claude Code and local development - 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:
- GITHUB_TOKEN — A GitHub Personal Access Token (classic) with
reposcope. Generate one at github.com/settings/tokens. - GITHUB_REPO — The repository in
owner/repoformat (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
envblock — 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
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"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"
}
}
}
}