Skip to main content

GitHub PR Review Context MCP Server

Project description

GitHub PR Review Context MCP

Python Protocol Data Source Vector Store Inference License: MIT Status Downloads

Production-grade context layer for AI code review, grounded in your repository's real pull request history.

🚀 Quick Start

🚀 Zero-Setup (uvx / pipx / npx)

The fastest way to use the server. No cloning required. Just run one of these commands directly in your terminal or use them in your IDE's MCP settings:

[!TIP] Don't clone this repo to get AI rules! Once installed, run generate_repo_rules inside YOUR project to automatically create .cursorrules or CLAUDE.md tailored to your own team's PR history.

Using uvx (Recommended for speed):

uvx github-pr-context-mcp

Using pipx (Recommended for stability):

pipx run github-pr-context-mcp
# Or install permanently:
pipx install github-pr-context-mcp

Using npx (Smithery bridge):

npx -y @smithery/cli run github-pr-context-mcp

⚠️ Manual Installation (Git Clone / Advanced)

[!WARNING] Running from a git clone is only recommended for developers contributing to this project. For general use, please use the pipx method above.

If you have cloned the repository for development:

  1. Create a virtual environment: python -m venv .venv
  2. Activate it and install: pip install -e .
  3. Run automatic setup: python scripts/install_clients.py

For full configuration (Cursor, Claude Desktop), see the Quick Start Guide.


Overview

GitHub PR Review Context MCP gives AI assistants institutional review memory.

Instead of generic feedback, reviews are informed by historical reviewer comments, recurring quality patterns, and repository-specific standards from your own PR history.

Core Value

  • Improves review consistency across teams and repositories.
  • Reduces repeated reviewer feedback on known issues.
  • Integrates with any MCP-compatible client and multiple LLM providers.

🛠️ Usage Modes: Solo vs. Team

This MCP server is built to scale from a single machine to an entire engineering organization.

👤 Solo Developer (Local Mode)

Best for: Privacy, local-first control, and zero hosting costs.

  • How it works: Run via uvx, pipx, or a local git clone.
  • Storage: ChromaDB stays on your local machine.
  • Security: Your GitHub Token and LLM keys never leave your device.
  • Setup: See Quick Start.

🤝 Team Collaboration (Hosted Mode - UPCOMING)

Best for: Scaling team-wide PR standards and centralized infra.

  • How it works: One deployment on Render (Coming Soon) shared by the whole team.
  • Isolation: Strict Gmail-based namespace isolation (driven by SQLite). User A's indexed data is mathematically invisible to User B.
  • Economics: Pooled LLM credits and a single shared indexing server.
  • Setup: See Deployment Guide.

🌟 Zero-Friction Setup (Upcoming)

If your team has Hosted this MCP on Render, you do NOT need to git clone or install anything. You just drop a snippet into your IDE:

"github-pr-context": {
  "type": "sse",
  "url": "https://YOUR-RENDER-URL.onrender.com/mcp",
  "headers": {
    "Authorization": "Bearer YOUR_TOKEN"
  }
}

That's it. If your IDE supports native MCP SSE connections, you are immediately connected to the secure Render deployment. No setup friction, no tools required.


[!IMPORTANT] 🚀 USE THE OFFICIAL PACKAGE: This project is now on PyPI. To ensure seamless updates and zero configuration friction, do NOT git clone.

Recommended Install:

pipx install github-pr-context-mcp

Or run instantly with: uvx github-pr-context-mcp

GitHub PR Context MCP Tools


Key Capabilities

Capability What It Delivers
Historical review retrieval Semantic search across prior PR comments and review summaries
Context-aware AI review Feedback grounded in repository-specific review behavior
Grounded code generation Generate new code based on past commits, comments, and style
Team rules generation Auto-generate .cursorrules / CLAUDE.md from repo history
Smart repository readiness Auto-detect indexed state and index on demand
Flexible storage modes Permanent (disk) and temporary (in-memory) indexing options
Portable inference layer Switch LLM providers using environment configuration only

🧰 Core Tools Reference

The server exposes 12 core tools for IDE agents and developers. For a deep dive on when to use each, see the Tool Strategy Guide.

Tool Action
ensure_repo_ready Index a repo and ensure it's ready for queries
generate_repo_rules Synthesize .cursorrules / CLAUDE.md from PR history
generate_code_from_history Write code grounded in past commits & team style
review_code_with_history Perform AI review grounded in team review memory
get_team_review_patterns Summarize recurring team standards (e.g. "no magic numbers")
semantic_search_reviews Search past PR comments by meaning, not just keywords
set_active_repo Switch between multiple indexed repositories
list_indexed_repos View all repos currently in local/temporary storage
delete_repo_index Free up disk space by clearing repository indices
get_index_stats Verify if a repo index is complete (doc count)
update_settings Update tokens/LLM keys (Hosted mode only)
get_usage_stats View adoption metrics and unique user counts


📖 Documentation

Detailed guides for deep dives and specific configurations:


📣 Community & Feedback

We want to hear from you—whether you are a solo developer or a team at a large company!

  • Feedback: Please open an issue or start a discussion if you have ideas or encounter bugs.
  • Star ⭐: If this tool saves you time, give it a star! It helps others find the project.
  • Corporate: Is your team using this? Join our "Adopters" list by opening a PR to add your team's name.

🛠️ Troubleshooting

  • "command not found": Use absolute paths in your configuration. Run github-pr-context-mcp config to get your exact path.
  • "PermissionError: [WinError 32]": The binary is locked by a running process. Close Claude/Cursor, run taskkill /F /IM github-pr-context-mcp.exe, then retry the upgrade.
  • Rate Limit Errors: Ensure your GITHUB_TOKEN is valid and has repo scope.

⚖️ License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

github_pr_context_mcp-0.2.7.tar.gz (41.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

github_pr_context_mcp-0.2.7-py3-none-any.whl (41.9 kB view details)

Uploaded Python 3

File details

Details for the file github_pr_context_mcp-0.2.7.tar.gz.

File metadata

  • Download URL: github_pr_context_mcp-0.2.7.tar.gz
  • Upload date:
  • Size: 41.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for github_pr_context_mcp-0.2.7.tar.gz
Algorithm Hash digest
SHA256 c9f4d5955f2890f4a7b3b9b7d702aa502a56d749fffe78fd0a9cd7659e90e9a0
MD5 063c644f119bbe963e1ca9fcabf7acf9
BLAKE2b-256 d2cd50e567efd1a1c37e54b1281d48e4bb82aae723f7220297c0e071e1736e0d

See more details on using hashes here.

File details

Details for the file github_pr_context_mcp-0.2.7-py3-none-any.whl.

File metadata

File hashes

Hashes for github_pr_context_mcp-0.2.7-py3-none-any.whl
Algorithm Hash digest
SHA256 8b0145ee0ccfdebb93db1a06f432b0907391b7fde43990c9334249c77c89dbc6
MD5 8d62718d5440bfe6fecb9f8562cd55bc
BLAKE2b-256 091f43adb274529c4f64a0fcd7aaa22079a90de665d36325501335d90b82d28d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page