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
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。