an honest comparison

We're not the biggest tool in this category.
Here's the bet we're making instead.

This page is written the way the rest of this site is: if a competitor is better at something, it says so. ctx-optimize is a fresh entrant in a lane that already has two 40K-star leaders. We think our design choices are right — but you should see the whole board, including where we lose, before you decide.

the landscape · mid-2026

The category converged on one pattern: a local graph, served over MCP.

A year ago "give your agent codebase context" meant embeddings and a vector DB. It doesn't anymore. The tools that broke out — CodeGraph (~47K stars, MIT) and GitNexus (~42K stars) — both pre-compute a structural graph on-device and expose it to agents over the Model Context Protocol (MCP): no cloud, no embeddings API, no code leaving the machine. graphify popularized the central-store idea; potpie took the funded, Neo4j-backed platform route; Serena skips the graph entirely and wraps live language servers. We share the local-first, deterministic half of that consensus — and we make one deliberately contrarian choice, spelled out below.

Numbers are approximate, mid-2026, and move fast. Star counts and feature lists here are from public repos and third-party write-ups (linked at the bottom), not our benchmarks. The head-to-head performance harness is still being built (proof/compare/) — when it lands, the measured rows replace the claimed ones, wins and losses alike.

the table

Where everyone stands, as honestly as we can draw it.

 ctx-optimizeCodeGraphGitNexusgraphifypotpieSerena
Adoption (approx)new~47K★~42K★~82K★fundedestablished
Runtimeone static Go binarySQLiteembedded DBPythonNeo4j servicelanguage servers
Setup depszerozero (1 file)zeromodel keyDB + infraLSP per lang
Distributionagent skill + hookMCP (42 tools)MCP (16 tools)skillAPIMCP
Agent reachCC / Codex / Copilot / Devin8 hosts via MCPMCP hostsskillAPIMCP hosts
Determinismno model, everstructuralstructuralmodel-assistedLLM in loopLSP-exact
Extraction enginetree-sitter ASTASTASTASTASTlanguage server
Call-edge precisionAST + conservative name-resolveAST name-resolveAST name-resolveAST name-resolveAST name-resolveLSP type-exact
Freshness / staleness gategit-HEAD gateauto-syncsyncstatic dumpre-indexlive
Routes / deps / k8s as graphyes (v0.3)routes+bridgespartialnonono
Extensible without forkingpacks (4 axes)configconfigpluginsnono
Module = scattered folders (src/ + tests/)yes (v0.3.5)one graphone graphone graph
Team clone → prebuilt graph in one stepone verb: uprebuildrebuildrebuildre-indexre-warm
LicenseMITMITnoncommercialopenopen-coreMIT

green = a genuine strength, amber = partial / caveated, red = a real weakness. Notice ours has red in it. The most important red is MCP — see "our bet."

performance · where we beat

Two kinds of numbers: what we measured, and what's structurally true of everyone.

1. Setup & footprint — true for every rival, by architecture

You don't need a benchmark to count dependencies. This is the win we hold against the whole field, not just one tool — the deterministic single binary carries none of the runtime cost a graph-DB, a model, or a language-server does:

 ctx-optimizeCodeGraphGitNexusgraphifypotpieSerena
Services to run0SQLite (embedded)embedded DBPython runtimeNeo4jLSP / language
Model / API keynonenonenonefor labelingLLM in loopnone
Install1 static binarybinary + indexbinarypip + depscontainersserver + LSPs
Works fully offlineyesyesyesnot for labelingnoyes
Cold start → first answersecondssecondssecondsindex + modelDB bring-upLSP warmup

2. Measured head-to-head — CodeGraph, GitNexus, graphify, ast-grep (2026-07-24 run)

Four public corpora, pinned SHAs, same machine (M5 Pro), every tool on its fastest deterministic path — no embeddings, no LLM, no clustering. ctx-optimize cells re-measured on the incremental-sync build (011f50d); versions: CodeGraph 1.5.0 · GitNexus 1.6.9 · graphify 0.9.12 · ast-grep 0.45.0. Raw data: results-multi.json. Note: “graphify src” below is a 754-file bounded corpus from this run — a different, smaller corpus than the 12,484-file full-tree run quoted above and on the front page; don’t mix the two.

Cold gather (s)ctx-optimizeCodeGraphGitNexusgraphify
flask (265 files)0.650.466.50.86
gin (159)0.370.627.90.78
ctx-optimize src (207)0.370.8013.41.33
graphify src (754)0.811.9018.55.43
Warm re-sync, 0 changes (s)ctx-optimizeCodeGraphGitNexusgraphify
flask0.0400.1435.30.77
gin0.0390.1475.30.75
ctx-optimize src0.0280.1319.2 †1.34
graphify src0.0300.20027.9 †8.61
Query, median of 5 (ms)ctx-optimizeast-grep ‡CodeGraphGitNexusgraphify
flask12224163778307
gin12523683457345
ctx-optimize src13494643124341
graphify src307718219121091
Store on diskctx-optimizeCodeGraphGitNexusgraphify
flask1.4 MB5.0 MB60 MB3.2 MB
gin1.4 MB7.7 MB73 MB4.7 MB
ctx-optimize src1.6 MB11.4 MB137 MB6.4 MB
graphify src9.0 MB25.1 MB192 MB25.6 MB

Where we lose, shown as-is: CodeGraph wins cold gather on flask (0.46 s vs our 0.65 s). Honest footnotes: ctx-optimize’s cold gather includes the full markdown wiki; its warm number is the tree-signature short-circuit that shipped in this build — earlier releases re-extracted fully and were slower warm than CodeGraph, which is why this row was our loss until 011f50d. † GitNexus’s warm cells on those two corpora were a forced full rebuild (schema-version bump mid-run), not a true incremental re-sync — read them as worst-case, not typical. ‡ ast-grep is grep-style structural search with no index — no gather/store rows apply; its two Python query cells were re-run with a corrected pattern after the original matched zero results (our authoring error, not the tool’s). Each tool builds a different graph (node counts differ up to ~1.6×); disk and query numbers compare each tool’s own artifact, not identical outputs.

3. Our absolute numbers + their published claims

ours (measured)resulttheirs (their claim)
Cold gather, 12,484 files0.67 sCodeGraph: 58% fewer tool calls, 22% faster
Query, 1.49M-node Chromium store< 1 sGitNexus / graphify: large token savings
Federated query, 188K-node monorepo≈ 0.6 s(measured their way, not ours)

potpie and Serena still have no measured row — different architectures (Neo4j + LLM-in-loop; LSP server) that need their own harness, and we won't fake a head-to-head we haven't run. Raw data behind ours: proof/agent · bench/results.json · bench/results-multi.json.

each rival, straight

What each competitor is genuinely better at — and where we'd pick ourselves.

CodeGraph

~47K★ · MIT · SQLite + MCP · 38 languages
theirsThe one to beat. MCP-native with 42 tools across 8 agent hosts, a VS Code extension, auto-sync on change, and framework-route + cross-language-bridge extraction we're only now matching. Easiest thing in the category to adopt.
oursA SQLite file is still a store format; our single static binary has literally zero moving parts, and our pack doctrine lets a team add routes/manifests/languages without a fork. But today, honestly: they reach more agents than we do.

GitNexus

~42K★ · noncommercial · zero-server DB · 16 MCP tools
theirsThe deepest Claude Code integration going — 16 MCP tools including impact detection and PR triage, plus skills and hooks. Temporal / git-aware analysis is their strength.
oursTheir license is noncommercial — a real blocker for company use; we're MIT. And we ship git co-change edges in the same deterministic binary. Their MCP depth still beats our reach today.

graphify

~82K★ · open · Python · central store
theirsThe star magnet and the idea's popularizer — community detection, the central-store layout, a big plugin ecosystem, huge mindshare.
oursIts output is a static dump that goes stale silently, it leans on a model, and multi-repo merge is weak — the exact gaps we built fresh, determinism, and mirrored per-module stores against. We adopted its best idea (community subsystems) without the staleness.

potpie & Serena

potpie: funded, Neo4j · Serena: LSP-as-MCP
theirspotpie: a funded platform with task-specific agents on a real graph DB. Serena: language-server-exact symbol precision — genuinely more accurate call edges and rename-safety than any static index, ours included.
ourspotpie's Neo4j is infra we refuse to require; a single binary is the opposite bet. Serena has no persistent graph and no cross-language/route/dep view — and needs an LSP per language. Their precision is the thing we most want to close (exact call edges are on our roadmap).
our bet — and our one honest gap

A single deterministic binary you extend, not a service you run.

Strip away the scoreboard and the difference is philosophical. Everyone else is a store format + a server (SQLite, LadybugDB, Neo4j) or a live service (LSP). We're a single static Go binary — no database process, no embeddings, no model, no network except what you invoke yourself (a self-update, a one-time toolchain fetch, your own remote scripts) — whose artifacts are plain, sorted, git-diffable files. What that buys:

The honest summary: if you want the most-adopted, MCP-everywhere tool today, that's CodeGraph or GitNexus. If you want a company-safe license, avoid GitNexus. If you want symbol-exact refactors, add Serena. If you want one zero-dependency binary that indexes code + routes + dependencies + infra deterministically and lets your team extend it without a fork, delivered to your agent as a skill rather than an MCP server, on Claude Code / Codex / Copilot / Devin — that's us. We'd rather earn the comparison than hide from it.