Skip to content

Summary

Local code knowledge graph served over MCP: Tree-sitter maps functions, calls, imports and tests so an assistant reviews a change by its blast radius instead of re-reading the codebase.

Features

  • Risk-scored change impact from a diff
  • Callers, callees, tests and import paths from one graph
  • Architecture views: communities, flows, hubs and bridges
  • 30 MCP tools (25 read-only) and 5 workflow prompts
  • Local SQLite graph, incremental updates via hooks or watch mode
  • One install command configures detected AI coding tools

Installation

Set up this MCP server in your favorite AI agent — copy a ready-made configuration below.

Any MCP-compatible agent

Most agents (Claude, Cursor, Windsurf, VS Code, and more) read a standard mcpServers configuration.

  1. Open your agent's MCP configuration file.
  2. Merge the snippet below into it.
  3. Restart the agent — the "code-review-graph" tools will be available.
{
  "mcpServers": {
    "code-review-graph": {
      "command": "code-review-graph",
      "args": [
        "serve"
      ]
    }
  }
}

Description

code-review-graph builds a structural map of a repository with Tree-sitter — functions, classes, imports, call sites, inheritance and tests in one graph — keeps it updated incrementally, and serves compact context to AI coding tools over MCP. The aim is that an assistant reviewing a change reads only the files the change can reach, rather than large parts of the codebase.

What the MCP server exposes

30 tools, 25 of them read-only (marked readOnlyHint). Highlights:

  • detect_changes_tool — maps a diff to affected functions, flows and test gaps with a risk score
  • get_impact_radius_tool, get_review_context_tool, get_minimal_context_tool
  • query_graph_tool (callers, callees, tests, imports, path_to), traverse_graph_tool, semantic_search_nodes_tool
  • architecture tools: communities (Leiden clustering), execution flows, hub and bridge nodes, knowledge gaps, surprising coupling
  • refactor_tool / apply_refactor_tool, wiki generation, and cross-repository search over registered repos

It also ships five MCP prompts (review, architecture, debug, onboarding, pre-merge). CRG_TOOLS or --tools limits which tools are exposed.

Languages and storage

Dozens of languages and formats are parsed, from Python, TypeScript, Go, Rust, Java and C# to Terraform, SQL, Ansible and Jupyter notebooks; others can be mapped in languages.toml. The graph is one SQLite file in .code-review-graph/, with no cloud service; embeddings for semantic search are opt-in.

Setup

Python 3.10+. uv tool install code-review-graph, then code-review-graph install (detects and configures Claude Code, Codex, Cursor, Windsurf, Zed, Gemini CLI, GitHub Copilot and others, with a --dry-run preview) and code-review-graph build. serve runs the MCP server over stdio; serve --http serves streamable HTTP on localhost:5555. A CLI and a GitHub Action for risk-scored PR comments come with it. MIT licensed.

New

MCP server that parses a multi-language codebase with Tree-sitter into a knowledge graph, so agents can resolve definitions, trace callers, query structure in plain English and patch code.

MCP: jCodeMunch

by jgravelle

New

MCP server that indexes a codebase with tree-sitter and lets agents fetch code by symbol rather than by file, plus structural queries like blast radius, importers and dead code.

MCP: Semgrep MCP

by Semgrep

Semgrep's official MCP server — scan code for security vulnerabilities, write and test custom rules, and pull findings from Semgrep Cloud, from inside an agent session.

Browse all MCP servers →