Code Review Agent MCP
Code Review Agent MCP
코드 리뷰를 미사여구 없이 하는 AI 에이전트. 코드가 나쁘면 나쁘다고 말합니다. 직설적으로.
진지한 프로젝트에서 경험 많은 메인테이너가 패치를 리뷰하는 방식, 즉 기술적으로, 직접적으로, 외교적 수사 없이 코드를 리뷰하는 AI 기반 MCP(Model Context Protocol) 서버입니다.
기능
AI 코드 리뷰 — 코드 스니펫, 파일, git diff, 커밋을 리뷰합니다.
CRITICAL,MAJOR,MINOR,NIT,CLEAN심각도 라벨로 결과를 반환합니다.모든 발견 사항에 대해 특정 줄 번호를 인용합니다.
왜 문제인지 설명한 다음, 어떻게 고칠지 제시합니다.
"Ship it." 또는 "Do not merge until..." 같은 명확한 결론으로 끝맺습니다.
거짓 칭찬 없음. 얼버무림 없음. 사과 없음. 군더더기 없음.
Related MCP server: greybeard
왜?
대부분의 AI 코드 리뷰어는 예의 바르게 훈련되어 있습니다. "훌륭한 작업이지만..."으로 비판을 시작하고, "고려해 볼 수도 있습니다"라고 얼버무리며, "잠재적으로 문제가 될 수 있습니다"라고 발견 사항을 순화합니다.
그것은 진지한 코드 리뷰가 작동하는 방식이 아닙니다. 실제 프로젝트(Linux kernel, PostgreSQL, Redis, SQLite)에서 메인테이너는 패치를 직접 리뷰합니다. 문제를 찾아 명확히 지적합니다. 그들은 작성자의 기분을 좋게 만들기 위해 존재하는 것이 아니라 코드를 더 좋게 만들기 위해 존재합니다.
이 MCP는 그 전통을 구현합니다. 성격이 곧 제품입니다.
안티-RLHF 엔지니어링
LLM은 예의 바르게 RLHF 훈련을 받습니다. 이 AI 에이전트는 세 가지 계층으로 이에 맞섭니다:
시스템 프롬프트 — 12가지 핵심 원칙(코드가 아닌 코드 작성자, 결론 우선, 심각도 라벨, 줄 인용, 거짓 칭찬 금지, 얼버무림 금지, 사과 금지, 군더더기 금지, 2인칭, 인구통계 언급 금지, 거절 금지, 환각 버그 금지)
후처리기 — LLM 출력에서 40개 이상의 금지 문구(얼버무림, 순화 표현, 사과, 군더더기)를 제거합니다.
검증기 — 출력에 심각도 라벨, 줄 인용, 결론이 있는지 확인하고, 모호한 문제 진술을 환각 신호로 표시합니다.
도구
도구 | 설명 |
| 코드 스니펫 리뷰 |
| 디스크의 파일 리뷰(샌드박스 적용) |
| git diff 리뷰 |
| git 커밋 리뷰 ( |
| 정의와 함께 심각도 라벨 나열 |
직설성 수준
수준 | 동작 |
| 표현을 약간 순화합니다. 모든 발견 사항은 여전히 보고합니다. |
| 기본 직설 리뷰. 직접적, 기술적, 외교 없음. |
| 순화 없음. "이건 바꿔야 합니다."가 아니라 "이건 틀렸습니다." |
| 최대 직설. 짧은 문장. 명령형 어조. |
설치
pip install code-review-agent-mcp또는 uv 사용:
uv pip install code-review-agent-mcp설정
Claude Desktop
claude_desktop_config.json에 추가:
{
"mcpServers": {
"code-review-agent": {
"command": "python",
"args": ["-m", "code_review_agent.server"]
}
}
}또는 pip으로 설치한 경우:
{
"mcpServers": {
"code-review-agent": {
"command": "code-review-agent-mcp"
}
}
}Cursor
.cursor/mcp.json에 추가:
{
"mcpServers": {
"code-review-agent": {
"command": "python",
"args": ["-m", "code_review_agent.server"]
}
}
}사용 예시
코드 스니펫 리뷰
User: Review this code for me
def get_user(username):
import sqlite3
conn = sqlite3.connect("users.db")
cursor = conn.cursor()
query = f"SELECT * FROM users WHERE username = '{username}'"
cursor.execute(query)
return cursor.fetchone()MCP 응답:
## Code Review: snippet
### Findings
**CRITICAL** `snippet:7` — SQL injection
The query uses an f-string with user input, allowing SQL injection. Use parameterized queries: `cursor.execute("SELECT * FROM users WHERE username = ?", (username,))`.
### Verdict
Do not merge until CRITICAL is fixed.파일 리뷰
User: Review src/auth.py
MCP calls review_file with file_path="src/auth.py"
Returns blunt review with line citations.커밋 리뷰
User: Review the last commit
MCP calls review_commit with commit_ref="HEAD"
Returns blunt review of the diff.심각도 라벨
라벨 | 사용 시점 |
CRITICAL | 보안 취약점, 데이터 손실, 교착 상태, RCE, 배송 시 깨지는 모든 것 |
MAJOR | 논리 오류, 경쟁 조건, 리소스 누수, 깨진 엣지 케이스, 잘못된 추상화 |
MINOR | 스타일, 명명, 누락된 테스트, 중복 코드, 취약한 가정 |
NIT | 외관, 포맷, 주석 문구 |
CLEAN | 섹션이 괜찮을 때 명시적으로 언급. 발명된 버그 편향을 방지합니다. |
보안
이 MCP 서버는 보안 샌드박싱을 구현합니다:
파일 접근은 기본적으로 현재 작업 디렉토리로 제한됩니다.
민감한 경로(
.ssh,.aws,.env,/etc/passwd등)는 거부됩니다.Git refs는 옵션 주입을 방지하기 위해 엄격한 문자 화이트리스트로 검증됩니다.
서브프로세스 호출은
shell=False를 사용하고 전역 git 설정을 비활성화합니다.
전체 위협 모델은 SECURITY.md를 참조하세요.
개발
# Install in development mode
pip install -e ".[dev]"
# Run tests
pytest
# Run tests with coverage
pytest --cov=code_review_agent벤치마크 스니펫
benchmarks/ 디렉토리에는 리뷰어를 검증하는 5개의 회귀 스니펫이 있습니다:
SQL 인젝션 — CRITICAL, 줄 인용, "Do not merge" 기대
가변 기본 인자 — MAJOR 기대
깨끗한 코드(이진 탐색) — CLEAN, "Ship it" 기대(안티-환각 테스트)
삼켜진 예외 — MAJOR 기대
오프바이원 — MAJOR 기대
깨끗한 코드 벤치마크가 가장 중요합니다. 환각을 잡아내기 때문입니다. 리뷰어가 올바른 코드에서 버그를 발명한다면 안티-RLHF 시스템이 고장난 것입니다.
라이선스
MIT
감사의 말
이 프로젝트는 커널 메인테이너의 코드 리뷰 전통을 구현합니다. 이 방법론은 많은 프로젝트(Linux kernel, PostgreSQL, Redis, SQLite 등)의 많은 시니어 엔지니어가 실천해 온 것입니다. 우리는 특정 개인이 아닌 그 전통을 인용합니다.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
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 Connectors
An MCP server that automatically collects feedback on your MCP server.
An MCP server that integrates with Discord to provide AI-powered features.
Vet any MCP server before you depend on it. Stamp: PASS, REVIEW, or BLOCK.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceAn MCP server that reviews code with the sarcastic and cynical tone of a grumpy senior developer, helping identify issues in PRs and providing feedback on code quality.1921MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that provides AI-powered code review and architecture analysis, simulating the perspective of an experienced staff engineer. It integrates with IDEs to review diffs, design decisions, and tradeoffs through natural language.1MIT
- AlicenseNot gradedqualityFmaintenanceAn MCP server that provides senior-level code review, quality checks, security analysis, and refactoring suggestions directly in your editor.1MIT
- AlicenseAqualityBmaintenanceAn MCP server that lets AI agents review code using language models, supporting git diffs, files, and snippets with severity levels. Works with Ollama (local) and hosted providers like OpenAI, Anthropic, and OpenRouter.3MIT
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/frangelbarrera/code-review-agent-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server