Code Review Graph

v1.0.0Developer Toolsstable

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.

ai-codingclaudeclaude-codecode-reviewgraphrag
Share:
17,130
Stars
0
Downloads
0
Weekly
0/5

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

Knowledge graph codebase mapping
Token optimization
Incremental code review
tirth8205

Maintainer

LicenseMIT
Languagepython
Versionv1.0.0
UpdatedMay 22, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx 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 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)
1

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

Run 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-code
3

Build 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 build
4

Enable 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 watch
5

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

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.

Quick Config Preview

{ "mcpServers": { "code-review-graph": { "command": "npx", "args": ["-y", "code-review-graph"] } } }

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

Read the full setup guide →

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.

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