Better Code Review Graph

v3.15.1Coding Agentsstable

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,

ai-agentsai-codingantigravityclaudeclaude-code
Share:
48
Stars
0
Downloads
0
Weekly
0/5

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

Token-efficient code review with knowledge graphs
Incremental codebase change tracking
n24q02m

Maintainer

LicenseMIT
Languagepython
Versionv3.15.1
UpdatedMay 22, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

PIP

pip install better-code-review-graph

Manual Installation

pip install better-code-review-graph

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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 dev
2

Add 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": {}
    }
  }
}
3

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/.

4

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.

5

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.

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.

Quick Config Preview

{ "mcpServers": { "better-code-review-graph": { "command": "pip", "args": ["install", "better-code-review-graph"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides