code-review-graph

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

MCP server

Medium risk

We rate an entry medium when the tool runs code, makes network calls or reads project files. Check what exactly it does before installing.

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, checks the risk and pins the version.

Other ways to install

Run in a terminal

claude mcp add --transport stdio code-review-graph -- uvx code-review-graph serve

Or add to the file .mcp.json, in the project

{
  "mcpServers": {
    "code-review-graph": {
      "command": "uvx",
      "args": [
        "code-review-graph",
        "serve"
      ]
    }
  }
}

If the file already exists, add the server inside the mcpServers key.

Install in Cursor

The button opens the agent and offers to add the server. If nothing happens, copy the config below.

Add to the file ~/.cursor/mcp.json, for all projects

{
  "mcpServers": {
    "code-review-graph": {
      "command": "uvx",
      "args": [
        "code-review-graph",
        "serve"
      ]
    }
  }
}

If the file already exists, add the server inside the mcpServers key. For a single project, put the same block into .cursor/mcp.json.

Install in VS Code

The button opens the agent and offers to add the server. If nothing happens, copy the config below.

Run in a terminal

code --add-mcp '{"name":"code-review-graph","type":"stdio","command":"uvx","args":["code-review-graph","serve"]}'

Or add to the file .vscode/mcp.json, in the project

{
  "servers": {
    "code-review-graph": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "code-review-graph",
        "serve"
      ]
    }
  }
}

If the file already exists, add the server inside the servers key.

Run in a terminal

codex mcp add code-review-graph -- uvx code-review-graph serve

Or add to the file ~/.codex/config.toml, for all projects

[mcp_servers.code-review-graph]
command = "uvx"
args = ["code-review-graph", "serve"]

If the file already exists, append the block to the end.

Run in a terminal

gemini mcp add -s user code-review-graph uvx code-review-graph serve

Or add to the file ~/.gemini/settings.json, for all projects

{
  "mcpServers": {
    "code-review-graph": {
      "command": "uvx",
      "args": [
        "code-review-graph",
        "serve"
      ]
    }
  }
}

If the file already exists, add the server inside the mcpServers key.

Add to the file ~/.config/devin/mcp_config.json, for all projects

{
  "mcpServers": {
    "code-review-graph": {
      "command": "uvx",
      "args": [
        "code-review-graph",
        "serve"
      ]
    }
  }
}

If the file already exists, add the server inside the mcpServers key. Legacy Cascade keeps the MCP config in ~/.codeium/windsurf/mcp_config.json.

Formerly Windsurf.

Add to the file cline_mcp_settings.json, for all projects

{
  "mcpServers": {
    "code-review-graph": {
      "command": "uvx",
      "args": [
        "code-review-graph",
        "serve"
      ]
    }
  }
}

If the file already exists, add the server inside the mcpServers key. Open the settings file in Cline: MCP Servers tab, Configure MCP Servers.

Add to the file .roo/mcp.json, in the project

{
  "mcpServers": {
    "code-review-graph": {
      "command": "uvx",
      "args": [
        "code-review-graph",
        "serve"
      ]
    }
  }
}

If the file already exists, add the server inside the mcpServers key.

A fork of Roo Code, same .roo folders.

Add to the file opencode.json, in the project

{
  "mcp": {
    "code-review-graph": {
      "type": "local",
      "command": [
        "uvx",
        "code-review-graph",
        "serve"
      ]
    }
  }
}

If the file already exists, add the server inside the mcp key.

Add to the file ~/.config/zed/settings.json, for all projects

{
  "context_servers": {
    "code-review-graph": {
      "command": "uvx",
      "args": [
        "code-review-graph",
        "serve"
      ]
    }
  }
}

If the file already exists, add the server inside the context_servers key.

Add to the file .codeassistant/mcp.json, in the project

{
  "mcpServers": {
    "code-review-graph": {
      "command": "uvx",
      "args": [
        "code-review-graph",
        "serve"
      ]
    }
  }
}

If the file already exists, add the server inside the mcpServers key.

You will need: uv

Checked against the repository on Sep 24, 2026, commit 6b12d11.

Text for your agent

Install the tool: pip install code-review-graph, then code-review-graph install and code-review-graph build. After that ask me to build the review graph for the project.

Other ways from the author
pip install code-review-graph
code-review-graph install
code-review-graph build

install detects your agents and wires up the MCP server, build parses the code. You can also use pipx install code-review-graph.

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

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.

MCP

Transport
stdio
Authentication
not required
Environment variables
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

Security check

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

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.

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.

Editors’ pick

A skills library that gives coding agents a development process: brainstorming, planning, TDD, subagents and code review

PluginMedium riskNo VPN needed292.5KRepository stars
Editors’ pick

Small composable skills for engineering with agents: plan grilling, TDD, bug diagnosis, code review and architecture

SkillLow risk271.4KRepository stars
Editors’ pick

GitHub toolkit for spec-driven development: the specify CLI adds agent commands and skills to a project, from principles to implementation

CLIMedium riskNo VPN needed139.3KRepository stars

Reference MCP servers

Model Context Protocol servers

Official

Official reference MCP servers: Filesystem, Fetch, Git, Memory, Sequential Thinking, Time and Everything

MCP serverMedium risk90.6KRepository stars
Foxx AIcode-review-graph

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.