Debuly
code-review-graph logo

code-review-graph

Open-source local code graph and MCP server that gives AI coding tools only the context a diff touches, instead of the whole repo.

Open source

What is code-review-graph?

code-review-graph, also called CRG, indexes a repository into a persistent graph of functions, classes, imports, calls and tests stored in a local SQLite file. It then serves that structure to AI coding assistants over the Model Context Protocol so they read the blast radius of a change instead of re-reading every file. The graph is built with Tree-sitter, updated incrementally from git changes, and exposes 30 MCP tools and 5 prompts covering impact analysis, call graphs, risk-scored reviews, execution flows, community detection and hybrid search. It supports 39 languages plus Jupyter and Databricks notebooks, and one command configures more than a dozen tools including Claude Code, Cursor, Codex, Copilot, Windsurf and Zed. The project is MIT licensed and installed with pip. The maintainers report a median 63x reduction in review context across six open-source repositories, while noting that results vary and are estimates.

Use cases

  • Give an AI assistant the blast radius of a diff
  • Cut token use in AI code reviews
  • Trace call chains and execution flows
  • Score pull requests for risk
  • Generate an architecture overview of a repo
  • Generate a wiki from code structure
  • Search code by keyword and meaning

Who it's for

  • Developers using AI coding tools
  • Code reviewers
  • Engineering teams
  • Open-source maintainers

Why use code-review-graph

  • The graph stays on your machine in a local database, and core workflows need no account or telemetry.
  • Assistants receive a small slice of relevant context, which the project reports as a median 63x smaller than raw repository context.
  • A single MCP server works with many AI coding tools, so one index serves every client you use.
  • Incremental re-indexing keeps the graph current without rebuilding it after every change.
  • It is free and MIT licensed, so teams can inspect and modify it.

code-review-graph features

  • Persistent local graph of functions, calls, imports and tests
  • 30 MCP tools and 5 MCP prompts
  • Blast radius and impact analysis for changes
  • Risk-scored reviews covering security sensitivity and test gaps
  • Execution flow detection through call chains
  • Leiden community detection for architecture overviews
  • Hybrid search with FTS5 BM25 and optional embeddings
  • Incremental updates based on git changes and file hashes
  • Interactive D3.js graph visualization
  • Auto-generated Markdown wiki and multi-repo registry

code-review-graph integrations

  • Claude Code
  • Cursor
  • Codex
  • GitHub Copilot
  • Windsurf
  • Zed
  • Continue
  • OpenCode
  • Gemini CLI
  • Qwen
  • Kiro
  • Qoder
  • Antigravity

How to get started with code-review-graph

  1. Install the package with pip install code-review-graph.
  2. Run code-review-graph install to configure your AI coding tools, then code-review-graph build to index the repository.
  3. The graph updates incrementally as you commit or run the watch command.
  4. Your assistant calls the MCP tools to fetch blast radius, call chains and risk scores for the code under review.

code-review-graph limitations

  • Token savings are estimates and can be negative for small single-file changes in tiny packages
  • Impact analysis favours recall, so it can return false positives
  • Flow detection is strongest in Python and framework-heavy code
  • Cloud embeddings are optional and send data off the machine if enabled

code-review-graph pricing

code-review-graph is open source, so you can use and self-host it for free.

Prices can change and may vary by country or exclude tax. Check the official pricing page.

code-review-graph alternatives

The main code-review-graph alternatives listed on Debuly are CodeGraph, Greptile, Repomix, CodeRabbit, Devin and OpenWiki. The table compares pricing and platforms; order is A–Z.

code-review-graph compared with its alternatives
ToolPricingStarting pricePlatforms
code-review-graphOpen source—CLI, MCP server, VS Code extension, Self-hosted
CodeGraphOpen source—CLI, MCP server, macOS, Linux
CodeRabbitFreemium$24/moWeb, VS Code extension, CLI, Self-hosted
DevinFreemium$20/moWeb, CLI, API
GreptileFreemium$1, usage-basedWeb, API, CLI, Self-hosted
OpenWikiOpen source—CLI, Windows
RepomixOpen source—CLI, Web, Chrome extension, Docker
  1. CodeGraph

    Free local code knowledge graph that lets coding agents like Claude Code and Cursor answer from one call instead of reading files.

  2. CodeRabbit

    AI code review for pull requests, IDEs and the CLI, with pre-merge checks, one-click fixes, triage and security scans.

  3. Devin

    Cognition's AI software engineer, with a desktop app, CLI and cloud agents that take coding tasks through to pull requests.

  4. Greptile

    AI pull request reviewer that maps your whole repository, so each review weighs the change against code outside the diff.

  5. OpenWiki

    LangChain command-line tool that generates and updates a linked Markdown wiki of your repository for coding agents and developers.

  6. Repomix

    Open-source tool that packs a whole code repository into one AI-friendly file with token counts and secret checks.

code-review-graph FAQ

Is code-review-graph free and open source?

Yes. The site and footer state it is MIT licensed, and it installs with pip. No paid plan is listed.

How much does code-review-graph cost?

Nothing is charged by the project. Optional cloud embeddings from providers such as OpenAI or Google would use those providers' own pricing.

Which AI tools does it work with?

It works with any MCP-compatible client. Named examples are Claude Code, Cursor, Codex, GitHub Copilot and Gemini CLI, along with Kiro, Qoder, Qwen, Antigravity, OpenCode, Continue, Zed and Windsurf.

Does my code leave my machine?

Not by default. The graph is stored in a local database file, and cloud embeddings are opt-in. Local sentence-transformers embeddings are also available.

Which languages are supported?

The homepage cites 39 languages plus Jupyter and Databricks notebooks, including Python, TypeScript, Go, Rust, Java, C# and Kotlin.

Are the token savings guaranteed?

No. The privacy and limits page says savings are estimates, and for small single-file changes the graph metadata can exceed the raw file size.

What are alternatives to code-review-graph?

CodeGraph, Sourcegraph, Greptile, Serena and Repomix also give AI assistants structured code context.

Sources & verification

Facts on this page come from the official sources below, each with the date we read it. Written by Debuly; the vendor did not review this page.

SourceTypeAccessed
code-review-graph.comofficial
github.com/tirth8205/code-review-graphrepository
code-review-graph.com/featuresofficial
code-review-graph.com/official
code-review-graph.com/installofficial
code-review-graph.com/privacyofficial
code-review-graph.com/benchmarksofficial

Image credits

  • Logo: from code-review-graph.com · fetched · Vendor trademark, used only to identify the product; removed on request
  • Cover: none collected yet, so a generated tile is shown.

Spot an error? Report an issue with this listing. We also remove a logo or image on the owner's request.