code-review-graph MCP

Local code structure graph: builds a repository map with tree-sitter and serves the assistant only the context a change actually touches over MCP

  • 32,733 ★ on the repository
  • Last commit
  • MIT
MCP server

Extended access

Why this level

  • Reads the project source and builds a local database from it
  • Installs hooks and edits agent configuration during setup
All reasons and checks

tirth8205/code-review-graph

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add mcp/code-review-graph

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • Reads the project source and builds a local database from it
  • Installs hooks and edits agent configuration during setup

This is third-party code. Review the repository files before installing.

What it does

The tool parses source code with tree-sitter and builds a persistent graph of relations: functions, classes, calls, dependencies. The graph lives locally in the project and updates incrementally through hooks and a watch mode, so it does not need a full rebuild after every commit. Over MCP the assistant asks the graph for compact context around a change instead of re-reading large parts of the codebase. It installs as a package from PyPI, and the install command detects your editors and agents and wires up the MCP server, hooks and rules for each. It ships token-savings benchmarks, a CLI mode and a GitHub Action for review inside a pipeline.

Who it is for. For developers and reviewers who want the assistant to read only the relevant files during review and work in a large repository.

Good fit when

  • The assistant burns too much context re-reading a large repository
  • You need to know precisely what a specific change affects before review
  • You want to hand the agent a dependency map over MCP rather than raw files

Not a fit when

  • A small project where the assistant already sees every file
  • The project language is not covered by the bundled tree-sitter parsers

Example request

Build the code review graph for this project and show what my change affects

MCP

Transport
stdio
Authentication
not required

Environment variables

CRG_OPENAI_API_KEY secret
Key for embeddings via an OpenAI-compatible endpoint, needed only for semantic search
CRG_OPENAI_BASE_URL
Address of an OpenAI-compatible embeddings endpoint, for example a local gateway

Limitations

Requires Python 3.10 or newer. The first build takes time and scales with repository size, some files may fail to parse and then the build is marked partial. The structural graph runs locally without external keys. Semantic search over embeddings is a separate option that needs an embedding provider key or a local gateway such as Ollama in OpenAI mode.

How to disable. Run code-review-graph uninstall in the repository root; it removes its own files and MCP entries and leaves other servers and hooks alone. The --dry-run flag previews changes without applying them.

FAQ

Does data leave the machine?

The structural graph is built and stored locally, with no external keys. Data leaves only if you enable semantic embeddings with a provider key or through a local gateway.

Which agents does it support?

The install command can configure several editors and agents, including Claude Code, Codex, Cursor, Windsurf, OpenCode, Gemini CLI and GitHub Copilot. You can target one with the --platform flag.

Discussion

No questions or reviews yet.

Local code graph for agents: an MCP server returns entry points, symbol links and change impact in one call

MCP serverExtended access77.5KRepository stars

A CLI and MCP server that build a code graph with Tree-sitter so an agent reads only needed functions in review, saving tokens

CLIExtended access76Repository stars

An MCP server that builds a code graph of functions, classes, calls and routes and answers the agent's structural queries locally

MCP serverExtended access48.5KRepository stars

An MCP server builds a graph of code entities, relations and flows so the agent finds the right files without reading everything

MCP serverExtended access50Repository stars
Official

A local code graph with version history: an MCP server that tells the agent who calls a function and what an edit breaks

MCP serverExtended access516Repository stars

Comparison with similar tools

Cards that share the main search query, and how they differ.

ToolOfficialAuthenticationRepository starsMain difference
code-review-graph (this card)nonot required32,733
sanyuan-skillsno3,982six Claude Code skills
codesightnonot required1,425codesight maps a project in one run
Trail-code (formerly Graft)no11,233a CLI that builds a map of your repo's code and keeps team decisions

README in short

The README explains that assistants often re-read large parts of code for a single change, and offers a tree-sitter structure graph that serves compact context over MCP instead. The quick start has three steps: install from PyPI, run install to auto-configure editors, and build to parse the code. The uninstall command removes the integration cleanly and leaves other settings untouched. It also documents embedding providers for semantic search, reproducible token-savings benchmarks and a GitHub Action. MIT licensed, needs Python 3.10 or newer.

README badge

Report a problem