MCP GitHub PR Reviewer
This server enables AI agents to delegate GitHub pull request diffs for automated security auditing, returning structured vulnerability and architecture feedback while routing requests through a resilient multi-provider fallback pipeline.
README
module_type: MCP Server status: Active protocol: MCP / JSON-RPC / stdio primary_capability: Automated security reviews for GitHub PR diffs with deep fallback redundancy requires: python 3.12+, Cloudflare Workers AI token, Poolside token works_with: Google Antigravity, Telegram Agent, Cloudflare, Poolside, OpenRouter last_verified: 2026-08-21
MCP GitHub PR Reviewer
A Universal Fallback MCP Server that provides highly resilient automated GitHub Pull Request security reviews.
Status and Last Verified Date
Status: Active
Last Verified Date: 2026-08-21
What it does / does not do
What it does:
- Implements an MCP Server exposing the
audit_prtool to AI agents. - Processes code diffs and returns structured security vulnerabilities and architecture feedback in JSON format.
- Automatically routes and cascades LLM requests across a 14-layer failover pipeline to ensure 100% uptime.
- Balances load and failovers between Cloudflare Workers AI, Poolside Native, and OpenRouter API endpoints.
What it does not do:
- It does not automatically merge PRs or act on the code itself (it acts purely as an analytical auditor).
- It does not manage GitHub API tokens directly for fetching; diffs are expected to be provided by the calling agent.
Why an agent would use it
Agents use this MCP server to offload computationally heavy code review tasks to specialized external LLMs without having to manage tokens, fallback logic, or retry loops themselves. The agent simply provides the diff, and the MCP server guarantees a high-quality review.
Architecture and dependencies
Architecture:
- Universal Fallback Engine: A state-machine (
engine.py) that iterates through any configured OpenAI-compatible LLM endpoints and key pools. - Provider Pipeline (Configurable):
You can configure your own cascading provider pipeline using the
FALLBACK_PROVIDERSenvironment variable (JSON array).- Example Config: Try local Ollama first, then DeepSeek, then OpenRouter.
- Legacy Lab Support: If
FALLBACK_PROVIDERSis empty, it automatically degrades to TheNovaNodes lab defaults (Cloudflare -> Poolside -> OpenRouter) using legacy regex parsing. - MCP Protocol Layer: Uses standard
stdioJSON-RPC for MCP server execution (server.py).
Dependencies:
mcp(official Python SDK)- Standard Python
urllib(no third-party HTTP clients required) pytest(for tests)
Compatibility
- Python 3.12+
- Linux/Unix environments
Quick start and health check
Quick Start:
git clone https://github.com/TheNovaNodes/mcp-gh-pr-reviewer.git
cd mcp-gh-pr-reviewer
python3 -m venv .venv
source .venv/bin/activate
pip install mcp
# Ensure vault tokens are populated in /dev/shm/agent_vault/
./run_mcp.sh
Health Check: To verify the engine initialization and API connections, run:
python3 test_fallback.py
This triggers a simulated PR diff audit to test the cascade without exposing the server to an MCP client.
Configuration and environment variables
| Variable | Description |
|---|---|
FALLBACK_PROVIDERS |
JSON array of providers. Example: [{"name": "Local", "url": "http://127.0.0.1:11434/v1/chat/completions", "model": "qwen2.5-coder", "keys_env": "LOCAL_TOKENS"}] |
CF_TOKENS |
(Legacy Mode) Cloudflare tokens and Account IDs. |
PS_TOKENS |
(Legacy Mode) Poolside API keys. |
OR_TOKENS |
(Legacy Mode) OpenRouter API keys. |
Complete MCP tool/API table with side effects
| Server Key | Name | Type | Plane | Side Effects / Actions |
|---|---|---|---|---|
universal-pr-auditor |
PR Auditor (Universal) | audit | data | Reads diffs, queries external LLMs via HTTP, returns JSON. |
Security model and trust boundaries
- Secrets Management: The server reads secrets dynamically from the RAM disk (
/dev/shm/agent_vault/) via therun_mcp.shwrapper. No secrets are ever hardcoded in the Python source code or git history. - Execution: Runs as a standard local process communicating over
stdio. Does not expose any open network ports locally.
Tests and exact commands
To run tests using pytest:
python3 -m pytest test_engine.py
This suite tests the key extraction, parsing, and engine routing logic without burning actual LLM tokens.
Operations, logs, backup/restore, rollback
- Operations: The server is executed contextually by the
antigravity-telegram-agentusingrun_mcp.sh. - Logs: Engine logs (fallbacks, HTTP errors) are printed to
stderrand intercepted by the agent's MCP manager. - Backup/Restore: No persistent state is stored by this server.
- Rollback:
git checkout main && git reset --hard <hash>
Generic MCP-client example
Example JSON-RPC payload to trigger an audit:
{
"jsonrpc": "2.0",
"id": 1,
"method": "callTool",
"params": {
"name": "audit_pr",
"arguments": {
"diff_content": "+ def bypass_auth():\n+ return True"
}
}
}
Limitations and roadmap
Limitations:
- OpenRouter free models have strict rate limits and may fail frequently (handled gracefully by the engine).
- Diffs larger than 128K tokens may be truncated by the LLM providers.
Roadmap:
- Add native GitHub PR fetching capabilities (currently relying on the caller agent to provide the diff).
Related TheNovaNodes modules
- Antigravity Telegram Agent
- Google Jules MCP modules
License
MIT License
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.