code-review-graph — MCP Tool for Codebase Analysis
A Python MCP server that builds a dependency/architecture graph of your codebase and exposes it as tools for Claude Code.
Why / When to Use
Use to give Claude Code structural awareness of a large codebase — module communities, dependency relationships, architecture overview — without loading every file into context.
Core Concept / Commands
Installation
pipx install code-review-graph
# Creates isolated venv at ~/.local/share/pipx/venvs/code-review-graph/
# Executable at ~/.local/bin/code-review-graphCurrent version: 2.3.3
How it works
On first run per project, it builds a graph index (stored in .code-review-graph/ in the project root), analysing:
- File dependency relationships
- Module communities (clusters of related files)
- Architecture overview
Known tools it exposes
get_minimal_context_tool— minimal context for a changedetect_changes_tool— detect what changedget_architecture_overview_tool— high-level architecturelist_communities_tool— module community clusters
code-review-graph --help # see all toolsMCP configuration (in Claude Code)
// ~/.claude/mcp.json or project .claude/mcp.json
{
"mcpServers": {
"code-review-graph": {
"command": "code-review-graph",
"args": []
}
}
}Active in these projects
~/projects/stream/—.code-review-graph/index exists~/projects/codeops/—.code-review-graph/index exists~/.code-review-graph/— global fallback
Gotchas
- Graph index needs to be rebuilt when codebase changes significantly
- MCP logs stored at
~/.cache/claude-cli-nodejs/-home-phurix-projects-<name>/mcp-logs-code-review-graph/
Source
Conversation: “API documentation analysis” — 2026-05-18