Which CodeGraph alternative is worth installing?
It depends on whether you want better code navigation or a smaller bill, because CodeGraph's replacements split cleanly into those two camps and almost nobody says which one they're in. If you want compiler-grade symbol navigation, serena is the strongest option here and it isn't close. If you want the session to cost less, navigation alone won't get you there — CodeGraph itself showed no measurable saving end to end in the open THOL benchmark, ranking ninth of twelve. That's not a knock on the idea. Reducing tool calls on navigation-heavy tasks is real work, and CodeGraph does it well with framework-aware routing across 14 frameworks. It just doesn't move a bill that's dominated by file reads, command output and replayed transcript — three things a code index doesn't touch. Disclosure before the ranking: the THOL benchmark cited here is maintained by me. It's public and reproducible, and I've kept in the results that don't favour my own tool, but it isn't an independent third party. TL;DR: serena is the best pure code-navigation replacement. Tokenade is the pick if navigation was a means to a cheaper session rather than the goal. tokensave is the strongest free Rust option, claude-context has the best retrieval quality if you'll pay for infrastructure, and mcp-codebase-index is the lightest thing that works.How we ranked these
Five criteria, applied the same way to every entry including mine:- Retrieval quality. Keyword recall, dense vector search, or real compiler symbol resolution — these are very different guarantees sold under the same "code intelligence" label.
- Measured effect on session cost. End to end, from the open THOL benchmark where the tool appears. Where it doesn't, I say so instead of quoting a vendor's own number as if it were comparable.
- Install weight. Bundled runtime, external vector database, or a single binary.
- Language and framework coverage.
- Licence and true cost, including infrastructure that "free" sometimes requires.
1. serena — the strongest pure code navigation
serena is the best CodeGraph replacement if navigation quality is what you actually care about, because it drives real Language Servers instead of approximating them.- What it is: an MCP server (MIT, ~25k stars) that turns coding agents into symbol-aware agents via LSP — compiler-grade symbol navigation, references, type hierarchy and symbol-level editing, plus persistent project memories.
- Strengths: LSP means the symbol resolution is the compiler's, not a heuristic index's. Where CodeGraph gives you FTS5 keyword recall over a tree-sitter index, serena gives you what your IDE gives you. Symbol-level editing and project memories are genuinely differentiated, and it's the most-starred tool in this comparison.
- Limitations: it is navigation and nothing else — no output filtering, no sandboxed execution, no savings dashboard. It is not in the current THOL campaign, so there's no published end-to-end cost measurement for it; treat any savings claim as unverified.
- Best for: large typed codebases where symbol precision matters more than anything on this list.
2. Tokenade — the pick if navigation was a means to a cheaper bill
Tokenade is the right swap if you installed CodeGraph hoping the bill would drop, since it's the only one of the twelve tools in the open benchmark that measurably lowered session cost.- What it is: a dependency-free binary between your agent and its tools, combining on-device semantic code search with output filtering, skeleton compression, sandboxed execution and MCP proxying, behind a savings dashboard.
- Strengths: 39% cheaper on long sessions than running no tool at all. Its semantic search runs fully on-device — no vector database, no embedding API key, no model download — which is the practical gap between it and claude-context below. Because it also handles command output and MCP manifests, it covers the cost sources a pure index leaves untouched. One command, native hooks for 18 agents, MIT source-available.
- Limitations: its code intelligence is retrieval-first, not compiler-grade — for pure symbol precision on a large typed codebase, serena is better and I'd say so to your face. It's freemium where most of this list is unconditionally free. And it's my product.
- Best for: people whose real goal was a smaller invoice, across more than one agent.
3. tokensave — the strongest free Rust option
tokensave is the closest like-for-like replacement for CodeGraph, with broader language coverage and more to do once you're indexed.- What it is: a Rust MCP server with a semantic knowledge graph (libSQL, FTS5) built from tree-sitter extraction across 34 languages, exposing 48 MCP tools including atomic edit primitives and multi-branch indexing.
- Strengths: 34 languages against CodeGraph's 20+, plus call-graph traversal, dead-code detection and code-health analytics. Multi-branch indexing lets it diff and search across branches without checking them out, which nothing else here does. Installs via Homebrew, Scoop, cargo or prebuilt binaries with multi-agent auto-detection. Fully free and open source.
- Limitations: no dense vector search — keyword and graph recall only, same fundamental ceiling as CodeGraph. No output filtering, no skeleton compression. Not in the current THOL campaign, so no published end-to-end cost figure.
- Best for: polyglot repositories and anyone who wants navigation plus editing primitives for free.
4. claude-context — the best retrieval, at an infrastructure price
claude-context has the most sophisticated retrieval in this comparison, and the highest hidden running cost.- What it is: an MCP server providing hybrid BM25 + dense vector search with AST-aware chunking and managed cloud hosting.
- Strengths: genuine dense semantic search rather than keyword recall, which is the single biggest quality gap in CodeGraph's design. Their published tests report around 40% token reduction at equivalent retrieval quality. Production-grade and well engineered.
- Limitations: requires a Milvus or Zilliz Cloud account and an embedding API key before first use — so "free and open source" carries ongoing infrastructure and API costs that none of the other entries do. Single mechanism: no output filtering, no manifest handling. Not in the current THOL campaign.
- Best for: teams already running vector infrastructure who want retrieval quality above all else.
5. mcp-codebase-index — the lightest thing that works
mcp-codebase-index is the right pick if CodeGraph's bundled runtime is more machinery than you wanted.- What it is: a zero-dependency Python MCP server using the standard library's AST for structural indexing, plus regex for TS/JS, Go, Rust, C# and Markdown, exposing 18 query tools.
- Strengths: genuinely dependency-free, with a persistent disk cache and sub-millisecond symbol lookup. If your repo is Python-first, the stdlib AST path gives you real structural understanding with essentially no install cost.
- Limitations: the non-Python languages are handled by regex, not a parser, so recall outside Python is noticeably weaker than tree-sitter-based tools. No dense search, no output filtering. Not in the current THOL campaign.
- Best for: Python-heavy repositories and minimal-footprint setups.
6. codesight — indexing plus impact analysis
codesight is worth a look if what you actually want from an index is "what will this change break".- What it is: a TypeScript CLI and MCP server with zero runtime dependencies, performing AST-based codebase scanning with 25+ framework detectors, blast-radius analysis, schema and route detection, and wiki generation.
- Strengths: blast-radius analysis is a different question from "where is this symbol", and a useful one — it answers the change-impact question most indexes can't. Framework detection breadth is strong, and the zero-runtime-dependency install matches CodeGraph's ease.
- Limitations: it's an analysis tool more than a retrieval layer, so it won't reduce per-turn context the way semantic search does. No output filtering, no dense search. Not in the current THOL campaign.
- Best for: refactoring work and codebase onboarding rather than per-turn token reduction.
At a glance
| Tool | Retrieval | Measured session cost | Install | Licence |
|---|---|---|---|---|
| serena | LSP / compiler-grade | Not in the benchmark | MCP server | MIT |
| Tokenade | On-device semantic | 39% cheaper on long sessions | One command | MIT, freemium |
| tokensave | Keyword + call graph, 34 langs | Not in the benchmark | brew / scoop / cargo | Free, open source |
| claude-context | Hybrid BM25 + dense | Not in the benchmark | Vector DB + embedding key | Free + infra cost |
| mcp-codebase-index | Python AST + regex | Not in the benchmark | Zero dependency | Free, open source |
| codesight | AST + blast radius | Not in the benchmark | Zero dependency | Free, open source |
| CodeGraph (baseline) | FTS5 keyword + AST | No measurable saving | Bundled Node runtime | Free, open source |
How to choose
You want better navigation than CodeGraph gives you. serena, for the LSP guarantee. tokensave if you'd rather stay free-and-Rust with broader language coverage. You want the best possible retrieval and you'll pay for it. claude-context, budgeting for the vector database and embedding calls. You want the smallest possible footprint. mcp-codebase-index, especially on Python. You want to know what a change will break. codesight. You installed CodeGraph because your bill was too high. That's the common case, and it deserves a straight answer: a code index alone did not move the end-to-end number in testing, because file reads, command output and MCP manifests are untouched by it. On the criteria above, Tokenade is the pick — the full ranking and method, including what doesn't favour it, are on the THOL leaderboard. Tokenade's free tier covers a lot of solo work outright; current plans are on the pricing page.See also:
- Token optimizer benchmark — the five numbers behind this ranking, and how they were measured
- Best Claude Code token optimizers — the full field, same methodology
- Headroom alternatives — the same question for message compression
- ccusage alternatives — the same question from the measurement side
- Semantic search vs grep — why retrieval beats reading, with numbers
Ranked #1 on the Token-Harness Optimizer Leaderboard.
Tokenade ranks #1 in the Token-Harness Optimizer Leaderboard — an end-to-end benchmark of agent token optimizers measured on real coding sessions. Set it up once, it works on every prompt. Works with Claude Code, Cursor, Codex, Copilot & more.