ai-review-mcp
Uses Ollama as a local OpenAI-compatible LLM backend to review code, challenge plans, and provide independent opinions without sending reviewed content to a cloud service.
Connects to OpenAI or OpenAI-compatible cloud endpoints as a second LLM backend for code review, plan critique, and independent judgment.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
ai-review-mcp
English | 中文
A zero-dependency MCP server that asks a second LLM to review code, challenge a plan, or provide an independent opinion.
Useful when the primary agent has finished a change and you want another model to look for correctness bugs, edge cases, security issues, concurrency risks, performance problems, and requirement gaps.
Why this exists
A single model can confidently miss its own mistakes. ai-review-mcp adds a simple second-opinion loop without a framework or database:
The primary agent writes code or a plan.
It calls one of this server's MCP tools.
A second cloud or local model reviews the artifact.
The primary agent receives a concise
P0–P3finding list or an independent judgment.
No SDK. No build step. No runtime dependencies.
Related MCP server: consult-mcp
Tools
Tool | What it does |
| Lists configured backends and probes connectivity. Start here if the second model is not responding. |
| Sends a question and optional context to another model for an independent judgment. |
| Reviews inline code, a diff, or a file and returns severity-ranked findings. |
Highlights
Zero npm dependencies — only Node.js built-ins and global
fetch.Cloud or local — OpenAI-compatible APIs, Ollama, DeepSeek, OpenAI, or another compatible endpoint.
Provider-neutral MCP transport — newline-delimited JSON-RPC 2.0 over stdio.
Automatic config discovery — can reuse the active provider in
${CODEX_HOME:-~/.codex}/config.toml.No secret echo — API-key status is reported as configured or not configured; the value is never printed.
Developer-focused output — asks the reviewer to report only substantive defects rather than generic style advice.
Requirements
Node.js 18 or newer
One of:
an OpenAI-compatible cloud endpoint and API key;
a local OpenAI-compatible endpoint such as Ollama.
Quick start
git clone https://github.com/purge-unlimited/ai-review.git
cd ai-review
npm testAdd the server to an MCP client that supports stdio servers. Replace <ABSOLUTE_PATH_TO> with the local clone path:
{
"mcpServers": {
"ai-review": {
"command": "node",
"args": ["<ABSOLUTE_PATH_TO>/ai-review/server.js"],
"env": {
"AI_REVIEW_BACKEND": "auto"
}
}
}
}Restart the client after editing its MCP configuration.
Example requests
Once registered, ask the primary agent to use the server:
Call ai_review_code on the current diff. Focus on concurrency and error handling.Use ai_second_opinion to challenge this architecture decision. Include the attached constraints.Cloud backend
Cloud mode works with endpoints that implement OpenAI’s POST /chat/completions.
AI_REVIEW_CLOUD_BASE_URL=https://provider.example/v1
AI_REVIEW_CLOUD_MODEL=<MODEL_NAME>
AI_REVIEW_CLOUD_API_KEY=<API_KEY>If these variables are omitted, the server can inspect ${CODEX_HOME:-~/.codex}/config.toml and discover the active Codex provider, endpoint, credential reference, and model catalog.
Local backend
The default local endpoint is:
http://127.0.0.1:11434/v1Typical configuration:
AI_REVIEW_LOCAL_BASE_URL=http://127.0.0.1:11434/v1
AI_REVIEW_LOCAL_MODEL=qwen3:8b
AI_REVIEW_LOCAL_AUTOSTART=offOptional auto-start requires explicit paths:
AI_REVIEW_LOCAL_AUTOSTART=auto
AI_REVIEW_LOCAL_NODE=<ABSOLUTE_PATH_TO_NODE>
AI_REVIEW_LOCAL_SERVER=<ABSOLUTE_PATH_TO_SERVER_ENTRY>The server never assumes a machine-specific installation. If the local service is unavailable and auto-start is not configured, the tool returns a clear error.
Configuration
Variable | Default | Purpose |
|
|
|
|
| Model request timeout |
| auto-discover | Cloud OpenAI-compatible base URL |
| auto-discover | Cloud model name |
| auto-discover | Cloud credential |
|
| Local endpoint |
|
| Local model name |
|
| Start a configured local server on demand |
| empty | Node executable used for local auto-start |
| empty | Server entry used for local auto-start |
|
| Optional Codex config discovery directory |
See .env.example for a complete template.
Safety and privacy
ai_review_codereads a file only when the caller explicitly suppliespath.Inline content is capped at 160,000 characters; files are capped at 256 KiB.
Review content is sent only to the selected backend.
The server does not write prompts, responses, keys, or file content to disk.
A cloud backend receives the reviewed content. Use the local backend when content must stay on the machine.
Do not send secrets or personal data unless the selected backend is trusted.
Development
npm run check
npm testThe test suite covers the MCP handshake, tool registry, and notification handling without contacting a model.
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for building and testing AI agents with multi-model experimentation and insights.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Related MCP Servers
- AlicenseAqualityDmaintenanceAn MCP server that provides code review functionality using OpenAI, Google, and Anthropic models, serving as a "second opinion" tool that works with any MCP client.134MIT
- AlicenseAqualityDmaintenanceMCP server orchestrating local CLI agents (Claude Code, OpenAI Codex, Google Gemini) for cross-validation, second opinions, and persona-driven prompting.18MIT
- AlicenseNot gradedqualityCmaintenanceMCP server that enables AI agents to run a deterministic orchestration loop with decomposition, subagent execution, and review feedback across multiple LLM backends.61MIT
- AlicenseNot gradedqualityDmaintenanceMCP server that gives any AI coding tool a structured second opinion from another AI provider.10 npmMIT