antigravity-review-mcp
AI-powered code review using Zhipu GLM. It gathers git diffs and source context to provide focused code reviews.
README
Code Review MCP
AI-powered code review using Zhipu GLM. The server gathers git diffs and optional source context, then asks the model for a focused review.
Installation
Install dependencies:
git clone https://github.com/Enferlain/antigravity-review-mcp.git
cd antigravity-review-mcp
cp .env.example .env
# Optional: edit .env and add your API key
uv sync
Then add it to your MCP client.
For local development, use uv run from your clone:
{
"mcpServers": {
"review-mcp": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/antigravity-review-mcp",
"run",
"review-mcp"
]
}
}
}
For day-to-day use from Git, uvx avoids hardcoding a local install path:
{
"mcpServers": {
"review-mcp": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/Enferlain/antigravity-review-mcp",
"review-mcp"
]
}
}
}
The MCP caller should pass the repository being reviewed as working_directory on each review_with_context call. If your MCP client cannot pass a per-call workspace, you can still start the server with a fixed fallback:
"args": [
"--from",
"git+https://github.com/Enferlain/antigravity-review-mcp",
"review-mcp",
"--workspace-dir",
"/absolute/path/to/the-repo-you-want-reviewed"
]
Configuration
Environment variables (in .env):
AI_API_KEY(required): Your API keyZHIPU_API_KEY(optional): Backward-compatible fallback key nameZHIPU_BASE_URL(optional): Override API endpointAI_MODEL/ZHIPU_MODEL(optional): Override the review model (default:GLM-4.7)MAX_REVIEW_ITERATIONS(optional): Max tool-calling iterations (default: 20, capped at 50)REVIEW_MCP_INCLUDE_TRACE(optional): Append diagnostic trace details to review responses (true/false)
Usage
The MCP exposes 1 tool: review_with_context
Parameters:
diff_target: 'staged' (default), 'unstaged', or a git ref like 'HEAD~1'context_files: Additional files or OpenSpec change folders to include as contextfocus_files: Specific files to focus the review ontask_description: Description of what you're trying to accomplishworking_directory: Git repository root to review (required unless the server was started with--workspace-dir)include_trace: Include a compact diagnostic trace in the returned review (optional, defaults toREVIEW_MCP_INCLUDE_TRACE)
When called, it automatically:
- Reads any files listed in
context_files - Expands explicitly provided OpenSpec change folders into their context files
- Resolves
render_diffs()andfile:///links inside those context files - Includes an initial scoped diff when
focus_filesor context-filerender_diffs()links identify files - Lets GLM gather additional diffs or files as needed using its tools
- Returns the final review
OpenSpec change folders are included only when the MCP caller passes the folder path in context_files, for example:
{
"context_files": [
"/home/imi/Projects/sd-scripts/openspec/changes/resource-intelligence-system"
]
}
If MCP calls feel opaque, set include_trace to true for a single call or set REVIEW_MCP_INCLUDE_TRACE=true in the environment. The returned review will include a compact trace with the workspace, diff target, context-file count, payload sizes, model iterations, and tool calls.
Codex / VS Code Notes
This server now starts cleanly under MCP hosts because it avoids doing heavy work at import time. A few setup notes still matter:
- Prefer passing
working_directoryper tool call so one MCP config can review any repo. - If your MCP client cannot inject the current repo automatically, set
--workspace-dirin the config as a fixed fallback. - Prefer setting
AI_API_KEYas a system/user environment variable instead of storing it in MCP config. - The tool-level
working_directoryargument still overrides the configured workspace when your agent provides it.
Example Windows fallback path:
"args": [
"--directory",
"D:/Projects/antigravity-review-mcp",
"run",
"review-mcp",
"--workspace-dir",
"D:/Projects/myrepo"
]
Example prompt to your AI assistant:
"Review my staged changes"
Security Note
The reviewer agent can read any file accessible from the working directory. This is by design for comprehensive reviews, but be aware of this when using in sensitive environments.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.