tirth8205/code-review-graph
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 context reductions on reviews and large-repo workflows.
What it solves
AI coding assistants often waste tokens and lose precision by re-reading entire codebases or scanning large chunks of irrelevant files during code reviews. code-review-graph reduces this token waste by providing AI assistants with a precise, structural map of the codebase, ensuring they only read the files that are actually affected by a change.
How it works
The tool uses Tree-sitter to parse repositories into an Abstract Syntax Tree (AST), which is then stored as a graph of nodes (functions, classes, imports) and edges (calls, inheritance, test coverage).
When a file is changed, the system performs a "blast-radius analysis" to trace every caller, dependent, and test that could be affected. This minimal set of files is then provided to the AI assistant via the Model Context Protocol (MCP), allowing the AI to focus only on the relevant context rather than the whole corpus.
Who it’s for
- Developers using AI coding tools (such as Cursor, Claude Code, Windsurf, Zed, etc.) who want to reduce token costs and improve review accuracy.
- DevOps/CI Engineers looking to integrate risk-scored PR reviews into their GitHub Actions pipeline to identify affected execution flows and test gaps.
Highlights
- Massive Token Reduction: Achieves a median per-question token reduction of ~65x compared to whole-corpus baselines.
- Cros-Platform Integration: Auto-detects and configures MCP for a wide array of platforms including Cursor, Zed, Continue, and GitHub Copilot.
- Broad Language Support: Supports a vast range of languages (Python, JS/TS, Go, Rust, Java, C++, etc.) and Jupyter/Databricks notebooks.
- Incremental Updates: Re-indexes only changed files, allowing updates on large projects to happen in seconds.
- Local-First CI: The GitHub Action builds and queries the graph entirely on the CI runner, ensuring source code never leaves the environment.
Related
- Project
- Project
- Project
- Project
- Project