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
Extended access
Why this level
- Reads the project source and builds a local database from it
- Installs hooks and edits agent configuration during setup
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add mcp/code-review-graphDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended 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 affectsMCP
- Transport
- stdio
- Authentication
- not required
Environment variables
CRG_OPENAI_API_KEYsecret- 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.
Related
MCP serversLocal code graph for agents: an MCP server returns entry points, symbol links and change impact in one call
A CLI and MCP server that build a code graph with Tree-sitter so an agent reads only needed functions in review, saving tokens
Deep Graph MCP: a code graph of a repository for agents
Deep Graph MCP
An MCP server that gives an agent a repository code graph: search by meaning, symbol links and the places an edit would touch
An MCP server that builds a code graph of functions, classes, calls and routes and answers the agent's structural queries locally
An MCP server builds a graph of code entities, relations and flows so the agent finds the right files without reading everything
A local code graph with version history: an MCP server that tells the agent who calls a function and what an edit breaks
Comparison with similar tools
Cards that share the main search query, and how they differ.
| Tool | Official | Authentication | Repository stars | Main difference |
|---|---|---|---|---|
| code-review-graph (this card) | no | not required | 32,733 | |
| sanyuan-skills | no | 3,982 | six Claude Code skills | |
| codesight | no | not required | 1,425 | codesight maps a project in one run |
| Trail-code (formerly Graft) | no | 11,233 | a 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.