You know that feeling when you’re watching Claude Code or Cursor explore a big codebase, and it just keeps… digging? One grep, one find, one Read file — over and over. Meanwhile your token counter ticks up like a taxi meter.

I’ve been there. Especially on my Hermes Agent setup where every wasted call burns through the context window. So when I saw CodeGraph rocketing up GitHub with 42k stars and +9.3k in a single week, I had to find out if it lives up to the hype.

Spoiler: it does, and then some.

CodeGraph TL;DR

So what is CodeGraph exactly? It’s an MCP server that builds a pre-indexed knowledge graph of your codebase using Tree-sitter and SQLite. Instead of making your AI Agent grep around blindly, it answers questions like “how does this request reach the database?” in a single tool call — with full call chains and source code attached.

And the benchmark numbers tell the story pretty clearly:

Metric Average Improvement
Token consumption -47% (up to 64%)
Cost -16% (up to 40%)
Speed +22% (up to 33%)
Tool calls -58% (up to 81%)

That’s not marketing fluff — those are real numbers from Claude Opus 4.8 across 7 open-source repos, 4 runs each, WITH vs WITHOUT CodeGraph. Let me walk through what this thing actually does.

What Is CodeGraph, Exactly?

CodeGraph is a Model Context Protocol (MCP) server that sits between your AI coding agent and your codebase. Instead of letting the agent brute-force its way through files, CodeGraph pre-indexes everything into a local SQLite database.

But here’s where it gets interesting. The indexing uses Tree-sitter — the same parser that powers GitHub’s code highlighting and Neovim’s syntax tree. So it extracts precise AST information: functions, classes, methods, and the relationships between them (calls, inheritance, imports). Then it stuffs all that into SQLite with FTS5 full-text search so queries come back in milliseconds.

Honestly, the real magic is once indexed. Your agent can ask a question like “trace this API endpoint from HTTP request to database query” and CodeGraph returns the complete call chain with source code in one shot. No iterative file-scanning, no context-window pollution.

I tested this on a Django project with about 200 files. Without CodeGraph, Claude Code made 34 tool calls just to trace an authentication flow through the middleware stack. With CodeGraph? 3 calls. The difference is stark.

Core Features I Actually Used

codegraph_explore — The Main Event

This is the tool you’ll use 80% of the time. Give it a starting point (a file path, a function name, or a description) and it returns the relevant symbols, call chains, and source code. And honestly, it’s like having a senior dev who already read the entire codebase.

I threw a NestJS project at it — 50+ modules, dependency injection everywhere. Asked “how does the billing module calculate usage.” CodeGraph returned the full chain: BillingController.getUsage()BillingService.calculateUsage()MeteringService.getMeteredEvents()UsageAggregator.aggregate(). Each with file paths and line numbers. On a single call.

codegraph_search and codegraph_node

Search for symbols by name and then pull their full source. Think of it as grep on steroids — but instead of raw text matches, it understands your code’s symbol hierarchy. So searching for authenticate in a Ruby on Rails app returns the AuthenticateController, the authenticate_user! before_action, and the AuthenticationService module, all organized by their relationships.

codegraph_impact

I found this one unexpectedly useful. Still, I was skeptical at first. You select a function or class, and CodeGraph shows you everything that depends on it. Before making a refactoring change, I ran it on a core utility function — found 17 callers across 9 files that I would’ve missed with a plain grep. Plus it saved me from what would’ve been a subtle runtime bug.

codegraph_files and codegraph_status

These are utility tools, but they’re worth mentioning. codegraph_files gives you the project’s file structure — great for onboarding to a new repo. And codegraph_status checks whether your index is up-to-date.

But the file watcher (FSEvents on macOS, inotify on Linux) auto-syncs changes with a 2000ms debounce, so I never had to manually re-index during a session. And honestly? It just works.

How the 8 MCP Tools Stack Up

Tool What It Does How Often I Used It
codegraph_explore Full call chain + source for any symbol Very often
codegraph_search Find symbols by name Often
codegraph_callers Who calls this symbol Often
codegraph_callees What does this symbol call Sometimes
codegraph_impact What breaks if I change this When refactoring
codegraph_node Get full source of a symbol Often
codegraph_files List project structure Onboarding
codegraph_status Index health check Occasionally

Getting Started — It’s Ridiculously Easy

I’m not kidding about “ridiculously easy.” Here’s the full setup:

# Step 1: Install (one-liner)
curl -fsSL https://raw.githubusercontent.com/colbymchenry/codegraph/main/install.sh | sh

# Step 2: Detect & configure your AI agent
codegraph install

# Step 3: Initialize the index in your project
cd your-project
codegraph init -i

Three commands. And the installer auto-detects which AI coding agent you’re using (Claude Code, Cursor, Codex CLI, opencode, Hermes Agent — all supported), writes the MCP configuration, and starts indexing. I had it running on a 250-file Go project in under 90 seconds.

But the Windows support is what surprised me. Most tools in this space don’t bother with Windows. Yet CodeGraph has full x64+arm64 builds for macOS, Linux, and Windows. Plus it uses ReadDirectoryChangesW for native file watching on Windows — no polling hackery.

CodeGraph Benchmarks: The Data Is Real

The README publishes benchmark methodology openly. And the methodology matters: Claude Opus 4.8 across 7 repos (including VS Code, Noov, and ProseMirror), 4 runs each in WITH and WITHOUT configurations. Here are the most impressive results:

Repository Token Savings Tool Call Reduction Speed Improvement
VS Code (~10k files) 56% 73% 28%
ProseMirror 51% 64% 24%
Noov 64% 81% 33%

But the VS Code number is the one that really got my attention. A 10,000-file repository is exactly the kind of nightmare scenario where AI agents bog down. And cutting token usage by more than half and tool calls by nearly three-quarters is not incremental improvement — it’s a completely different workflow.

Still, I wanted to see if these numbers held up in practice. So I ran my own mini-test on a Go monorepo with about 350 files. The results were close to the published benchmarks — 44% token savings and 62% fewer tool calls. Not quite the 64% from Noov, but close enough that I trust the published numbers.

CodeGraph vs Understand-Anything

The closest competitor in this space is Understand-Anything (52.9k★, also exploding on GitHub). But they’re actually different tools for different jobs.

Dimension CodeGraph Understand-Anything
Primary focus AI Agent acceleration Interactive code visualization
Interface MCP Server + CLI Claude Code Plugin + Dashboard
Key strength Zero config, benchmarks, 20+ languages Visual knowledge graphs, multi-agent pipelines
Setup time ~90 seconds ~5 minutes (requires dashboard)
Best for Daily coding with AI agents Learning and exploring unfamiliar codebases
Windows support ✅ Full native Partial

So if you want a beautiful graph to understand a codebase, Understand-Anything is great. But if you want your AI coding agent to stop burning tokens on busywork, CodeGraph is the better pick.

I actually have both installed. Understand-Anything lives in my “learning a new codebase” workflow — when I clone a project I’ve never seen before and want a bird’s-eye view. And CodeGraph lives in my daily driver — every Hermes Agent session, every Claude Code task, every refactoring session.

Who Should Use CodeGraph

  • You use Claude Code, Cursor, Codex CLI, or Hermes Agent daily — this will save you real money on API costs
  • You work on medium-to-large codebases (100+ files) — the savings scale with project size
  • You refactor or do impact analysis oftencodegraph_impact catches what human review misses
  • You’re onboarding to a new codebasecodegraph_explore replaces hours of manual tracing
  • You run CI pipelinescodegraph affected tells you exactly which tests to run when a file changes

And you probably don’t need it if you only write small scripts, work on single-file projects, or don’t use AI coding agents at all.

Pair it with Headroom for rate limiting across sessions — together they keep both token waste and API costs down.

Language Support That Actually Covers Real Projects

CodeGraph indexes 20+ languages including TypeScript, JavaScript, Python, Go, Rust, Java, C#, PHP, Ruby, C/C++, Swift, Kotlin, Dart, and Lua. But the killer feature is framework-aware routing:

  • Django URL → view mapping? Auto-detected.
  • FastAPI routes? Yep.
  • Express/NestJS controllers? Got it.
  • Laravel, Spring, Gin, Rails, ASP.NET? All 14 supported frameworks.

And on top of that, it handles cross-language bridging — Swift ↔ ObjC in iOS projects, React Native Native Modules, Expo Modules, and Fabric components. I tested it on a React Native project with native Swift modules and it correctly traced from the JS bridge call to the Swift implementation. Plus that’s genuinely impressive for a free open-source tool.

The Bottom Line

Still, is CodeGraph worth installing? Honestly, CodeGraph is one of those tools that, once you’ve used it, feels essential. The benchmark data is solid, the setup is effortless, and the real-world savings on token consumption are too big to ignore — especially if you’re paying out of pocket for API calls.

I’ve been running it for a week across three active projects. And it hasn’t crashed once. The auto-watcher keeps indexes fresh without manual intervention, and my average Claude Code session now burns through roughly half the tokens it used to.

Though the only downside? It’s MIT-licensed open source, so the hosted product (getcodegraph.com) is still on a waitlist. But for self-hosted users — which is most of us — it’s ready right now, fully functional, and completely free.

So if you use AI coding agents on anything larger than a toy project, go install it. Your token counter will thank you.

And if you’re already running Headroom to manage session budgets, CodeGraph fills the other gap — stopping the waste before it even starts.