Skip to main content
Glama

pr-reviewer-mcp

An MCP server exposing AI-powered GitHub PR review as tools, adapted from codewarrior (a webhook-driven GitHub App) into an on-demand tool server.

Why this exists

The original app reviews automatically when a PR opens — event-driven. This version reviews when explicitly asked, by you or by an agent — tool-driven. Same review pipeline (LangChain + Gemini), different trigger model and a different auth model (PAT instead of GitHub App installation tokens, since there's a human in the loop at call time instead of a webhook).

Related MCP server: AI-PR-Review-MCP

Tools

Tool

Description

list_open_prs

List open PRs for a repo

get_pr_diff

Fetch the raw diff, no AI

review_file

AI review of a single file in a PR

review_pr

Full AI review: all files in parallel + synthesized summary

post_review_comment

Post a review as a PR comment

Setup

npm install
cp .env.example .env

Fill in .env:

  • GITHUB_TOKEN — fine-grained PAT with Pull requests (read/write) and Contents (read) permissions on the repos you want to review

  • GOOGLE_API_KEY — from Google AI Studio

Running locally

npm start

This starts the server on stdio. It won't print anything to stdout (that channel is reserved for the MCP protocol) — status logs go to stderr.

Connecting to CLI or VS Code

Add to your MCP config (claude_desktop_config.json or equivalent):

{
  "mcpServers": {
    "pr-reviewer": {
      "command": "node",
      "args": ["/absolute/path/to/pr-reviewer-mcp/src/index.js"],
      "env": {
        "GITHUB_TOKEN": "your-token-here",
        "GOOGLE_API_KEY": "your-key-here"
      }
    }
  }
}

Restart your IDE, then you can ask things like:

"Review PR #12 on srivastava-aryan/dsa-tracker"

and it will call review_pr, decide whether to post it, and call post_review_comment if you confirm.

What changed from the original app

  • Auth: github-auth.js now uses a personal access token via @octokit/rest directly, instead of @octokit/auth-app + installation tokens. No webhook server, no Express, no smee-client.

  • Trigger: no webhook listener. Review happens when a tool is called.

  • Logging: console.logconsole.error in the review pipeline, since stdout is reserved for MCP protocol messages on stdio transport.

  • Everything else — prompts, parallel file review, synthesis step — is unchanged from the original reviewer.js and diff-fetcher.js.

Next steps worth exploring

  • Swap stdio transport for HTTP/SSE if you want to host this remotely instead of running it locally per-user

  • Add a list_recent_reviews tool backed by a small DB, so repeated reviews on the same PR don't re-run from scratch

  • Add resource support (server.resource) to expose PR diffs as browsable MCP resources rather than only tool outputs

Available Tools

5 tools
get_pr_diffA

Fetch the raw file-by-file diff for a pull request, with no AI review applied.

ParametersJSON Schema
NameRequiredDescriptionDefault
repoYes
ownerYes
pull_numberYesThe PR number

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Describes read-only, non-destructive operation. No annotations, but 'fetch' and 'raw' adequately convey safety and no side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One sentence, 13 words, no filler. Efficient and front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers purpose and output adequately for a simple fetch tool. Lacks mention of return format, but 'raw diff' suffices.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Only pull_number described in schema (33% coverage). Description doesn't detail owner/repo, but names are self-explanatory. Minimal added value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Spells out verb 'Fetch', resource 'raw file-by-file diff', and distinguishes from siblings like 'review_pr' by specifying 'with no AI review applied.'

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implies use for raw diff without AI review vs. review_pr which applies AI review. Clear context but no explicit when-not or alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_open_prsA

List open pull requests for a GitHub repo, so you can decide which to review.

ParametersJSON Schema
NameRequiredDescriptionDefault
repoYesRepo name, e.g. 'codewarrior'
ownerYesRepo owner, e.g. 'srivastava-aryan'

TDQS

A3.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are present, so the description must fully disclose behavioral traits. It only states the basic function; it omits details like rate limits, authentication requirements, pagination, and whether the list is limited (e.g., first 30 PRs).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no extraneous words. Every element serves a purpose: action, resource, scope, and intended use.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple list tool with no output schema or annotations, the description provides the core context. It lacks details on pagination, authentication, and whether the list is exhaustive, but these are minor gaps given the tool's simplicity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with clear descriptions for both 'owner' and 'repo'. The description adds no additional parameter semantics, so baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('List'), the resource ('open pull requests'), and the scope ('for a GitHub repo'). It implicitly differentiates from sibling tools like 'review_pr' or 'get_pr_diff' by framing the output as a basis for deciding which to review.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'so you can decide which to review' implies a use case (preparation for review), but there is no explicit guidance on when to use this tool versus alternatives, such as when authentication is needed, or pagination limits.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

post_review_commentA

Post a review (typically the output of review_pr) as a comment on the pull request.

ParametersJSON Schema
NameRequiredDescriptionDefault
bodyYesMarkdown body of the comment to post
repoYes
ownerYes
pull_numberYes

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, yet the description does not disclose any behavioral traits (e.g., that it writes to a PR, requires authentication, or has rate limits). The name implies mutation, but explicit behavior is lacking.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no wasted words. It could benefit from slight expansion, but remains effective and efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity and sibling references, the description captures the core intent. However, it omits output details, error conditions, and permission notes, leaving gaps for an agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 25% (only 'body' has a description). The tool description adds no parameter-level guidance, failing to compensate for the missing schema descriptions of owner, repo, and pull_number.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly identifies the action ('Post a review... as a comment'), the resource ('pull request'), and distinguishes from siblings by referencing 'review_pr' as its input source.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly ties this tool to the output of 'review_pr', providing clear when-to-use context. It does not state when not to use, but the sibling set makes the primary usage obvious.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

review_fileB

Run an AI code review on a single file within a pull request.

ParametersJSON Schema
NameRequiredDescriptionDefault
repoYes
ownerYes
filenameYesExact filename as it appears in the PR diff
pull_numberYes

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must disclose side effects. It only says 'run an AI code review' without specifying if it posts comments, returns results, or modifies anything. This is insufficient for an AI agent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise at one sentence, but it lacks structure; front-loading the key action and resource works, but it is minimally informative.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema and the tool's complexity (AI review), the description is too brief. It does not explain the review output (e.g., text returned, comment posted), making it incomplete for an agent to understand outcomes.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 25% (only 'filename' has a description). The description adds general context ('within a pull request') but does not explain parameters like 'owner', 'repo', 'pull_number' beyond what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's action ('Run an AI code review') and scope ('on a single file within a pull request'), distinguishing it from sibling tools like 'review_pr' which likely covers the entire PR.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use this tool (for single file review) vs. alternatives (e.g., 'review_pr'), but does not explicitly state when not to use it or mention specific usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

review_prA

Run a full AI code review on a pull request: fetches the diff, reviews every changed file in parallel, and returns a synthesized markdown review.

ParametersJSON Schema
NameRequiredDescriptionDefault
repoYes
ownerYes
pull_numberYes

TDQS

A3.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description discloses key behaviors: fetches diff, parallel file review, returns markdown. It does not disclose potential side effects (e.g., does it post a comment?) but the sibling tools suggest it only returns. No contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single, well-structured sentence that conveys the core action and process. Front-loaded with the main purpose, no unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the essential workflow and output (synthesized markdown review). Lacks details on prerequisites or error handling, but for a three-parameter tool without an output schema, it is sufficiently complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has three parameters (owner, repo, pull_number) with zero descriptions. The tool description adds no additional meaning beyond the parameter names, which are self-explanatory. Given 0% schema description coverage, more elaboration would be beneficial.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool performs a full AI code review on a pull request, including fetching the diff, reviewing every changed file in parallel, and returning a synthesized markdown review. This distinguishes it from siblings like get_pr_diff (just diff), review_file (single file), and post_review_comment (posting a comment).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus alternatives. The description does not mention conditions or provide context for selecting this over review_file or get_pr_diff for partial reviews.

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.

  1. 5 tool updatesv1.0.0
    • First observedget_pr_diff
    • First observedlist_open_prs
    • First observedpost_review_comment
    • First observedreview_file
    • First observedreview_pr

TDQS

A3.8/5.0

Scored across 5 tools

Disambiguation5/5

Each tool targets a distinct operation: listing PRs, fetching diffs, reviewing individual files, reviewing full PRs, and posting comments. No functional overlap.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern in snake_case (list_open_prs, get_pr_diff, review_file, review_pr, post_review_comment), making them predictable.

Tool Count5/5

Five tools is appropriate for a focused PR review server—enough to cover core functionality without being excessive or thin.

Completeness4/5

Covers the full review workflow (list, diff, review file, review PR, post comment). Lacks tools for approval or dismissal, but those are outside the stated scope.

Maintenance

ActivityStale
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    An MCP server that enables AI agents to retrieve detailed GitHub Pull Request information using git commit hashes, branch names, or PR numbers. It automatically detects repositories and extracts comprehensive PR data including descriptions, labels, and reviews via the GitHub CLI.
    1
    7
    ISC
  • A
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that enables AI agents to directly manage GitHub repositories, including PRs, issues, and code search, using natural language.
    MIT