code-review-graph
Stop burning tokens. Start reviewing smarter.
code-review-graph builds a structural map of your codebase with Tree-sitter, tracks changes incrementally, and provides precise context to AI assistants via MCP so they read only what matters.
Token reduction: 38x–528x across 6 real repositories (compared to dumping full files into context).
Quick Start
pip install code-review-graph
code-review-graph install # auto-detects all supported AI tools
code-review-graph build # parse your codebaseThen ask your AI assistant: Build the code review graph for this project
Supported Platforms
Auto-detects and configures for: Codex, Claude Code, CodeBuddy Code, Cursor, Windsurf, Zed, Continue, OpenCode, Antigravity, Gemini CLI, Qwen, Qoder, Kiro, GitHub Copilot (VS Code), GitHub Copilot CLI
Target one with code-review-graph install --platform codex etc.
MCP Tools (30 total)
Includes tools for: codebase querying, dependency analysis, change detection, semantic search, impact analysis (blast radius), cross-repo search, and 5 workflow prompts (review_changes, architecture_map, debug_issue, onboard_developer, pre_merge_check).
Optional Features
| Dependency | Feature |
|---|---|
[embeddings] | Local vector embeddings (sentence-transformers) |
[google-embeddings] | Google Gemini embeddings |
[communities] | Community detection (igraph) |
[enrichment] | Python call-resolution (Jedi) |
[wiki] | Wiki generation with LLM summaries (ollama) |
[all] | Everything |
Config
Create .code-review-graphignore to exclude tracked paths. Embeddings support OpenAI-compatible endpoints (Azure, vLLM, LiteLLM, LocalAI, Ollama in OpenAI mode).
Filter exposed tools: code-review-graph serve --tools query_graph_tool,semantic_search_nodes_tool,detect_changes_tool
Uninstall
code-review-graph uninstall --dry-run # preview
code-review-graph uninstall # interactive
code-review-graph uninstall --yes # non-interactiveLinks
- Website
- PyPI
- Docs: Usage
- Docs: FAQ
- Discord
- Licence: MIT