Better Code Review Graph MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add better-code-review-graph -- uvx --python 3.13 better-code-review-graph
README.md

Knowledge graph for token-efficient code reviews

better-code-review-graph

mcp-name: io.github.n24q02m/better-code-review-graph

Knowledge graph for token-efficient code reviews -- fixed search, configurable embeddings, qualified call resolution.

Fork of code-review-graph with critical bug fixes, configurable embeddings, and production CI/CD. Parses your codebase with Tree-sitter, builds a structural graph of functions/classes/imports, and gives Claude (or any MCP client) precise context so it reads only what matters.

Features

Feature code-review-graph better-code-review-graph
Multi-word search Broken (literal substring) AND-logic word splitting
callers_of/callees_of Empty results (bare name targets) Qualified name resolution + bare fallback
Embedding sentence-transformers + torch (1.1 GB) qwen3-embed ONNX + LiteLLM (200 MB), dual-mode
Output size Unbounded (500K+ chars) Paginated (max_results, truncated flag)
Tool design 9 individual tools 5 tools: graph + query + review + config + help
Plugin hooks Invalid PostEdit/PostGit Valid PostToolUse

All fixes are submitted upstream as standalone PRs (see Upstream PRs). If all are merged, this repo will be archived.

Quick Start

Claude Code Plugin (Recommended)

claude plugin add n24q02m/better-code-review-graph

Includes MCP server, hooks (SessionStart auto-build, PostToolUse auto-update), and skills (build-graph, review-delta, review-pr).

MCP Server

Option 1: uvx
claude mcp add better-code-review-graph -- uvx --python 3.13 better-code-review-graph
Other MCP clients (Cursor, Codex, Gemini CLI, Windsurf, Cline, Amp, OpenCode)
// Cursor (~/.cursor/mcp.json)
// Windsurf (~/.codeium/windsurf/mcp_config.json)
// Cline (cline_mcp_settings.json)
// Amp (~/.config/amp/settings.json)
// OpenCode (~/.opencode.json)
{
  "mcpServers": {
    "better-code-review-graph": {
      "command": "uvx",
      "args": ["--python", "3.13", "better-code-review-graph"]
    }
  }
}
# Codex (~/.codex/config.toml)
[mcp_servers.better-code-review-graph]
command = "uvx"
args = ["--python", "3.13", "better-code-review-graph"]
// Gemini CLI (~/.gemini/settings.json)
{
  "mcpServers": {
    "better-code-review-graph": {
      "command": "uvx",
      "args": ["--python", "3.13", "better-code-review-graph"]
    }
  }
}
Option 2: Docker
docker run -i --rm n24q02m/better-code-review-graph
Option 3: pip
pip install better-code-review-graph
better-code-review-graph

Claude Code Plugin Details

When installed as a plugin, you get:

Hooks:

  • SessionStart: Auto-builds the code graph when a conversation starts
  • PostToolUse: Auto-updates the graph after file modifications (Write, Edit, MultiEdit, Bash)

Skills:

  • build-graph: Build or rebuild the knowledge graph for the current project
  • review-delta: Review uncommitted changes using graph context
  • review-pr: Review a pull request with structural analysis

Tools

`graph` -- Graph lifecycle

Actions: build | update | stats | embed

Action Description
build Full or incremental graph build. Set `full_rebuild=t

Tools (1)

graphManages the knowledge graph lifecycle including building, updating, and embedding.

Configuration

claude_desktop_config.json
{"mcpServers": {"better-code-review-graph": {"command": "uvx", "args": ["--python", "3.13", "better-code-review-graph"]}}}

Try it

Build the knowledge graph for my current project to enable structural analysis.
Review the uncommitted changes in my codebase using the graph context.
Analyze this pull request using the structural graph to identify relevant changes.
Update the codebase knowledge graph to reflect my recent file modifications.

Frequently Asked Questions

What are the key features of Better Code Review Graph?

Builds a structural map of functions, classes, and imports using Tree-sitter. Supports AND-logic multi-word search for precise code discovery. Provides qualified name resolution for callers and callees. Dual-mode embedding support using ONNX local or LiteLLM cloud. Paginated output to manage large codebase context efficiently.

What can I use Better Code Review Graph for?

Performing token-efficient code reviews on large repositories. Navigating complex call hierarchies within a codebase. Automating graph updates during active development sessions. Reviewing pull requests with structural awareness to focus on relevant changes.

How do I install Better Code Review Graph?

Install Better Code Review Graph by running: claude plugin add n24q02m/better-code-review-graph

What MCP clients work with Better Code Review Graph?

Better Code Review Graph works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Better Code Review Graph docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare