Multi-Server FastMCP PR Reviewer
Multi-Server 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: orchestrator-mcp
프로젝트 구조
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/min 예산을 공유하므로, 세분화된 제한이 필요한 경우 도구별 또는 클라이언트별 버킷으로 분할하세요.secure_tool은 FastAPI의HTTPException을 발생시키는데, 이는 FastMCP 전송이 실제로 FastAPI/ASGI 뒤에서 실행되는 경우에만 HTTP 상태 코드로 깔끔하게 매핑됩니다. 일반 stdio로 서버를 실행하는 경우 MCP 계층에서 이를 캐치하거나 전송에 적합한 예외로 대체하세요..env에서MCP_API_KEY,GITHUB_TOKEN,GROQ_API_KEY를 실제 비밀 관리자로 교체하세요..env는 개발 환경에서만 사용하는 것이 좋습니다.GitHub의 코드 검색 API는 코어 API보다 훨씬 낮은 제한이 적용됩니다(30 req/min 대 5,000 req/hr). 부하가 걸리면
search_repo_code가 먼저 이 제한에 도달할 것입니다.
This server cannot be deployed
Maintenance
Related MCP Connectors
LLM cost optimization gateway, repo token-waste auditor & model arbitrage MCP server.
LLM cost optimization gateway, repo token-waste auditor & model arbitrage MCP server.
AI-native git hosting — repos, PRs, issues, CI gates, and AI code review over MCP (60 tools).
MCP server connecting AI agents to 100+ apps (Gmail, Slack, Notion, GitHub) via one-click OAuth.
Related MCP Servers
- AlicenseBqualityCmaintenanceMCP server that exposes GitHub operations as tools for AI agents, enabling code search, issue management, and PR review.1233 PyPIMIT
- FlicenseNot gradedqualityCmaintenanceMulti-model agent orchestration MCP server that enables plan-code-review-deliver pipelines with configurable providers and models.-

ThinkReview MCPofficial
AlicenseNot gradedqualityBmaintenanceHosted MCP server that enables AI code reviews on GitHub, GitLab, Azure DevOps, and Bitbucket PR/MR URLs via a single tool (review_url_code), integrating with Cursor, Claude Code, Claude Desktop, and GitHub Copilot through OAuth or Bearer token authentication.1MIT- FlicenseAqualityCmaintenanceAn MCP server that brings GitHub workflow tools (repo, PR, issue, CI) and cost-free LLM-powered engineering tools (PR review, issue triage, commit messages) to any MCP client via the Groq free tier.17-