Open Source MIT License

Been struggling with AI coding assistants re‑reading my entire codebase on every task for months, then found this repo and spent 20 minutes wondering why I didn’t find it sooner. Code Review Graph builds a local graph of your entire project so Claude instantly knows how every file is wired together. It runs 100% locally on your machine, maps out your entire repository structure automatically, and gives Claude Code the exact context it needs to build without hallucinating.

code-review-graph-repo.jpg Code Review Graph GitHub repository homepage

Code Review Graph is for developers using AI coding assistants, solving the problem of inefficient full‑repo scanning and hallucinations by providing precise, incremental codebase context. 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.

What Is Code Review Graph?

Code Review Graph is an open‑source tool that creates a structural graph of your codebase locally, using Tree‑sitter for parsing and incremental tracking to maintain an up‑to‑date map of file relationships. Instead of making your AI assistant re‑scan the entire repository for every task, it provides a precise, contextual subset of files that are actually relevant to the current change.

[!NOTE] The tool integrates via the Model Context Protocol (MCP), meaning it works seamlessly with Claude Code and other MCP‑compatible AI assistants without requiring custom integrations or plugins.

How It Works: Tree‑sitter & Incremental Tracking

Component Function
Tree‑sitter Parser Parses source files to extract AST (Abstract Syntax Tree) nodes for accurate understanding of code structure
Dependency Graph Builds a graph of file relationships (imports, exports, references) across the entire repository
Incremental Tracking Watches for file changes and updates only the affected parts of the graph, avoiding full rescans
MCP Server Exposes the graph to AI assistants via the Model Context Protocol, providing context‑aware file access
Local‑only Operation All processing happens on your machine, no data leaves your system

Key Features

  • Zero Cloud Dependency: Runs entirely locally, ensuring code privacy and offline operation.
  • Precision Context: Delivers only the files relevant to the current task, reducing token waste.
  • Fast Incremental Updates: Changes are tracked in real‑time without re‑parsing the entire codebase.
  • Multi‑language Support: Works with any language supported by Tree‑sitter (JavaScript, Python, Go, Rust, etc.).
  • Seamless Integration: Connects to Claude Code and other AI tools via standard MCP.

code-review-graph-repo-threads.jpg Community discussion about Code Review Graph’s value

Community Insight & Impact

“this is exactly the layer code agents keep missing. once the repo gets big, a solid map is worth more than another clever prompt” , @mktpavlenko

This comment captures the core value: as repositories grow, understanding relationships between files becomes more critical than raw prompting power. Code Review Graph provides that missing structural intelligence.

Why This Changes AI‑Assisted Development

Code Review Graph addresses the fundamental scaling problem of AI‑assisted coding: context management. Here’s how it transforms the workflow:

  • Eliminates Redundant Scanning: No more waiting for the AI to re‑read thousands of files on every query.
  • Reduces Hallucinations: With accurate dependency graphs, AI assistants make fewer incorrect assumptions about code relationships.
  • Improves Performance: Smaller context windows mean faster responses and lower computational overhead.
  • Enables Larger Projects: Makes AI assistance viable for monorepos and enterprise‑scale codebases.
  • Preserves Privacy: Local processing ensures sensitive code never leaves your machine.

Pairs well with: Claude-peers-mcp — sync your project graph context across multiple Claude sessions.

Case study: Claw Code — use a graph map to understand the complex Rust harness behind flagship AI products.

Code Review Graph represents a shift from brute‑force context dumping to intelligent context delivery. By giving AI assistants a map of the territory instead of making them re‑explore it every time, it unlocks more reliable, efficient, and scalable AI‑assisted development.