StackMap
Subscribe

codebase-memory-mcp vs MegaMemory

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 — MCP server that lets a coding agent build and query a typed concept graph of the project — SQLite store, in-process embeddings, merge-conflict resolution and a local web graph explorer.

The curated verdict

codebase-memory-mcp indexes structure with tree-sitter in milliseconds and answers 'what calls this'; MegaMemory holds LLM-authored concepts with embeddings and answers 'why is it like this'. Choose by the question you keep re-asking.

codebase-memory-mcpMegaMemory
Stars40k459
Forks3.3k41
LanguageCTypeScript
LicenseMITMIT
Last activitytoday3 months ago
Topicscode-intel, localmemory, knowledge-graphs, coding
Curated connections85

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.

MegaMemory — the curator's take

The memory that stores design intent rather than code structure: the agent writes `feature`/`module`/`pattern`/`decision` concepts with typed links, and `understand` does semantic search over them. One npm install, a ~23MB embedding model, `.megamemory/knowledge.db` in the repo, nothing leaves the machine, installers for Claude Code, Codex, OpenCode and Antigravity. Its weakness is inherent: the graph is only as true as the last agent that wrote it — hence the merge/conflict tooling — so treat the DB as regenerable and pair it with an AST-derived index rather than replacing one. Small, single-maintainer project; fine for a repo you own, thin for a fleet.