Better Code Review Graph
Knowledge graph for token-efficient code reviews. Builds a structural map of your codebase with Tree-sitter, tracks changes incrementally, and gives AI agents precise context via MCP tools. Features fixed multi-word search, qualified call resolution,
What is Better Code Review Graph?
Better Code Review Graph is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to knowledge graph for token-efficient code reviews. builds a structural map of your codebase with tree-sitter, tracks changes incrementally, and gives ai agents precise context via mcp tools. features f...
Knowledge graph for token-efficient code reviews. Builds a structural map of your codebase with Tree-sitter, tracks changes incrementally, and gives AI agents precise context via MCP tools. Features fixed multi-word search, qualified call resolution,
This server falls under the Coding Agents category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Knowledge graph for token-efficient code reviews. Builds a s
Use Cases
Maintainer
Works with
Installation
PIP
pip install better-code-review-graphManual Installation
pip install better-code-review-graphConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Better Code Review Graph
Better Code Review Graph is a Python-based MCP server that builds a structural knowledge graph of your codebase using Tree-sitter, enabling AI agents to perform token-efficient, context-rich code reviews without scanning entire files. It incrementally tracks code changes, supports semantic search and blast-radius analysis, integrates an optional security scanner with Semgrep, and exports graph data for external tooling. Development teams using Claude, Cursor, or GitHub Copilot who want more accurate and cost-effective AI code reviews will benefit most from this server.
Prerequisites
- Python 3.13 and the uv package manager (https://docs.astral.sh/uv/) installed
- Git installed and available in PATH (the server uses git diff for incremental change detection)
- A codebase to analyze (the server works with any language supported by Tree-sitter)
- An MCP-compatible client such as Claude Desktop, Cursor, or Claude Code
Install via pip or clone the repository
You can install directly from PyPI with pip, or clone the repository and use uv for development.
pip install better-code-review-graph
# Or for development:
git clone https://github.com/n24q02m/better-code-review-graph
cd better-code-review-graph
uv sync --group devAdd the server to your MCP client configuration
Edit your Claude Desktop config to run the server using uv or the installed package. The server is invoked as a module and requires no API keys.
{
"mcpServers": {
"code-review-graph": {
"command": "uv",
"args": ["run", "better-code-review-graph"],
"env": {}
}
}
}Build the initial knowledge graph
Once the server is running, use the graph tool with the 'build' action to parse your codebase and populate the graph. The server saves graph data to ~/.better-code-review-graph-mcp/.
Generate embeddings for semantic search
After the initial build, generate embeddings to enable semantic code search. For large codebases, also run the summarize action first to stay within token budgets.
Use review and query tools during development
During active development, use the 'review' tool to get AI-optimized diff context before asking for a code review, and the 'query' tool to search for specific patterns or assess change impact.
Better Code Review Graph Examples
Client configuration
Claude Desktop configuration for better-code-review-graph installed via pip.
{
"mcpServers": {
"code-review-graph": {
"command": "python",
"args": ["-m", "better_code_review_graph"],
"env": {}
}
}
}Prompts to try
Example prompts using the graph, query, review, and security tools exposed by the server.
- "Build the knowledge graph for the current project and show me stats"
- "Search the codebase for all functions related to authentication"
- "Show me the blast radius if I modify the UserService class"
- "Get the token-optimized review context for my current git diff"
- "Run a security scan on the codebase and give me the top 5 findings"
- "Find all large functions over 100 lines that should be refactored"Troubleshooting Better Code Review Graph
Server fails to start with Python version error
The server requires Python 3.13 exactly. Run 'python --version' to check. If you have an older version, install Python 3.13 and use uv to manage the environment: 'uv python install 3.13' then 'uv run better-code-review-graph'.
Graph build fails or returns empty results
Ensure you are running the server from within the project directory you want to analyze, or pass the project path explicitly. The server uses Tree-sitter parsers which are installed automatically, but the target directory must be a valid codebase with recognizable source files.
Need to roll back after upgrading to v2.0 schema
Set the environment variable CRG_DOWNGRADE_TO_1_X=1 in your MCP config env block before starting the server. This rolls back to the pre-v2.0 schema and restores your backup graph data.
Frequently Asked Questions about Better Code Review Graph
What is Better Code Review Graph?
Better Code Review Graph is a Model Context Protocol (MCP) server that knowledge graph for token-efficient code reviews. builds a structural map of your codebase with tree-sitter, tracks changes incrementally, and gives ai agents precise context via mcp tools. features fixed multi-word search, qualified call resolution, It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Better Code Review Graph?
Install via pip with: pip install better-code-review-graph. Then configure your AI client to connect to this MCP server.
Which AI clients work with Better Code Review Graph?
Better 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 Better Code Review Graph free to use?
Yes, Better Code Review Graph is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Better Code Review Graph Alternatives — Similar Coding Agents Servers
Looking for alternatives to Better Code Review Graph? Here are other popular coding agents servers you can use with Claude, Cursor, and VS Code.
Dify
★ 142.2kProduction-ready platform for agentic workflow development.
Ruflo
★ 54.0k🌊 The leading agent orchestration platform for Claude. Deploy intelligent multi-agent swarms, coordinate autonomous workflows, and build conversational AI systems. Features enterprise-grade architecture, self-learning swarm intelligence, RAG integrat
Goose
★ 45.7kan open source, extensible AI agent that goes beyond code suggestions - install, execute, edit, and test with any LLM
Antigravity Awesome Skills
★ 38.3kInstallable GitHub library of 1,400+ agentic skills for Claude Code, Cursor, Codex CLI, Gemini CLI, Antigravity, and more. Includes installer CLI, bundles, workflows, and official/community skill collections.
AgentScope
★ 25.5kBuild and run agents you can see, understand and trust.
Serena
★ 24.5kA coding agent toolkit that provides IDE-like semantic code retrieval and editing tools, enabling LLMs to efficiently navigate and modify codebases using symbol-level operations instead of basic file reading and string replacements.
Browse More Coding Agents MCP Servers
Explore all coding agents servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Better 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 Better 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.