- ๐ค AI Code Review MCP Server
๐ค AI Code Review MCP Server
pr ๋ถ์์ ์ข ๋ ํธํ๊ฒ ํ๊ณ ์ ๋ฏธ๋ฆฌ ์์ฑํด์ฃผ๋ mcp ์๋ฒ์
๋๋ค.
Content
๐ค AI Code Review MCP Server
AI ๊ธฐ๋ฐ ์ฝ๋ ๋ฆฌ๋ทฐ์ ํ์ง ๊ด๋ฆฌ๋ฅผ ์ํ MCP(Model Context Protocol) ์๋ฒ์ ๋๋ค.
โจ ์ฃผ์ ๊ธฐ๋ฅ
๐ AI ์ฝ๋ ๋ฆฌ๋ทฐ
- ์ปค๋ฐ ํ์ ๋ณ ๋ถ์: feat, fix, refactor ๋ฑ ํ์ ์ ๋ง๋ ๋ง์ถค ๋ฆฌ๋ทฐ
- ํ์ง ์ ์ ์ฐ์ถ: ๋ณต์ก๋, ์ ์ง๋ณด์์ฑ, ๋ณด์ ๋ฑ ๋ค๊ฐ๋ ํ๊ฐ
- ๋ณด์ ์ทจ์ฝ์ ๊ฒ์ฌ: ์ ์ฌ์ ๋ณด์ ์ด์ ์๋ ํ์ง
- ์ฑ๋ฅ ์ํฅ ๋ถ์: ์ฑ๋ฅ์ ๋ฏธ์น๋ ์ํฅ๋ ํ๊ฐ
๐ ํตํฉ ๋ฆฌ๋ทฐ ์์คํ
- ์ปค๋ฐ ํ์ ๋ณ ๋ถ์: ๊ฐ ์ปค๋ฐ ํ์ ์ ๋ง๋ ๊ฐ๋ณ ๋ถ์
- ํตํฉ ๋ฆฌ๋ทฐ ์ฒดํฌ: ๋ชจ๋ ๋ถ์ ๊ฒฐ๊ณผ๋ฅผ ํ ๋ฒ์ ํ์ธ
- ์ฒดํฌ๋ฆฌ์คํธ ์ ๊ณต: ๋์น๊ธฐ ์ฌ์ด ๋ฆฌ๋ทฐ ํฌ์ธํธ ์ฒดํฌ
- ๋งํฌ๋ค์ด ๋ฆฌํฌํธ: ์ข ํฉ ๋ฆฌ๋ทฐ ๊ฒฐ๊ณผ๋ฅผ ๋งํฌ๋ค์ด์ผ๋ก ์์ฑ
๐ฏ ๋ฆฌ๋ทฐ ๊ฐ์ด๋
- ํ์ ๋ณ ๊ฐ์ด๋: ์ปค๋ฐ ํ์ ์ ๋ง๋ ๋ฆฌ๋ทฐ ๊ฐ์ด๋ ์์ฑ
- ๋ฒ ์คํธ ํ๋ํฐ์ค: ๊ฐ ํ์ ๋ณ ๊ถ์ฅ์ฌํญ ์ ์
- ์ฃผ์์ฌํญ: ์์ฃผ ๋ฐ์ํ๋ ๋ฌธ์ ์ ์ฌ์ ์๋ด
๐ ๋น ๋ฅธ ์์
1. ํ๊ฒฝ ์ค์
# ์ ์ฅ์ ํด๋ก
git clone <repository-url>
cd ai-review-mcp-server
# ์์กด์ฑ ์ค์น
npm install
# ํ๊ฒฝ ๋ณ์ ์ค์
cp .env.example .env
2. ํ๊ฒฝ ๋ณ์ ๊ตฌ์ฑ
# Claude API ์ค์
CLAUDE_API_KEY=sk-ant-api-03-xxx
# GitHub ์ค์
GITHUB_TOKEN=ghp_xxx
GITHUB_WEBHOOK_SECRET=your-webhook-secret
# ์๋ฒ ์ค์
PORT=3001
NODE_ENV=development
3. ์๋ฒ ์์
# ๊ฐ๋ฐ ๋ชจ๋ (์๋ ์ฌ์์)
npm run dev
# ํ๋ก๋์
๋ชจ๋
npm run build
npm start
4. ์น UI ์ ์
๋ธ๋ผ์ฐ์ ์์ http://localhost:3001๋ก ์ ์ํ์ฌ ์น UI๋ฅผ ์ฌ์ฉํ ์ ์์ต๋๋ค.
๐ฅ๏ธ ์น UI ์ฌ์ฉ๋ฒ
PR ๋ถ์
- ์ ์ฅ์ ์
๋ ฅ:
owner/repoํ์์ผ๋ก ์ ๋ ฅ - PR ๋ฒํธ ์ ๋ ฅ: ๋ถ์ํ PR ๋ฒํธ ์ ๋ ฅ
- ์ปค๋ฐ ํ์ ์ ํ: ์ ์ ํ ์ปค๋ฐ ํ์ ์ ํ
- ๋ถ์ ์คํ: "PR ๋ถ์" ๋ฒํผ ํด๋ฆญ
ํตํฉ ๋ฆฌ๋ทฐ ์ฒดํฌ
- PR ๋ถ์์ด ์๋ฃ๋ ํ "ํตํฉ ๋ฆฌ๋ทฐ ์ฒดํฌ" ๋ฒํผ ํด๋ฆญ
- ๋ชจ๋ฌ์์ ์ปค๋ฐ ํ์ ๋ณ ๋ถ์ ๊ฒฐ๊ณผ ํ์ธ
- ํตํฉ ๋ฆฌ๋ทฐ ๊ฐ์ด๋ ํ์ธ
- ์ฒดํฌ๋ฆฌ์คํธ๋ฅผ ํตํ ๋ฆฌ๋ทฐ ์งํ
๐ง API ์๋ํฌ์ธํธ
HTTP API
# PR ๋ถ์
POST /analyze
{
"repo": "owner/repo",
"pr_number": 123,
"commit_type": "feat",
"enable_split": true,
"deep_analysis": false
}
# ๋ฆฌ๋ทฐ ๊ฐ์ด๋ ์์ฑ
POST /review-guide
{
"commit_type": "feat",
"file_changes": ["src/component.tsx"]
}
# ํ์ง ์ ์ ๊ณ์ฐ
POST /quality-score
{
"changes": [...],
"metrics": {}
}
# ํฌ์ค ์ฒดํฌ
GET /health
MCP Tools
// MCP ํด๋ผ์ด์ธํธ์์ ์ฌ์ฉ
{
"method": "tools/call",
"params": {
"name": "analyze_pr",
"arguments": {
"repo": "owner/repo",
"pr_number": 123,
"commit_type": "feat"
}
}
}
๐ณ Docker ์ฌ์ฉ
Docker ๋น๋ ๋ฐ ์คํ
# Docker ์ด๋ฏธ์ง ๋น๋
npm run docker:build
# Docker ์ปจํ
์ด๋ ์คํ
npm run docker:run
Docker Compose
# ์ ์ฒด ์คํ ์คํ
docker-compose up -d
# ๋ก๊ทธ ํ์ธ
docker-compose logs -f ai-review
โ๏ธ GitHub Webhook ์ค์
- GitHub ์ ์ฅ์ โ Settings โ Webhooks
- Payload URL:
https://your-domain.com/webhook - Content type:
application/json - Events:
Pull requests - Secret:
.env์GITHUB_WEBHOOK_SECRET๊ฐ
๐ ์๋ต ํ์
PR ๋ถ์ ์๋ต
{
"success": true,
"pr_number": 123,
"repo": "owner/repo",
"analyzed_at": "2024-06-04T10:30:00Z",
"by_commit_type": {
"feat": {
"analysis": {
"summary": "์๋ก์ด ๊ธฐ๋ฅ ๋ถ์ ์์ฝ",
"quality_score": 87,
"review_points": ["...", "..."],
"suggestions": ["...", "..."],
"security_concerns": ["..."],
"performance_impact": ["..."]
},
"guide": {
"title": "์๋ก์ด ๊ธฐ๋ฅ ๊ฐ๋ฐ ๋ฆฌ๋ทฐ ๊ฐ์ด๋",
"checklist": ["...", "..."],
"focus_areas": ["...", "..."],
"common_issues": ["...", "..."],
"best_practices": ["...", "..."]
}
}
},
"summary_review": {
"markdown": "# ๐ PR ์ข
ํฉ ๋ฆฌ๋ทฐ\n\n..."
}
}
๐ ๏ธ ์ปค์คํฐ๋ง์ด์ง
๋ฆฌ๋ทฐ ํ ํ๋ฆฟ ์์
src/handlers/claude-client.ts์์ ํ๋กฌํํธ ํ
ํ๋ฆฟ์ ์์ ํ ์ ์์ต๋๋ค:
private getCommitTypeGuidelines(commitType: string): string {
// ์ปค๋ฐ ํ์
๋ณ ๊ฐ์ด๋๋ผ์ธ ์ปค์คํฐ๋ง์ด์ง
}
ํ์ง ์ ์ ๊ธฐ์ค ์กฐ์
src/handlers/pr-analyzer.ts์์ ํ์ง ์ ์ ๊ณ์ฐ ๋ก์ง์ ์์ ํ ์ ์์ต๋๋ค:
async calculateQualityScore(changes: any[], metrics: any = {}) {
// ํ์ง ์ ์ ๊ณ์ฐ ๋ก์ง ์ปค์คํฐ๋ง์ด์ง
}
๐จ ๋ฌธ์ ํด๊ฒฐ
์ผ๋ฐ์ ์ธ ๋ฌธ์
-
CLAUDE_API_KEY ์ค๋ฅ
- Claude API ํค๊ฐ ์ฌ๋ฐ๋ฅธ์ง ํ์ธ
- ํค์ ๊ถํ๊ณผ ์์ก ํ์ธ
-
GITHUB_TOKEN ์ค๋ฅ
- GitHub Personal Access Token ํ์ธ
- repo ๊ถํ์ด ์๋์ง ํ์ธ
-
PR ๋ถ์ ์คํจ
- PR์ด ์กด์ฌํ๋์ง ํ์ธ
- ์ ์ฅ์ ์ ๊ทผ ๊ถํ ํ์ธ
๋ก๊ทธ ํ์ธ
# ๊ฐ๋ฐ ๋ชจ๋์์ ์์ธ ๋ก๊ทธ ํ์ธ
DEBUG=* npm run dev
# ํ๋ก๋์
๋ก๊ทธ ํ์ธ
docker-compose logs ai-review
๐ ๊ธฐ์ฌํ๊ธฐ
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
๐ ๋ผ์ด์ ์ค
MIT License - ์์ธํ ๋ด์ฉ์ LICENSE ํ์ผ์ ์ฐธ์กฐํ์ธ์.
๐ ๊ฐ์ฌ์ ๋ง
- Anthropic - Claude API ์ ๊ณต
- Model Context Protocol - MCP ํ๋ ์์ํฌ
- GitHub - GitHub API ์ ๊ณต
Made with โค๏ธ by ๊น์ ๊ท
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Amap Maps้ซๅพทๅฐๅพๅฎๆน MCP Server
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
CursorThe AI Code Editor
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Serper MCP ServerA Serper MCP Server
Baidu Map็พๅบฆๅฐๅพๆ ธๅฟAPI็ฐๅทฒๅ
จ้ขๅ
ผๅฎนMCPๅ่ฎฎ๏ผๆฏๅฝๅ
้ฆๅฎถๅ
ผๅฎนMCPๅ่ฎฎ็ๅฐๅพๆๅกๅใ
Tavily Mcp
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Howtocook McpๅบไบAnduin2017 / HowToCook ๏ผ็จๅบๅๅจๅฎถๅ้ฅญๆๅ๏ผ็mcp server๏ผๅธฎไฝ ๆจ่่่ฐฑใ่งๅ่ณ้ฃ๏ผ่งฃๅณโไปๅคฉๅไปไนโ็ไธ็บช้พ้ข๏ผ
Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
Playwright McpPlaywright MCP server
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
WindsurfThe new purpose-built IDE to harness magic
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
DeepChatYour AI Partner on Desktop
ChatWiseThe second fastest AI chatbotโข