
Code Review Graph MCP Server: Setup for Claude Code, Cursor and Other Apps
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.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Client does not support this transport.
Client does not support this transport.
Install Code Review Graph MCP
Claude Code
- 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
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_toolScores 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_toolBuilds 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_toolShows 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_toolAnswers 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_toolFinds 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_toolExplores 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_toolShows 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_toolLists 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_toolShows 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_toolLists 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_toolShows 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_toolDraws the architecture from the graph
Builds a high-level map from the clusters, with warnings where areas depend heavily on each other.
Try: “Give me an architecture overview with coupling warnings.”
Read ·
get_architecture_overview_toolFinds the most connected code
Lists the functions and classes with the most connections, where changes have the largest blast radius.
Try: “Which parts of the code are most central?”
Read ·
get_hub_nodes_toolFinds chokepoints between code areas
Finds code that sits on many shortest paths between others, which would split the graph if it broke.
Try: “Where are the architectural chokepoints?”
Read ·
get_bridge_nodes_toolFinds weak spots in the codebase
Lists isolated code, tiny clusters and busy code with no tests.
Try: “Where are the untested hotspots?”
Read ·
get_knowledge_gaps_toolFinds unexpected coupling
Scores connections that cross areas or languages or link edge code to central code, to spot odd dependencies.
Try: “Show me surprising dependencies between modules.”
Read ·
get_surprising_connections_toolSuggests review questions
Creates questions from the graph, such as which central code needs tests.
Try: “What should I ask in this review?”
Read ·
get_suggested_questions_toolFinds functions and files over a size
Lists functions, classes or files above a line count, largest first.
Try: “Find functions longer than 200 lines.”
Read ·
find_large_functions_toolPreviews renames and finds dead code
Previews a rename across the code, finds unused code and suggests refactors. It changes nothing by itself.
Try: “Preview renaming get_user to fetch_user.”
Read ·
refactor_toolApplies a previewed rename to your files
Applies the exact text replacements from an earlier preview to your source files, only inside the repo. A dry run shows a diff first, and previews expire after 10 minutes.
Try: “Apply that rename, but show me the diff first.”
Write ·
apply_refactor_toolBuilds or refreshes the code graph
Parses the code into the graph, updating only changed files unless you ask for a full rebuild. The graph is a SQLite file in your project.
Try: “Build the code graph for this repo.”
Write ·
build_or_update_graph_toolWrites a Markdown wiki of the codebase
Creates a page for each cluster and an index in a .code-review-graph/wiki folder in your repo. It only rewrites pages that changed.
Try: “Generate a wiki for this repo.”
Write ·
generate_wiki_toolReads one wiki page
Returns the Markdown of a generated wiki page by cluster name.
Try: “Show the wiki page for the billing cluster.”
Read ·
get_wiki_page_toolLists the repos you registered
Lists repositories in the multi-repo registry stored in your home folder.
Try: “Which repos are registered?”
Read ·
list_repos_toolSearches across your registered repos
Runs the search on each registered repo's graph and merges the results by rank.
Try: “Search all my repos for uses of the Stripe client.”
Read ·
cross_repo_search_toolUsed by the assistant behind the scenes
Recomputes flows, clusters and the search index
Re-runs the slower analysis steps on an existing graph, such as flows, clusters and the keyword index.
Try: “Re-run the graph analysis steps.”
Write ·
run_postprocess_toolBuilds meaning-based search for the graph
Computes vector embeddings for every graph node so search can match by meaning. The default model runs locally; Google, OpenAI-compatible, MiniMax and Voyage providers send text to their services.
Try: “Enable semantic search for this repo.”
Write ·
embed_graph_toolShows how big the graph is
Returns counts of nodes, edges, languages and files and when the graph was last updated.
Try: “Is the graph built and up to date?”
Read ·
list_graph_stats_toolReads the tool's own usage notes
Returns one section of the bundled usage reference, such as commands or troubleshooting.
Try: “How do I use the review commands?”
Read ·
get_docs_section_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
- Read your data
- Create and change things
- Delete things
- Read-only modeHow to turn it on
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-only | Start 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 to | None 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 keys | No 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
Sources
Docs, issue trackers and discussions this page is built from. Issues, quotes and findings above link to their own source.
Show all 3Hide
- code-review-graph README · github.com
- code-review-graph on PyPI · pypi.org
- MCP tool registrations · github.com