mcpField
πŸ€–
πŸ€– AI Code Review MCP Server

πŸ€– AI Code Review MCP Server

Local
github.com/wn01011Version Control0Updated 73w ago

About πŸ€– AI Code Review MCP Server

AI Code Review MCP Server analyzes GitHub pull requests by commit type, assessing quality, security, and performance. It is for teams reviewing code changes and also provides consolidated review checklists and Markdown reports.

Key features

  1. 01Commit-type-specific PR analysis
  2. 02Quality scoring for maintainability and complexity
  3. 03Security vulnerability checks
  4. 04Performance impact analysis
  5. 05Consolidated reviews and Markdown reports

Use cases

  1. 01Reviewing a GitHub pull request before merging
  2. 02Checking changes against commit-type guidance
  3. 03Producing a consolidated review report

MCP support

It exposes PR analysis and review capabilities as MCP tools, including `analyze_pr`, for MCP clients.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

πŸ€– 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 뢄석
  1. μ €μž₯μ†Œ μž…λ ₯: owner/repo ν˜•μ‹μœΌλ‘œ μž…λ ₯
  2. PR 번호 μž…λ ₯: 뢄석할 PR 번호 μž…λ ₯
  3. 컀밋 νƒ€μž… 선택: μ μ ˆν•œ 컀밋 νƒ€μž… 선택
  4. 뢄석 μ‹€ν–‰: "PR 뢄석" λ²„νŠΌ 클릭
톡합 리뷰 체크
  1. PR 뢄석이 μ™„λ£Œλœ ν›„ "톡합 리뷰 체크" λ²„νŠΌ 클릭
  2. λͺ¨λ‹¬μ—μ„œ 컀밋 νƒ€μž…λ³„ 뢄석 κ²°κ³Ό 확인
  3. 톡합 리뷰 κ°€μ΄λ“œ 확인
  4. 체크리슀트λ₯Ό ν†΅ν•œ 리뷰 μ§„ν–‰

πŸ”§ 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 μ„€μ •

  1. GitHub μ €μž₯μ†Œ β†’ Settings β†’ Webhooks
  2. Payload URL: https://your-domain.com/webhook
  3. Content type: application/json
  4. Events: Pull requests
  5. 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 = {}) {
  // ν’ˆμ§ˆ 점수 계산 둜직 μ»€μŠ€ν„°λ§ˆμ΄μ§•
}

🚨 문제 ν•΄κ²°

일반적인 문제
  1. CLAUDE_API_KEY 였λ₯˜

    • Claude API ν‚€κ°€ μ˜¬λ°”λ₯Έμ§€ 확인
    • ν‚€μ˜ κΆŒν•œκ³Ό μž”μ•‘ 확인
  2. GITHUB_TOKEN 였λ₯˜

    • GitHub Personal Access Token 확인
    • repo κΆŒν•œμ΄ μžˆλŠ”μ§€ 확인
  3. PR 뢄석 μ‹€νŒ¨

    • PR이 μ‘΄μž¬ν•˜λŠ”μ§€ 확인
    • μ €μž₯μ†Œ μ ‘κ·Ό κΆŒν•œ 확인
둜그 확인
# 개발 λͺ¨λ“œμ—μ„œ 상세 둜그 확인
DEBUG=* npm run dev

# ν”„λ‘œλ•μ…˜ 둜그 확인
docker-compose logs ai-review

πŸ“ κΈ°μ—¬ν•˜κΈ°

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ λΌμ΄μ„ μŠ€

MIT License - μžμ„Έν•œ λ‚΄μš©μ€ LICENSE νŒŒμΌμ„ μ°Έμ‘°ν•˜μ„Έμš”.

πŸ™ κ°μ‚¬μ˜ 말


Made with ❀️ by κΉ€μ •κ·œ

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.