Multi-Server FastMCP PR Reviewer
多服务器 FastMCP PR 审查器
零成本、多服务器的模型上下文协议(MCP)套件,包含统一网关和基于 LangGraph 的自动化 PR 审查代理。所使用的每个工具/API 均可免费使用(GitHub PAT、Groq LLM)。
架构
Claude Desktop / Agent
|
v
FastMCP Gateway (namespaces: code., gh., doc. — dot-separated per MCP tool-naming spec)
/ | \
v v v
Code GitHub Documentation
Intel Server Server (Groq)
(AST+Radon)(PyGithub)
\ | /
Shared Security & Audit Layer
(API key auth, SQLite WAL, rate limiting)Related MCP server: GitHub MCP Agent Server
项目布局
mcp-pr-reviewer/
├── core/
│ └── security.py # auth + rate limit + SQLite audit decorator
├── servers/
│ ├── code_server.py # AST/radon static analysis (no external API)
│ ├── github_server.py # PyGithub-backed PR/issue/commit tools
│ └── doc_server.py # Groq-backed docstring/README/API doc generation
├── gateway/
│ └── gateway.py # unifies all three servers under code:/gh:/doc: namespaces
├── agent/
│ └── workflow.py # LangGraph PR-review pipeline (fetch → analyze → doc → publish)
├── data/ # SQLite audit_log.db lives here (gitignored)
├── docker-compose.yml
├── Dockerfile
├── requirements.txt
├── .env.example
└── claude_desktop_config.example.json设置
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .env
# edit .env with your real MCP_API_KEY, GITHUB_TOKEN, GROQ_API_KEY在本地运行任何内容之前,加载环境变量,例如:
export $(grep -v '^#' .env | xargs) # macOS/Linux运行
独立服务器(stdio,用于本地测试)
python servers/code_server.py
python servers/github_server.py
python servers/doc_server.py网关
fastmcp run gateway/gateway.py:gatewayDocker
docker compose up --buildClaude Desktop 集成
将 claude_desktop_config.example.json 复制到您的 Claude Desktop 配置(claude_desktop_config.json)中,修复 gateway/gateway.py 的绝对路径,并填写真实的凭据。重新启动 Claude Desktop 以生效。
测试清单
1. 模式验证
fastmcp inspect servers/code_server.py
fastmcp inspect servers/github_server.py
fastmcp inspect servers/doc_server.py2. 安全/审计验证
# Should raise 401 Unauthorized
CLIENT_API_KEY=wrong_key python -c "from servers.code_server import analyse_code; analyse_code('x = 1')"
# Inspect the WAL SQLite audit log
sqlite3 data/audit_log.db "SELECT * FROM access_log ORDER BY id DESC LIMIT 5;"3. 端到端 PR 审查
python -c "
import asyncio
from agent.workflow import app
async def run():
result = await app.ainvoke({
'repo': 'your-username/your-repo',
'pr_number': 1
})
print('Review published:', result['issue_url'])
asyncio.run(run())
"在生产环境中依赖此项目前需要再次确认的注意事项
core/security.py中的bucket是单个进程范围内的TokenBucket——同一服务器上的每个工具共享同一个 60/分钟 的配额。如果需要更细粒度的限制,请拆分为每个工具或每个客户端的桶。secure_tool会引发 FastAPI 的HTTPException,只有当您运行的 FastMCP 传输实际位于 FastAPI/ASGI 之后时,它才能干净地映射到 HTTP 状态码。如果您通过普通 stdio 运行服务器,请在 MCP 层捕获此异常,或将其替换为适合传输的异常。在任何非本地部署之前,将
MCP_API_KEY、GITHUB_TOKEN和GROQ_API_KEY从.env中轮换到真正的密钥管理器——.env仅适用于开发环境。GitHub 的代码搜索 API 的速率限制比核心 API 低得多(30 请求/分钟 vs 5,000 请求/小时)——
search_repo_code在高负载下会首先达到该上限。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityCmaintenanceMCP server that equips AI agents with dev workflow tools including GitHub project management, conventional commits, visual regression testing, Jira/Confluence integration, and a persistent memory knowledge graph.25MIT
- AlicenseBqualityAmaintenanceMCP server that exposes GitHub operations as tools for AI agents, enabling code search, issue management, and PR review.12MIT
- Flicense-qualityDmaintenanceAn MCP server that automates pull request reviews using multiple LLM providers (OpenAI, Claude, Gemini, Groq, Perplexity) and supports GitHub and Bitbucket with real-time webhook integration and interactive AI assistant commands.1
- Flicense-qualityCmaintenanceMulti-model agent orchestration MCP server that enables plan-code-review-deliver pipelines with configurable providers and models.
Related MCP Connectors
Hosted MCP server for structured code review passes on human- and AI-written code. Free tier.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
One PAT, any MCP agent: Vercel, GitHub, Cloudflare, Supabase, GCP — unified dev infra gateway.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/AmaimaKhalidSethi/MCP-PR-REVIEWER'
If you have feedback or need assistance with the MCP directory API, please join our Discord server