{"slug": "cut-tokens-on-ai-code-reviews-with-code-review-graph", "title": "Cut tokens on AI code reviews with code-review-graph", "summary": "A developer released code-review-graph, an open-source tool that parses a codebase with Tree-sitter into a local graph of functions, classes, imports, calls and test coverage, then serves a slice of that graph to AI coding assistants like Claude Code, Codex and Cursor over MCP so reviews read only the files a change touches. The README reports roughly 63x fewer tokens per question at the median across six repos, a figure the writeup says was not independently reproduced, and a cold build of a ~3,000-file repository took about 40 seconds. The tool installs MCP entries, hooks and rules for detected platforms and supports incremental updates via watch mode.", "body_md": "When you ask Claude Code, Codex or Cursor to review a change in a big repo, the agent usually does one of two things. It reads far too many files and burns your context window, or it reads too few and misses the caller your change breaks. Neither is a great way to spend tokens.\n\n[code-review-graph](https://github.com/tirth8205/code-review-graph) takes a different route. It parses your codebase with Tree-sitter into a local graph of functions, classes, imports, calls and test coverage, then serves a small slice of that graph to your assistant over MCP. The assistant reads only the files a change actually touches. The README reports about 63x fewer tokens per question at the median across six repos. We have not reproduced that number ourselves, so treat it as the author's benchmark.\n\n```\npip install code-review-graph          # or: pipx install code-review-graph\ncode-review-graph install              # detect installed AI coding tools and configure each one\ncode-review-graph build                # parse the codebase\n```\n\nThe `install` step detects which AI coding tools you have, writes an MCP server entry for each one, installs hooks and skills where the platform supports them, and adds graph instructions to the platform's rules file. Restart your editor or tool afterwards.\n\nTo configure only one tool, pass a platform:\n\n```\ncode-review-graph install --platform claude-code\ncode-review-graph install --platform cursor\n```\n\nA cold build of a roughly 3,000 file repository took about 40 seconds in the README's measurement. After that, hooks and watch mode keep the graph updated as files change. If some files fail to parse, the build reports a `partial` status and names them, and those files keep their previous graph rows.\n\nOpen the project in your assistant and ask:\n\n```\nBuild the code review graph for this project\n```\n\nThen ask for a review of a branch or diff. The assistant calls the graph's MCP tools to get the blast radius of the change: callers, dependents and the tests that cover it, plus risk scores. That is the \"smallest set of files the assistant needs to read.\"\n\n\"Install tirth8205/code-review-graph in this repo, build the graph, and review my current branch through its MCP tools. List which files the review context included, the blast radius of the change, and any tests that cover it.\"\n\n```\ncode-review-graph uninstall --dry-run    # preview only\ncode-review-graph uninstall              # preview, confirm, apply\n```\n\nUninstall removes only the files and entries it created and leaves your other MCP servers and hooks alone.\n\nStep-by-step card: [Give your AI reviewer only the code that matters](https://dedupedai.com/use-cases/tirth8205-code-review-graph/cut-tokens-on-ai-code-reviews/?utm_source=devto&utm_medium=article&utm_campaign=howto_codereviewgraph). More on the repo: [code-review-graph use cases](https://dedupedai.com/use-cases/tirth8205-code-review-graph/?utm_source=devto&utm_medium=article&utm_campaign=howto_codereviewgraph).\n\nSource repo: [tirth8205/code-review-graph](https://github.com/tirth8205/code-review-graph).\n\nWant the setup commands for 50 AI repos people actually ship with? Get the free AI Repos That Actually Ship pack: [https://dedupedai.com/ship-pack/?utm_source=devto&utm_medium=article&utm_campaign=shippack](https://dedupedai.com/ship-pack/?utm_source=devto&utm_medium=article&utm_campaign=shippack)\n\n**Get one email every Monday with the week's hottest AI repos and exactly how to use them: [subscribe free at dedupedai.com](https://dedupedai.com/join/?utm_source=devto&utm_medium=article&utm_campaign=howto_codereviewgraph)**", "url": "https://wpnews.pro/news/cut-tokens-on-ai-code-reviews-with-code-review-graph", "canonical_source": "https://dev.to/dedupedai/cut-tokens-on-ai-code-reviews-with-code-review-graph-2njp", "published_at": "2026-11-03 02:11:16+00:00", "updated_at": "2026-11-03 02:22:12.196440+00:00", "lang": "en", "topics": ["ai-tools", "ai-agents", "developer-tools", "agent-protocols", "ai-infrastructure"], "entities": ["code-review-graph", "tirth8205", "Claude Code", "Codex", "Cursor", "Tree-sitter", "MCP", "GitHub"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/cut-tokens-on-ai-code-reviews-with-code-review-graph", "markdown": "https://wpnews.pro/news/cut-tokens-on-ai-code-reviews-with-code-review-graph.md", "text": "https://wpnews.pro/news/cut-tokens-on-ai-code-reviews-with-code-review-graph.txt", "jsonld": "https://wpnews.pro/news/cut-tokens-on-ai-code-reviews-with-code-review-graph.jsonld"}}