# AST / Graph Code-Intelligence MCP Servers — selection notes

Companion to `ast-graph-mcp-selection.csv`. Read this before quoting any number.

## Why this category matters

When an agent explores an unfamiliar codebase it spawns "explore" steps that scan
files with grep/glob/read — burning tokens and tool calls on discovery before any
real work starts. AST/graph servers index the code *once* into a structure (symbols
+ edges: calls, imports, inheritance, routes) and answer "who calls this?" /
"what's the blast radius?" in one structured MCP call instead of dozens of reads.
That's the whole value proposition: fewer tool calls, fewer tokens, better recall.

## On the numbers (important)

Treat every figure in the sheet as **vendor/author-reported unless marked
otherwise**, and re-verify before publishing — this category moves monthly.

- **CodeGraph (colbymchenry)** has the most credible figures because they're from a
  *published benchmark*: ~16% cheaper, ~47% fewer tokens, ~58% fewer tool calls,
  measured across 7 real repos on Claude Opus 4.8, validated 2 Jun 2026. Note: some
  third-party blogs cite "~35% cheaper / ~70% fewer tool calls" — those are *not* the
  official benchmark; prefer the repo's own numbers and date them.
- **GitNexus** publishes capability claims (single-call blast radius vs 10+ queries)
  but no standardized cost benchmark; don't attach a percentage to it.
- **CocoIndex / CodeGraphContext** figures ("~70% fewer tokens/turn", "~120x on
  structural queries") circulate in write-ups but lack a single authoritative,
  reproducible benchmark — quote them as "reported," with the source.
- The remaining tools are precision/search tools, not cost-reduction tools; they
  shouldn't be compared on token savings at all.

## How to choose (decision shortcuts)

- **Want verified local savings, zero data egress** → CodeGraph (colbymchenry).
- **Want architecture diagrams + blast-radius before refactors** → GitNexus
  (`generate_map` emits Mermaid; can auto-write AGENTS.md/CLAUDE.md).
- **Need to trace request/route flows** → code-graph-mcp (call-graph + HTTP-route).
- **Huge, fast-changing repo, index must stay fresh** → CocoIndex (incremental).
- **Structural pattern search / codemods** → ast-grep-mcp.
- **Semantic "find code like this" when you can't name the symbol** → Claude Context
  (vector DB) or CocoIndex.
- **Minimal, low-setup search** → flupkede/codesearch or Code Pathfinder.

## Governance reminder (ties to Part 4)

These are MCP servers — i.e. supply chain. Route them through your MCP gateway,
pin versions, and prefer **local-first** tools (CodeGraph, GitNexus) where code must
not leave the machine. An unpinned code-intelligence server has read access to your
entire codebase; treat it accordingly.

## Repo paths

Several entries in the CSV are marked "(verify)" for the repo path. Confirm the
exact owner/repo before linking — names in this space collide and forks proliferate.

_Snapshot of the mid-2026 landscape. Verify capabilities, licenses, and especially
benchmark numbers against the source repo before relying on them._
