Code Review Graph
Local knowledge graph for Claude Code. Builds a persistent map of your codebase so Claude reads only what matters — 6.8× fewer tokens on reviews and up to 49× on daily coding tasks.
What is Code Review Graph?
Code Review Graph is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to local knowledge graph for claude code. builds a persistent map of your codebase so claude reads only what matters — 6.8× fewer tokens on reviews and up to 49× on daily coding tasks.
Local knowledge graph for Claude Code. Builds a persistent map of your codebase so Claude reads only what matters — 6.8× fewer tokens on reviews and up to 49× on daily coding tasks.
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Local knowledge graph for Claude Code. Builds a persistent m
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx code-review-graphConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Code Review Graph
code-review-graph builds a persistent, local knowledge graph of your codebase so that AI coding assistants like Claude Code, Cursor, and Gemini CLI can perform highly targeted code reviews without reading entire files. It indexes your source code into a SQLite graph (stored in .code-review-graph/) and exposes 30+ MCP tools covering blast-radius analysis, semantic search, architecture overviews, refactoring previews, and cross-repo queries. Benchmark results show a median 82x token reduction per question compared to naive file-reading, with incremental updates completing in under 2 seconds for projects with thousands of files.
Prerequisites
- Python 3.10 or higher installed
- pip or pipx available for installation
- An MCP-compatible AI coding client (Claude Code, Cursor, Windsurf, Gemini CLI, etc.)
- A Git repository to index (code-review-graph uses git metadata for change detection)
- Optional: an OpenAI-compatible embeddings API key for semantic search (local model used by default)
Install code-review-graph from PyPI
Install the package using pip or pipx. pipx is recommended to avoid dependency conflicts.
pip install code-review-graph
# or with pipx:
pipx install code-review-graphRun the MCP installer for your platform
The install command auto-detects your AI coding environment and writes the MCP configuration. You can also target a specific platform with the --platform flag.
code-review-graph install
# or for a specific platform:
code-review-graph install --platform claude-codeBuild the knowledge graph for your project
Navigate to your project root and run the build command. This parses the entire codebase and creates the graph database in .code-review-graph/. Initial build takes about 10 seconds for a 500-file project.
cd /path/to/your/project
code-review-graph buildEnable automatic incremental updates (optional)
Use the watch command to keep the graph updated as you edit files. Incremental updates complete in under 2 seconds.
code-review-graph watchRestart your editor and start reviewing
Restart your MCP client (Claude Code, Cursor, etc.) after installation. The 30+ MCP tools are now available — ask your assistant to review changes, find impacted code, or explore the architecture.
Code Review Graph Examples
Client configuration
Typical MCP configuration after running 'code-review-graph install --platform claude-code'. The installer writes this automatically, but here is the expected shape for Claude Code.
{
"mcpServers": {
"code-review-graph": {
"command": "code-review-graph",
"args": ["serve"]
}
}
}Prompts to try
Example prompts that leverage the code-review-graph MCP tools for targeted code analysis.
- "Build the code review graph for this project"
- "What is the blast radius of my recent changes?"
- "Show me the architecture overview for this codebase"
- "Find untested hotspots and high-risk functions"
- "What are unexpected dependencies between modules?"
- "Generate a wiki document from the codebase communities"Troubleshooting Code Review Graph
code-review-graph build fails with git-related errors
Ensure the project is a git repository ('git init' if not). Set CRG_GIT_TIMEOUT to a higher value (e.g., export CRG_GIT_TIMEOUT=60) if git operations time out on large repos.
Semantic search returns irrelevant results
The default embedding model (all-MiniLM-L6-v2) runs locally. For higher accuracy, set CRG_OPENAI_BASE_URL and CRG_OPENAI_API_KEY to use a cloud embedding model like text-embedding-3-small.
MCP tools not appearing after installation
Restart your editor after running 'code-review-graph install'. If tools still don't appear, check the platform-specific config file was written correctly by inspecting ~/.claude/settings.json or the Cursor MCP config path.
Frequently Asked Questions about Code Review Graph
What is Code Review Graph?
Code Review Graph is a Model Context Protocol (MCP) server that local knowledge graph for claude code. builds a persistent map of your codebase so claude reads only what matters — 6.8× fewer tokens on reviews and up to 49× on daily coding tasks. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Code Review Graph?
Follow the installation instructions on the Code Review Graph GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Code Review Graph?
Code Review Graph works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Code Review Graph free to use?
Yes, Code Review Graph is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Code Review Graph Alternatives — Similar Developer Tools Servers
Looking for alternatives to Code Review Graph? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Code Review Graph in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Code Review Graph?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.