code-review-graph is a free, open source version control & collaboration project written in Python and released under MIT. It has 31,548 GitHub stars, 2,870 forks and 163 open issues, and was last pushed 23 hours ago. On this registry it ranks #4 of 30 tracked projects in Version Control & Collaboration, with 5 head-to-head comparisons available. It gained 84 stars over the last 3 tracked days.

What is code-review-graph?

code-review-graph is a local-first code intelligence graph for MCP and the command line that parses a repository with Tree-sitter into a persistent map of functions, classes, imports, calls, inheritance and test coverage, so AI coding assistants read only the files a review actually needs; it is aimed at developers and teams running AI coding tools against large repositories where repeated full-codebase reads waste tokens.

What it is

code-review-graph is an MIT-licensed Python project that lives in the AI-coding tooling ecosystem alongside Claude Code, Cursor, Codex, Gemini CLI, GitHub Copilot, Zed, Windsurf, Continue, OpenCode, Qwen, Kiro, CodeBuddy and Hermes Agent. It parses a repository into an abstract syntax tree with Tree-sitter and stores the result as a graph of nodes (functions, classes, imports) and edges (calls, inheritance, test coverage). That graph is exposed to AI coding tools through the Model Context Protocol and to humans through a CLI, and it is queried at review time to compute the minimal set of files an assistant needs to read.

The concrete problem it solves is that AI coding tools can end up re-reading large parts of a codebase on review tasks, burning tokens for context that is mostly irrelevant. code-review-graph replaces that broad re-reading with a targeted query against the stored graph. Its blast-radius analysis traces every caller, dependent and test that could be affected when a file changes, so the assistant reads only those. Incremental change tracking, watch mode and platform-native hooks keep the graph current after the initial build, which the README states takes roughly ten seconds for a 500-file project.

Key capabilities

  • One command, code-review-graph install, auto-detects installed AI coding tools and writes the correct MCP configuration for each, with per-platform targeting via --platform codex, --platform cursor, --platform claude-code, --platform gemini-cli, --platform antigravity, --platform windsurf, --platform zed, --platform continue, --platform opencode, --platform qwen, --platform qoder, --platform kiro, --platform copilot, --platform copilot-cli, --platform codebuddy and --platform hermes.
  • code-review-graph build parses the codebase with Tree-sitter into graph nodes (functions, classes, imports) and edges (calls, inheritance, test coverage).
  • Blast-radius analysis traces every caller, dependent and test affected by a changed file.
  • Incremental change tracking, with watch mode and supported platform hooks keeping the graph updated after the first build.
  • Graph access through both an MCP server and a CLI, so assistant and terminal workflows share one map.
  • A symmetric uninstall command with --dry-run, --yes, --all-repos, --keep-data, --keep-user-configs and --repo flags; it removes only CRG-owned files and entries, leaves unrelated MCP servers, hooks, skills and JSONC comments untouched, and uses atomic replacement so a failed write leaves the original file intact.
  • A bundled GitHub Action, a documented procedure for reproducing the benchmarks, and documentation in English, 简体中文, 日本語, 한국어 and हिन्दी.

Who uses it and how

  • Developers running MCP-capable AI assistants such as Claude Code, Cursor, Codex, Gemini CLI, Zed, Windsurf, Copilot, Qwen or Kiro who want review tasks to pull a minimal file set instead of a broad repository read.
  • Large-repository workflows, which the project frames around benchmarked context reductions on reviews and large-repo workflows.
  • Teams working inside Git or SVN working trees, since uninstall normalizes its target to the working tree root and refuses non-repository directories.
  • CI pipelines using the GitHub Action, and anyone reproducing the published benchmarks.
  • Local-first setups, where parsing and graph storage stay on the developer machine with no hosted component described in the facts.

Getting started

Install with pip install code-review-graph or pipx install code-review-graph, then run code-review-graph install to auto-detect and configure supported platforms and code-review-graph build to parse the codebase. Python 3.10 or later is required, uv is recommended so the generated MCP configuration uses uvx, and the editor or tool must be restarted after installation.

How it compares

The facts list no paid products that this project replaces, and they name no direct equivalent tools. On the evidence provided here it stands alone in this registry: no other entry is described as a local-first MCP code graph, so any comparison has to come from the project's own benchmarks rather than from sibling projects.

When to use it — and when not to

A self-hoster must run Python 3.10 or later, keep the local graph database on disk, and manage watch mode or hooks so the graph stays fresh; the --keep-data flag exists because that graph database is local state. Teams that want a managed hosted service, or whose languages fall outside Tree-sitter's parsers and whose tools are not MCP clients, should not pick it on the evidence here, since the facts describe no hosted option and list no supported languages. The README excerpt supplied also stops mid-explanation of blast-radius analysis, so anyone evaluating that analysis in depth must go to the homepage or repository.

project readme (upstream, from github) — read inline

code-review-graph

tirth8205%2Fcode-review-graph | Trendshift

Stop burning tokens. Start reviewing smarter.

English | 简体中文 | 日本語 | 한국어 | हिन्दी

PyPI Downloads Stars MIT Licence CI Python 3.10+ MCP Website Discord

Usage · Commands · FAQ · Troubleshooting · GitHub Action · Reproducing the benchmarks · Roadmap


AI coding tools can end up re-reading large parts of your codebase on review tasks. code-review-graph fixes that. It builds a structural map of your code with Tree-sitter, tracks changes incrementally, and gives your AI assistant precise context via MCP so it reads only what matters.


Quick Start

pip install code-review-graph                     # or: pipx install code-review-graph
code-review-graph install          # auto-detects and configures all supported platforms
code-review-graph build            # parse your codebase

One command sets up everything. install detects which AI coding tools you have, writes the correct MCP configuration for each one, installs platform-native hooks/skills where supported, and injects graph-aware instructions into your platform rules. It auto-detects whether you installed via uvx or pip/pipx and generates the right config. Restart your editor/tool after installing.

To target a specific platform:

code-review-graph install --platform codex       # configure only Codex
code-review-graph install --platform cursor      # configure only Cursor
code-review-graph install --platform claude-code  # configure only Claude Code
code-review-graph install --platform gemini-cli   # configure only Gemini CLI
code-review-graph install --platform antigravity   # configure only Antigravity
code-review-graph install --platform windsurf     # configure only Windsurf
code-review-graph install --platform zed          # configure only Zed
code-review-graph install --platform continue     # configure only Continue
code-review-graph install --platform opencode     # configure only OpenCode
code-review-graph install --platform qwen         # configure only Qwen
code-review-graph install --platform qoder        # configure only Qoder
code-review-graph install --platform kiro         # configure only Kiro
code-review-graph install --platform copilot      # configure only GitHub Copilot (VS Code)
code-review-graph install --platform copilot-cli  # configure only GitHub Copilot CLI
code-review-graph install --platform codebuddy    # configure only CodeBuddy Code
code-review-graph install --platform hermes       # configure only Hermes Agent

Requires Python 3.10+. For the best experience, install uv (the MCP config will use uvx if available, otherwise falls back to the code-review-graph command directly).

To remove CRG from a Git or SVN project, use the symmetric uninstall command from anywhere inside its working tree. The target is normalized to the working tree root, and non-repository directories are refused. It removes only CRG-owned files and entries; unrelated MCP servers, hooks, skills, and JSONC comments remain untouched. Shared configuration changes use atomic replacement so a failed write leaves the original file intact.

code-review-graph uninstall --dry-run    # preview every action; write nothing
code-review-graph uninstall              # preview, ask for confirmation, then apply
code-review-graph uninstall --yes        # apply without prompting
code-review-graph uninstall --all-repos  # also clean every registered repository
code-review-graph uninstall --keep-data  # remove integrations but keep graph databases
code-review-graph uninstall --keep-user-configs --repo .  # clean this project only

Then open your project and ask your AI assistant:

Build the code review graph for this project

The initial build takes ~10 seconds for a 500-file project. After that, watch mode and supported hooks can keep the graph updated automatically.

How It Works

Your repository is parsed into an AST with Tree-sitter, stored as a graph of nodes (functions, classes, imports) and edges (calls, inheritance, test coverage), then queried at review time to compute the minimal set of files your AI assistant needs to read.

Blast-radius analysis

When a file changes, the graph traces every caller, dependent, and test that could be affected. This is the "blast radius" of the change. Your AI reads only these files instead of scanning the whole project.

Incremental updates in seconds

When hooks or watch mode are enabled, file saves and supported commit hooks trigger incremental updates. The graph diffs changed files, finds their dependents through the graph's own import and call edges, and re-parses only the files whose SHA-256 hash actually changed. On a ~3,000-file project (django) a two-file edit re-indexes in about 2.5 seconds on the path the hooks use, of which ~1.4 s is process start-up; a no-op update costs only that start-up. See Incremental update latency for the full measurement.

Whole codebase or targeted answer?

The bigger the repository, the more token waste hurts. Instead of feeding a whole corpus to the model, the graph

readme truncated — read the full docs on github

Frequently asked questions

Is code-review-graph free to use?

code-review-graph is open source under the MIT licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does code-review-graph do?

Local-first code intelligence graph for MCP and CLI. Builds a persistent map of your codebase so AI coding tools read only what matters, with benchmarked contex

What is code-review-graph written in?

code-review-graph is primarily written in Python. Its source is publicly available at https://github.com/tirth8205/code-review-graph, and it has 31,548 GitHub stars.