PR Reviewer MCP Server
Allows browsing and reviewing GitHub pull requests, including listing repositories, open PRs, and fetching diffs for review.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@PR Reviewer MCP ServerList open pull requests in my-org/my-repo"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
Related MCP server: PR Review MCP Server
Setup
1. Clone the repository
git clone https://github.com/subhamyadav580/pr-reviewer.git
cd pr-reviewer2. Install dependencies
uv syncThis 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.pyReplace:
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 listYou 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.mdNow 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 |
| Lists all repositories in the configured GitHub org |
| Lists open PRs for a repo (e.g. |
| Returns PR metadata: title, body, author, file count, additions/deletions |
| 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 useClaude 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.pyTo add a new tool, define a function decorated with @mcp.tool() in main.py. FastMCP exposes it to Claude automatically.
Available Tools
4 toolsget_pull_request_detailsA
Get metadata for a specific pull request.
Returns title, description, author, changed file count, additions,
deletions, and commit count — useful for understanding PR scope before
reading the diff.
Args:
repo_full_name: Full repo identifier in "owner/repo" format.
pr_number: The pull request number.
| Name | Required | Description | Default |
|---|---|---|---|
| repo_full_name | Yes | ||
| pr_number | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description must carry the burden. It correctly states it returns metadata (read-only) but lacks details on authorization, rate limits, or error conditions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise with two sentences and a structured args list, no unnecessary information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, it lists return fields and context. Could include more on error handling, but adequate for a simple metadata tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds meaning to both parameters: 'repo_full_name' format and 'pr_number' as the number, which the schema lacks (0% coverage).
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses specific verb 'get metadata' and names the resource 'pull request', listing returned fields. It clearly distinguishes from siblings by focusing on metadata vs diff or listing.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description suggests using before reading the diff, providing clear context. However, it does not explicitly state when not to use or compare alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_pull_request_diffA
Get the file-by-file diff for a specific pull request.
Returns each changed file with its status (added/modified/removed),
line-level additions and deletions, and the raw unified diff patch.
Args:
repo_full_name: Full repo identifier in "owner/repo" format.
pr_number: The pull request number.
| Name | Required | Description | Default |
|---|---|---|---|
| repo_full_name | Yes | ||
| pr_number | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It discloses the return structure (file status, line-level changes, raw patch) and lists the required parameters. It does not cover authentication or rate limits, but for a read-only tool, this is adequate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise: a one-line purpose, a sentence on return format, and two lines for parameter comments. No wasted words, and the key information is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, the description adequately explains the return value. The tool is simple with two required parameters, and the description covers both input and output sufficiently. No gaps identified.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, but the description's 'Args' section adds meaning for both parameters: repo_full_name (format 'owner/repo') and pr_number (the PR number). This fully compensates for the lack of schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Get' and the resource 'file-by-file diff for a specific pull request', which distinguishes it from sibling tools like get_pull_request_details (likely summary) and list_open_pull_requests (list of PRs).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use (to get a diff), but does not explicitly state when not to use it or mention alternatives. Usage context is provided indirectly through the purpose.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_open_pull_requestsA
List all open pull requests for a repository.
Args:
repo_full_name: Full repo identifier in "owner/repo" format.
| Name | Required | Description | Default |
|---|---|---|---|
| repo_full_name | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, and the description does not disclose behavioral traits such as pagination, result limits, or ordering. It only states the action without further details.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise with two sentences, front-loading the purpose. No unnecessary words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the lack of output schema and annotations, the description is incomplete: it doesn't mention output format, pagination, or any constraints. For a list tool, more context is needed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema coverage is 0%, so the description compensates by explaining the repo_full_name parameter format (owner/repo). This adds meaningful guidance beyond the schema structure.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool lists open pull requests for a repository, using a specific verb and resource. It distinguishes from siblings like get_pull_request_details or list_org_repositories.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use the tool (to list open PRs for a repo) but provides no explicit guidance on when not to use it or alternatives among siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_org_repositoriesA
List all repositories in the configured GitHub org.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so the description must carry the burden. It lacks details on behavior like pagination, rate limits, authentication, or what 'configured org' means, leaving significant gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single, clear sentence with no wasted words; appropriately front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
While the description is simple, it omits details about the return value (e.g., what fields are returned, pagination limits) which are important for a listing tool with no output schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
No parameters exist (schema coverage 100%), and the description adds meaning by specifying the scope ('configured GitHub org'), which goes beyond the empty schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'list' and resource 'repositories in the configured GitHub org', distinguishing it from sibling tools which focus on pull requests.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool vs alternatives; no exclusions or context provided beyond the basic action.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
v0.1.0- First observed
get_pull_request_details - First observed
get_pull_request_diff - First observed
list_open_pull_requests - First observed
list_org_repositories
TDQS
Scored across 4 tools
Each tool serves a clear, non-overlapping purpose: listing repos, listing PRs, fetching PR metadata, and fetching PR diffs. No ambiguity in intent.
All tool names follow a consistent verb_noun pattern with snake_case (e.g., get_pull_request_details, list_open_pull_requests), making them predictable.
4 tools is well-scoped for a PR review server, covering the essential read operations without bloat or insufficiency.
The tool set covers the full read-only PR review workflow: discover repositories, list PRs, and examine details and diffs. No obvious gaps for its intended purpose.
Maintenance
Related MCP Connectors
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Access the GitHub API, enabling file operations, repository management, search functionality, and…
Connect AI assistants to your GitHub-hosted Obsidian vault to seamlessly access, search, and analy…
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceConnects Claude Desktop to GitHub repositories, enabling users to perform git operations and GitHub API interactions through natural conversation.291 npm-
- AlicenseNot gradedqualityDmaintenanceConnects Claude to GitHub Pull Requests to fetch and filter code diffs for AI-assisted reviews. It enables listing open PRs and analyzing changes while automatically excluding binary and asset files to focus on relevant code.22MIT
- FlicenseNot gradedqualityDmaintenanceEnables to interact with GitHub repositories directly from Claude, supporting actions like viewing repos, checking status, committing and pushing changes, and managing pull requests.-
- AlicenseNot gradedqualityCmaintenanceConnects Claude to GitHub repositories for querying repos, reviewing PRs, managing issues, searching code, and automating workflows.MIT