StackMap
Subscribe

code-graph-rag vs codebase-memory-mcp

Parses a polyglot monorepo with Tree-sitter into a Memgraph knowledge graph: query it in plain English (NL→Cypher), trace data flow, find dead code, edit via AST-surgical patches. — versus — 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.

The curated verdict

Same tree-sitter-graph idea at opposite weights: codebase-memory-mcp is a single static C binary indexing 158 languages in milliseconds for cheap agent queries; code-graph-rag runs Memgraph to buy Cypher, taint edges and structural rewriting. Speed and zero deps vs analysis depth.

code-graph-ragcodebase-memory-mcp
Stars2.5k37k
Forks4082.9k
LanguagePythonC
LicenseMITMIT
Last activityyesterday4 days ago
Topicscoding, ragcoding, local
Curated connections45

code-graph-rag — the curator's take

Deepest of the code-graph tools: not just retrieval — NL→Cypher querying, FLOWS_TO taint tracing across C#/Java/C/Go, dead-code walks from entry points, ast-grep structural search-and-replace, and AST-surgical editing with diff preview, all over mixed languages in one schema. The price is infrastructure: you run Memgraph plus Python tooling. If you only want fast agent context, codebase-memory-mcp (ms indexing, single static binary) or cocoindex-code are far lighter; reach for this when agents need to *query and rewrite* structure, not just find it.

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.