mcp-agent-review
Supports GitHub Models as a free inference provider, enabling code review via GitHub token authentication and automatically reading git diffs from repositories.
Integrates with OpenAI-compatible APIs to perform deep code review, analyzing logic errors, architecture issues, and security risks using configurable models like GPT-4o.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-agent-reviewReview my current changes"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-agent-review
An MCP (Model Context Protocol) server that provides agentic code review powered by OpenAI-compatible models. Designed for use with Claude Code.
Features
Deep analysis — focuses on logic errors, architecture issues, doc-code consistency, and security risks (not style/lint)
Agentic review — the model can read files, grep code, check git blame, explore project structure, and search git history to verify findings
False-positive suppression — mandatory tool verification, confidence rating, and self-critique phase
Intent-aware review — pass
task_descriptionto catch mismatches between intent and implementationDirected focus — pass
review_focusto get deeper analysis on a specific dimension (security, performance, concurrency, etc.)Any OpenAI-compatible API — works with GitHub Models (free), OpenAI, Azure OpenAI, or any compatible provider
Zero config for git repos — auto-detects diffs, reads CLAUDE.md for project context
Sensitive file protection — blocks access to
.env,*.pem,*.key, credentials, and other sensitive files
Installation
# From PyPI
pip install mcp-agent-review
# From source
git clone https://github.com/lzx1413/mcp-agent-review
cd mcp_agent_review
pip install .Claude Code Integration
Add to your Claude Code settings (~/.claude.json or .claude/settings.json):
GitHub Models (free)
{
"mcpServers": {
"code-review": {
"command": "mcp-agent-review",
"env": {
"GITHUB_TOKEN": "your-github-token"
}
}
}
}OpenAI (or other providers)
{
"mcpServers": {
"code-review": {
"command": "mcp-agent-review",
"env": {
"OPENAI_API_KEY": "your-api-key",
"OPENAI_BASE_URL": "https://api.openai.com/v1",
"REVIEW_MODEL": "gpt-4o"
}
}
}
}Environment Variables
Variable | Required | Default | Description |
| Yes* | — | GitHub personal access token (free via GitHub Models) |
| Yes* | — | API key for OpenAI or compatible provider (takes priority over |
| No |
| Base URL for the API |
| No |
| Model to use for review |
| No |
| Max agentic tool-use rounds |
| No |
| Max lines to read per file |
*One of GITHUB_TOKEN or OPENAI_API_KEY is required.
Tool Parameters
Parameter | Required | Description |
| No | Custom diff string. If omitted, auto-reads from |
| No | Base branch/commit for PR review (e.g. |
| No | What the changes are intended to accomplish (e.g. |
| No | Specific dimension to prioritize (e.g. |
Usage
Once configured in Claude Code, the review_code tool is available:
Auto-detect changes: just call
review_codewith no arguments — it readsgit diffPR review: pass
base='main'to review all changes since diverging from mainCustom diff: pass a diff string directly via the
diffparameterIntent-aware review: pass
task_descriptionto describe what the changes are for — helps catch gaps between intent and implementationDirected focus: pass
review_focus(e.g.'security','performance') to get deeper analysis on a specific dimension
Example prompts in Claude Code
Review my current changesReview the changes on this branch against mainReview my changes, the task is to fix the race condition in the connection pool, focus on concurrency safetyHow It Works
Context collection — reads CLAUDE.md, git log, commit messages, and full source of changed files
Agentic review — sends context + diff to the model, which can use tools (read_file, grep_code, git_blame, list_files, search_git_history, find_test_files) to investigate
Self-critique — a second pass filters out low-confidence or speculative findings
Structured output — returns findings with confidence level, category, file location, and explanation
License
MIT
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
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/lzx1413/mcp-agent-review'
If you have feedback or need assistance with the MCP directory API, please join our Discord server