PlugWiki
Code Review Graph logo

Code Review Graph MCP Server: Setup for Claude Code, Cursor and Other Apps

CommunityLocal
GetPyPIcode-review-graphtirth8205/code-review-graph

Gives Claude, Cursor and other assistants a map of your codebase so reviews read only what matters.

Code Review Graph builds a map of your codebase and gives Claude, Cursor and other assistants tools to ask it questions. It shows what a change could break, scores changes by risk and finds untested hotspots, so reviews read only the code that matters. It runs on your computer and keeps the map in a file in your project. One tool can rewrite source files, so preview before you apply.

Good for

  • Developers who review pull requests with an assistant and want it to read less code
  • Teams with large repos where the assistant keeps re-reading the same files
  • Claude Code users who want a persistent map of the codebase

Works in

12 should work

Tap an app to see how to set it up and any known problems.

Install Code Review Graph MCP

Claude Code

  1. 1

    Copy this prompt.

    Add the Code Review Graph MCP server to Claude Code. Run this command:
    
    claude mcp add code-review-graph -- uvx code-review-graph serve
    
    Then check that it loaded and tell me if I need to sign in or restart.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

Requires uv (Python).

Read-only mode: Add --tools followed by a comma-separated list of read tools to the server arguments, for example query_graph_tool,detect_changes_tool. Only those tools are exposed.

Install the package first, then use this entry so your app starts the server. The project also has its own install command that finds the AI tools on your computer and sets up each one, including hooks and skills; the README recommends it. Add the tools option to the server arguments to expose only the tools you list. Python 3.10 or newer is needed. Without uv, install the package and point your app at its serve command.

From the project README. Source.

Tools

  • Gives a tiny summary to start with

    Returns graph stats, a risk score, top areas and suggested next tools in about 100 tokens. The tool says to call it first.

    Try: “Give me a quick overview of this codebase before we start.”

    Read · get_minimal_context_tool

  • Scores your changes by risk for review

    Maps your git changes to the functions, flows and areas they touch and to gaps in tests, then returns a priority-ordered review list.

    Try: “Review my uncommitted changes and tell me what to look at first.”

    Files · detect_changes_tool

  • Builds a focused review pack for a change

    Combines impact analysis with source snippets and review guidance, so a review reads far less code.

    Try: “Prepare review context for my current branch.”

    Files · get_review_context_tool

  • Shows what a change could break

    Lists the functions, classes and files affected by changed files. It finds changed files from git if you do not name them.

    Try: “What could break if I change auth.py?”

    Files · get_impact_radius_tool

  • Answers questions like "who calls this?"

    Runs a set of ready-made queries on the graph, such as callers of a function or what references it.

    Try: “Which functions call parse_config?”

    Read · query_graph_tool

  • Finds code by name, keyword or meaning

    Searches functions and classes by name or keyword, and by meaning once embeddings are built.

    Try: “Find the code that handles retry logic.”

    Read · semantic_search_nodes_tool

  • Explores connections outward from a match

    Finds the best match for your question, then follows connections out to a depth you set, within a token budget.

    Try: “Trace how checkout connects to payments.”

    Read · traverse_graph_tool

  • Shows which execution paths a change touches

    Finds the call chains that pass through the changed files, so you see which user-facing paths are affected.

    Try: “Which flows does my change affect?”

    Files · get_affected_flows_tool

  • Lists the main execution paths

    Lists call chains that start at entry points such as web handlers and commands, most critical first.

    Try: “List the most critical flows in this app.”

    Read · list_flows_tool

  • Shows one execution path in detail

    Returns the full call path of one flow with function names, files and line numbers, and optionally the code.

    Try: “Show the login flow step by step.”

    Read · get_flow_tool

  • Lists clusters of related code

    Lists groups of related code found by clustering, to understand the structure at a high level.

    Try: “What are the main areas of this codebase?”

    Read · list_communities_tool

  • Shows one cluster of related code

    Returns size, cohesion, main language and members of one cluster, with optional detail per member.

    Try: “Tell me about the billing cluster.”

    Read · get_community_tool

Read from the source code

Permissions

medium risk · 4 things to watch

Medium risk

The graph tools only read your code and a local database, but one tool rewrites your source files and others write a database and wiki into your project. Preview renames with a dry run, and use the tool allow-list option to switch off the writing tools.

What it can do

Watch out for

  • One tool edits your source files

    apply_refactor_tool applies a previewed rename inside the repo. Use its dry run first and keep your work in git. github.com

  • It writes files into your project

    The graph database and wiki live in a .code-review-graph folder in the repo, and git hooks can be installed. Add the folder to .gitignore. github.com

  • Cloud embeddings send code text out

    Only if you choose a cloud provider. The default local model keeps everything on your machine. github.com

  • The install step edits other apps' configs

    Its own install command writes MCP entries, hooks, skills and rule text into every supported AI tool it finds, and an uninstall command removes them. github.com

Security advisories

No published security advisories as of Nov 1, 2026.

Technical details
Turning on read-onlyStart the server with --tools (or CRG_TOOLS) and list only the read tools you want, for example query_graph_tool and detect_changes_tool. Every other tool is removed.
Talks toNone for the default local features. Embedding providers you opt in to (Google, OpenAI-compatible, MiniMax, Voyage) receive code text; the README warns about this egress
Sign-in and keysNo account or key for local use. Cloud embedding providers need their own API key variables.

Questions

Do I need an API key?

No. The graph is built locally with no account. Only the optional cloud embedding providers need keys.

Does it send my code anywhere?

Not by default. The graph is a SQLite file in your project. If you choose a cloud embedding provider, code text goes to that provider.

Can I run it read-only?

Yes. Start the server with the tools option to expose only the tools you list, for example the query and change-detection ones. That removes the tools that write.

Which languages does it understand?

It parses code with Tree-sitter and covers many languages and notebooks. The README has the full list and a way to add your own.

Why 30 tools?

The README says it exposes 30 by default and that the descriptions cost about 8,000 tokens per turn, so it suggests limiting the list to the 5 to 10 you use.

Do I set it up by hand or use its install command?

The project has an install command that finds your AI tools and sets each one up. The manual config in the install box does the same for one app.

Information

updated Nov 2, 2026

Publisher
Community
Package
code-review-graph
Registry
PyPI
Transport
stdio
Auth
None
License
MIT
Last commit
Oct 29, 2026
Open issues
103

WebsiteGitHubChangelogIssues

Sources

Docs, issue trackers and discussions this page is built from. Issues, quotes and findings above link to their own source.

Show all 3
  1. code-review-graph README · github.com
  2. code-review-graph on PyPI · pypi.org
  3. MCP tool registrations · github.com

Facts from the official MCP registry, GitHub, npm, PyPI and the Docker catalog. Updated Nov 2, 2026.