code-review-graph
Local-first code intelligence graph for MCP and CLI. Builds a persistent map of your codebase so AI coding tools read only what matters, with benchmarked context reductions on reviews and large-repo workflows.
code-review-graph is an MCP server that builds a persistent, local-first knowledge graph of your codebase using Tree-sitter AST parsing and exposes it through 30 MCP tools for AI coding assistants. It provides blast-radius analysis, semantic search, execution flow detection, and incremental updates to help AI agents understand code structure without re-reading entire repositories. The server reduces token consumption by ~65x median (up to 376x) by returning only structurally relevant context for reviews, impact analysis, and architecture questions. It supports 40+ languages including Python, TypeScript, Go, Rust, Java, PHP (with Laravel framework awareness), and Jupyter notebooks, storing everything in a local SQLite database with optional vector embeddings.
Key Features
Use Cases
- 01Give AI coding assistants precise blast-radius context for code reviews without reading the entire repository
- 02Automate PR risk scoring in CI with GitHub Actions that flag high-risk functions and test gaps
- 03Query execution flows, call chains, and dependency graphs via MCP to debug or understand legacy codebases
- 04Perform semantic code search across multiple repositories using the multi-repo daemon and cross-repo MCP tools
- 05Generate architecture documentation and community-based wikis from detected code structure
- 06Identify refactoring opportunities, dead code, and structural weaknesses with hub/bridge/gap analysis tools
Related MCP Servers
View moremarkitdown
Python tool for converting files and office documents to Markdown.
firecrawl
The context API to search, scrape, and interact with the web at scale. 🔥
prompts.chat
f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.
langflow
Langflow is a powerful tool for building and deploying AI-powered agents and workflows.
code-review-graph — FAQ
What is code-review-graph?+
code-review-graph is an MCP server that parses your codebase into a local SQLite knowledge graph and exposes 30 tools (query, search, impact analysis, review, architecture) for AI coding assistants via the Model Context Protocol. It reduces token consumption by returning only structurally relevant files and edges instead of full-corpus reads.
How do I install and connect it to Claude Desktop or Cursor?+
Install via `pip install code-review-graph` or `pipx install code-review-graph`, then run `code-review-graph install` to auto-detect and configure all installed AI tools, or `code-review-graph install --platform cursor` for a single client. Build the graph with `code-review-graph build`, then restart your editor.
Which AI clients does it work with?+
Supports Claude Code, Claude Desktop, Cursor, Windsurf, Zed, Continue, Codex, OpenCode, Antigravity, Gemini CLI, Qwen, Qoder, Kiro, GitHub Copilot, GitHub Copilot CLI, CodeBuddy, and Hermes. The installer detects installed platforms and writes the MCP config for each.
Do I need API keys or external services?+
No API keys are required for core functionality; the graph is stored locally in SQLite. Vector embeddings are optional: use local sentence-transformers (no key), Google Gemini (GOOGLE_API_KEY), Voyage AI (VOYAGE_API_KEY), or OpenAI-compatible endpoints (CRG_OPENAI_API_KEY).
Is it free and open source?+
Yes, code-review-graph is MIT-licensed and fully open source. All processing runs locally; no telemetry or cloud dependencies unless you opt into cloud-based vector embeddings.
How do incremental updates work?+
Git pre-commit hooks, editor hooks, or the `crg-daemon` watch daemon trigger incremental updates that re-parse only files whose SHA-256 hash changed. A two-file edit on a 3,000-file repo refreshes in ~2.5 seconds, with ~1.4s process startup overhead.
How do I install code-review-graph?+
Open the source repository on GitHub and follow its README. code-review-graph is a mcp server — MCP Agents Market links you directly to the official repo.
Is code-review-graph free?+
code-review-graph is an open-source project hosted on GitHub. Check the repository for its license and any usage requirements.