There's a project on GitHub whose tagline is a single line: "Stop burning tokens. Start reviewing smarter." The repo, tirth8205/code-review-graph, has racked up 27401 stars and 2536 forks as of July 29, 2026. It's written in Python, MIT-licensed, created on February 26, 2026, and the latest release is v2.3.7, shipped July 18. What it does fits in one sentence: it uses Tree-sitter to parse your codebase into a knowledge graph, then feeds an AI coding assistant "just enough" context over MCP, so it stops re-reading the whole repo every time you ask a question. On six real repositories the team measured token savings from 38x to 528x, with a single question burning roughly 93x fewer tokens on average.
1. The Pain: AI Coding Assistants Burn Tokens in the Wrong Place
Anyone who's used a coding agent like Claude Code or Cursor has hit this wall: you ask "who calls this function?" and it reads the entire repo first, blowing through thousands of tokens, and the answer still might be wrong. Once a codebase gets large, every question feels like making an assistant re-read the dictionary end to end just to answer one word.
There are two specific wastes behind this. First, the agent doesn't know which files your change actually touches, so it shoves every "possibly relevant" file into context. In a monorepo that's tens of thousands of files, when the truly relevant ones might be a dozen; the rest is noise. Second, re-indexing after every change is expensive, so the agent either skips it and guesses with stale context, or brute-force re-reads the whole repo while tokens drain away. Three things break together: tokens burn fast, reviews come back inaccurate, and long tasks blow past the context window. code-review-graph goes after both wastes by structuring code into a graph and showing the AI only what changed.
This is not a "make the model smarter" tool. It does something more mundane: before the model opens its mouth, it separates what should be read from what shouldn't. Feed a strong model noise and it can only find answers inside that noise.
2. What It Does: Tree-sitter Into a Graph, Delivered Over MCP
The stack underneath is Tree-sitter parsing plus SQLite storage. Tree-sitter turns each source file into an abstract syntax tree (AST), from which it extracts nodes and edges: nodes are code entities like functions, classes, and imports; edges are the relationships between them, such as who calls whom, who inherits from whom, and which test covers which business code. These relationships aren't recomputed per question. They're structured up front and stored in a SQLite graph, ready to query.
The delivery channel is MCP (Model Context Protocol). It exposes the graph as an MCP server, so an AI assistant can query it on demand like any other MCP tool, instead of stuffing the whole codebase into the context window. Incremental changes are tracked too: which files changed, which nodes are stale, the graph remembers, and only the affected parts get re-parsed. What the AI finally receives is a minimal context of "read what should be read, skip what shouldn't."
Two practical benefits fall out of this. The graph lives in a local SQLite file, so data never leaves your repo, which matters for privacy-sensitive teams. Delivery goes over standard MCP, so any MCP-capable agent can plug in; it doesn't lock you to one tool. Use Cursor today, switch to Claude Code tomorrow, the graph is still there. Picking SQLite over some graph database is also a deliberate choice: zero extra dependencies, install and run, no second service to babysit.
3. 38x to 528x: Real Numbers From Six Repositories
The most convincing thing is that it publishes measured numbers. On six real codebases, token savings ranged from 38x to 528x. The clearest single-question comparison: without the graph, one question consumed 208821 source tokens; with the graph, the response used about 2495 tokens, a roughly 93x reduction.
The spread itself (38x to 528x) tells you something: how much you save depends heavily on the shape of your codebase. The deeper the coupling, the longer the call chains, the more irrelevant files in a monorepo, the more noise the graph can strip out, and the higher the multiplier. A small, flat project that didn't have much to read in the first place won't save as much. So don't treat 528x as a promise to everyone; it's more like an upper bound for "the kind of project that most needs this." But even the 38x floor is meaningful for anyone wrestling with agents daily.
One caveat: these numbers measure savings on the context-feeding step, not an end-to-end claim that your API bill drops to a tenth. Actual savings depend on how often you ask, how coupled your code is, and how much the agent leaned on full-repo reads before. But the direction is fixed: keep noise out of context, and tokens get spent slower.
4. Blast-radius: Change One File, Let the AI Read Only What It Should
A core feature is blast-radius analysis. The logic: when you change a file, it walks back along the graph to find every affected caller, dependency, and related test, then feeds only those to the AI. The agent is no longer "scan the whole repo to find connections"; it works from an explicit list of what's affected. Less tokens, and more accurate reviews.
The monorepo case shows this best. The published number: on a monorepo with 27700+ files, after blast-radius excluded the irrelevant files from the review context, the AI actually read only about 15 files. From twenty-seven thousand down to fifteen. That's the gap between a graph and "feed the whole thing as context." Put differently, the information the agent had to digest got cut by three orders of magnitude, which helps both the token bill and review accuracy.
Blast-radius is really automating an old problem: change-impact analysis. That used to be a human job or a separate static-analysis tool, and after it ran you still had to hand the result to the AI. Now the graph automates that step, and what the AI gets isn't "the whole repo" but "the sub-graph this change actually ripples through."
5. Staying Fresh: Sub-2-second Re-indexing, Watch Plus Hooks
Building the graph is only the start; keeping up with code changes is what matters. The number it gives for incremental updates: re-indexing a 2900-file project takes under 2 seconds. That means every time you ask, the graph is current, and the AI sees the code as it is now, not a snapshot from the last build.
Freshness is kept up by two mechanisms: watch mode and git hooks. Watch mode watches the filesystem; the moment you save, it incrementally updates just the affected slice of the graph. Hooks sit on git events like commits, so the graph updates in step with your code flow. Both serve one goal: never let the graph drift from the real code.
This beats tools that build a graph once and use it for half a year. A stale graph is worse than no graph, because the AI will confidently hallucinate from wrong connections. A two-second incremental update pushes the "graph is outdated" risk down to something you can almost ignore.
6. Three Steps Up, 15+ Platforms, and a Symmetric Uninstall
pip install code-review-graph
code-review-graph install
code-review-graph buildThree steps. First, install the package. Second, install auto-detects which AI coding tools you have and wires up the MCP integration for each. Third, build parses the current repo into a graph. The platforms it auto-configures are listed at 15+: Codex, Claude Code, CodeBuddy Code, Cursor, Windsurf, Zed, Continue, OpenCode, Antigravity, Gemini CLI, Qwen, Qoder, Kiro, and GitHub Copilot (both the VS Code extension and the CLI). You don't hand-edit each tool's MCP config one by one; install does it in one pass.
The initial build isn't slow: a 500-file project takes about 10 seconds. It needs Python 3.10+, and the team recommends running it with uv (uvx) to avoid polluting your global environment. Uninstall is designed to be symmetric: code-review-graph uninstall supports --dry-run (preview what gets removed before deciding), --yes (skip confirmation), --all-repos (clean every repo at once), and --keep-data (keep the graph data, remove only the integration config). The key point: it only deletes the MCP and hook configs it created itself, and leaves everything else alone. For anyone with a stack of MCP servers who dreads one uninstall walking off with the whole config, that's a real bit of engineering restraint.
7. How Wide Is Language Coverage, and a Grammar Escape Hatch
On the language side, if Tree-sitter can parse it, it's covered. The list is long: Python, JavaScript, TypeScript, TSX, Go, Rust, Java, C, C++, C#, Ruby, Kotlin, Swift, PHP, Scala, Solidity, Dart, R, Lua, shell, Elixir, Zig, PowerShell, Julia, plus Vue and Svelte single-file components, Astro, and Jupyter and Databricks notebooks. Backend, frontend, mobile, smart contracts, data scripts, it's broadly covered, one of the widest spreads among tools in this category.
For a language Tree-sitter doesn't have a grammar for, there's an escape hatch: write a custom language mapping in .code-review-graph/languages.toml in your repo and wire up the grammar yourself. Niche languages or homegrown DSLs aren't shut out, but the trade-off is that you maintain that mapping yourself, which has a learning curve. On platforms, 15+ as above; on storage, SQLite plus Tree-sitter, fully local, graph data stays in your repo. For community, the site at code-review-graph.com has docs, there's a Discord, it's listed on Trendshift, and it's MCP-compatible.
8. Who It's For, and Where It Falls Short
The fit is clear: developers with a large codebase who use coding agents often, are sensitive to token cost, or keep hitting the context window; monorepo maintainers; and teams doing large-scale code review who need to trace the blast radius of changes. The Python 3.10+ requirement is a non-issue for most, and uv installs it in one line.
The limits are worth being honest about. First, language coverage is wide but not infinite; niche languages or homegrown DSLs need a custom grammar, which is maintenance overhead. Second, the initial build on a very large repo (tens of thousands of files) takes a while; incremental updates are fast, but the first full parse isn't zero-wait. Third, after installing the MCP, most editors need a restart to pick up the new tool, so remember to restart the first time. Fourth, and most fundamental: it solves the "context scope" problem, not the "model capability" problem. If the model misunderstands or hallucinates on its own, the graph can't fix that. Think of it as giving the AI a pair of glasses that say "look only at what you should," not as giving the AI a new brain.
code-review-graph isn't complicated. What's complicated is keeping a code-structured graph fresh once it exists. Install it, run build once, and what you save is the tokens and the wait from making an AI re-read the whole repo on every question. To see how much your own project would save, the most direct test is to run the team's comparison method on your repo: log token use before and after the graph, and let the numbers speak for it. It's still gaining stars this week and iterating fast, so before you ship on it, pin the version.
Sources
- code-review-graph GitHub repo (27401 stars / 2536 forks, MIT, Python): https://github.com/tirth8205/code-review-graph
- PyPI package (pip install code-review-graph): https://pypi.org/project/code-review-graph/
- Official site and docs: https://code-review-graph.com