code-review-graph
Local-first knowledge graph for token-efficient code review through MCP and CLI
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has no known vulnerabilities, low install friction, and solves a real problem—AI code review tools waste tokens by re-reading large parts of your codebase. If you use supported AI coding platforms and want to cut review costs and latency, this is worth trying. The initial setup is one command, and the graph updates automatically. Start with a small project to verify the token savings match your use case.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- For best experience, install uv (optional but recommended for MCP config generation).
- Low friction: pure Python wheel with eight runtime dependencies (networkx, tree-sitter, pyyaml, tomli, watchdog, fastmcp, mcp, tree-sitter-language-pack).
License · maintenance · safety
MIT (permissive) — MIT license (permissive): you can use, modify, and distribute freely with minimal restrictions. No copyleft obligations.
last release 2026-07-18 (27 days) · last repo commit 2026-08-02 · 30,124 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 417,955 downloads/mo, #6,805 on PyPI
Alternatives
Verify before relying
pip install code-review-graph
code-review-graph install
code-review-graph build
# Then ask your AI assistant:
# "Build the code review graph for this project"- Whether the 82x median token reduction benchmark holds across diverse codebases in production use.
- Performance characteristics on projects larger than the 2,900-file test case mentioned.
- Stability of custom language support via languages.toml across different Tree-sitter grammar versions.
What it is and what it does
code-review-graph parses your repository into a structural graph of functions, classes, imports, and their call relationships using Tree-sitter, then makes that graph queryable via MCP (Model Context Protocol) so AI coding assistants can pinpoint exactly which files matter for a code review instead of re-reading your entire codebase. It tracks changes incrementally—when a file is saved or committed, the graph updates in under 2 seconds by diffing only what changed and recomputing affected dependents.
The tool integrates directly into AI coding platforms through a single `install` command that auto-detects your setup and writes the right MCP configuration. It also runs as a GitHub Action to post risk-scored PR reviews. For languages not yet built in, you can add custom parsers by dropping a TOML file into `.code-review-graph/` with grammar and node-type mappings—no fork or code changes needed.
Use it for
- Reduce token spend in monorepo reviews: exclude thousands of unrelated files and focus context on the files actually affected by a change.
- Integrate code review into CI/CD: run as a GitHub Action on pull requests to post automated, risk-scored reviews without sending source code externally.
- Speed up incremental analysis: keep the graph updated via file-save hooks or watch mode so each review query runs against fresh, minimal context.
- Support languages beyond the built-in set: add custom languages by writing a TOML config that maps file extensions to Tree-sitter grammars.
- Trace blast radius for refactoring: see every caller, dependent, and test that could break when you change a function or class.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained, has no known vulnerabilities, low install friction, and solves a real problem—AI code review tools waste tokens by re-reading large parts of your codebase. If you use supported AI coding platforms and want to cut review costs and latency, this is worth trying. The initial setup is one command, and the graph updates automatically. Start with a small project to verify the token savings match your use case.
Install
code-review-graph on PyPI
Before you install
Low friction: pure Python wheel with eight runtime dependencies (networkx, tree-sitter, pyyaml, tomli, watchdog, fastmcp, mcp, tree-sitter-language-pack). Active maintenance—last commit 2026-08-02, 30124 stars, released 2.3.7 just 27 days ago.
Requires Python 3.10 or later. For best experience, install uv (optional but recommended for MCP config generation).
License in practice
MIT license (permissive): you can use, modify, and distribute freely with minimal restrictions. No copyleft obligations.
Quickstart
pip install code-review-graph
code-review-graph install
code-review-graph build
# Then ask your AI assistant:
# "Build the code review graph for this project"
Verify before relying
- Whether the 82x median token reduction benchmark holds across diverse codebases in production use.
- Performance characteristics on projects larger than the 2,900-file test case mentioned.
- Stability of custom language support via languages.toml across different Tree-sitter grammar versions.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 8 packagesfastmcpmcpnetworkxpyyamltomlitree-sitter-language-packtree-sitterwatchdog |
| Maintenance | Actively maintained 27 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 417,955 / month, #6,805 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Topic :: Software Development :: Quality Assurance |
Evidence: code_review_graph-2.3.7-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “code review graph ai assistant”
- code-review-graphBuilds a structural knowledge graph of your codebase using…
- graphifyyParses code, docs, PDFs, images, and video into a queryable knowledge…
- hindsight-api-slimHindsight-api-slim provides a persistent memory system for AI agents…
Give your agent the search over MCP, or paste the wish link into any chat.
More Quality Assurance packages
Coverage.py measures which lines of Python code are executed during test runs, reporting coverage percentages and identifying untested code paths.
Install it if you want to measure test completeness or enforce coverage thresholds in your project.
Ruff is a Python linter and code formatter written in Rust that combines linting, formatting, and code fixing into a single tool, replacing Flake8, Black, isort, and related utilities.
Pexpect spawns and controls interactive console applications by sending input and matching output patterns, automating tasks that would otherwise require manual interaction.
Black reformats Python source code to a consistent style by parsing entire files and rewriting them according to an opinionated, deterministic set of rules, eliminating manual formatting decisions.
pytest-xdist distributes pytest tests across multiple CPU cores or machines to speed up test execution, with the simplest usage being `pytest -n auto` to spawn workers equal to available CPUs.
Install it if your test suite takes long enough that parallelization would save meaningful time.
Validates AWS CloudFormation templates in YAML or JSON format against resource provider schemas and best practices, checking property values and configuration correctness.
Install it if you work with CloudFormation templates.
See also graphifyy · jcodemunch-mcp · trailmark · tree-sitter-zig · tree-sitter-php · tree-sitter-java · tree-sitter-objc · tree-sitter-swift · tree-sitter-json · tree-sitter-typescript