StackMap
Subscribe

codebase-memory-mcp vs Graft

Code intelligence MCP in pure C: tree-sitter knowledge graph over 158 languages, average repo indexed in milliseconds, sub-ms queries, 10x fewer tokens. Single static binary, zero deps. — versus — Context layer for large codebases: a graph of plain-English markdown nodes — no embeddings, no index — agents read like any repo file. Claude Code hooks + MCP; 42% fewer tokens in its bench.

The curated verdict

Same job — spare agents the re-exploration tax — opposite representations: codebase-memory-mcp serves a symbol-level tree-sitter graph over MCP with sub-ms queries; Graft writes plain-English concept nodes as markdown the agent simply reads.

codebase-memory-mcpGraft
Stars37k437
Forks2.9k35
LanguageCTypeScript
LicenseMITMIT
Last activitytodaytoday
Topicscoding, localcoding, rag
Curated connections42

codebase-memory-mcp — the curator's take

The performance ceiling of the code-context-server category: pure C, single static binary, the Linux kernel indexed in 3 minutes, structural queries under a millisecond — with a peer-reviewed preprint (83% answer quality, 10x fewer tokens across 31 repos) instead of vibes. Hybrid LSP adds real type resolution for the 12 languages that matter most, and 43 client surfaces means it plugs into whatever agent you run. NOT semantic search — it answers structural questions (call chains, routes, blast radius), not 'where's the code that does X'; pair it with an embedding tool for that. And note its own disclosure: it writes to your agent config files by design — audit posture is unusually good (SLSA 3, OpenSSF, per-release VirusTotal), use it.

Graft — the curator's take

The anti-embeddings bet is the story: the codebase map is prose files — senior-engineer explanations, linked and greppable — so agents consume it with the file tools they already have, and a stale map shows up as a diff in review instead of rotting in a vector store. The 162-run controlled benchmark holding correctness equal is more rigor than this category usually shows; still self-run. Claude Code gets the deep integration (hooks, statusline, background rebuild), everyone else gets MCP. When NOT: nodes are LLM-written prose — building them on a big repo costs real tokens, and prose can drift subtly wrong in ways a symbol graph can't; spot-check the nodes on your hot paths. ★437 and young, with NanoNets behind it.