codebase-memory-mcp alternative: trace-mcp vs codebase-memory-mcp

TL;DR. codebase-memory-mcp (DeusData) is the peer closest to trace-mcp’s premise: parse a repository into a persistent knowledge graph and serve it to agents over MCP, instead of letting them re-read files. Both do impact analysis, call-path tracing, cross-service linking and infrastructure-as-code as graph nodes.

The split is depth versus breadth, in both directions. codebase-memory-mcp is broader on languages (161 vs 81) and dramatically leaner on advertised tool cost. trace-mcp is deeper per repository: 88 framework integrations produce edges a language-agnostic parser cannot, and it can act on the graph — rename, move, codemod, remove dead code, scan for vulnerabilities — rather than only describe it.

Head-to-head

Capability trace-mcp codebase-memory-mcp
GitHub stars 175 43K
Languages 81 161
Framework integrations ✓ 88 ✗ (partial REST routes)
Persistent knowledge graph ✓ SQLite + FTS5 ✓
Knowledge-graph queries ✓ graph_query ✓ Cypher-like
Impact analysis ✓ reverse dependency traversal + decorator filter ✓ detect_changes
Call graph ✓ bidirectional ✓ trace_call_path
Cross-service / multi-repo ✓ cross-repo API linking ✓ cross-service HTTP linking
IaC as graph nodes ✓ K8s/Kustomize/HCL/Docker, cross-file resolved ✓ K8s/Kustomize/HCL/Docker
Clone / community detection ✓ AST Type-2 subtree hashing, 11 antipatterns ✓ MinHash near-clone, Louvain communities
Refactoring tools ✓ rename, move, signature, AST codemod, extract ✗
Security scanning ✓ OWASP Top-10, type-aware taint, SARIF 2.1.0 ✗
Control-flow graph ✓ basic blocks, loop back-edges, try/catch merges ✗
Quality gates in CI ✓ complexity / security / coverage thresholds ✗
Code-linked decision memory ✓ decisions bound to symbol IDs, staleness-verified partial (manage_adr markdown documents)
Runtime trace ingestion ✗ ✓ ingest_traces
Graph visualization ✓ desktop app ✓ 3D web UI
MCP tools advertised (default) 29 (~11.6K tok); 182 on full 15 (~7K tok); profiles: 11 / 7
Supply-chain posture OpenSSF Scorecard, CodeQL, Semgrep SLSA L3, VirusTotal, OpenSSF Scorecard
Published benchmark ✓ PR review context, one task, losses published ✓ preprint, 31 repos, not independently reproduced
Written in TypeScript C

When to pick codebase-memory-mcp

This is the peer where the honest list is longest, so here it is in full:

When to pick trace-mcp

The honest caveat on security scanning

Our security scanning has a ceiling, and it is stated on the comparisons page rather than only here. The control-flow graph is line-based, not AST-based, and taint analysis is lexical/regex, not a real dataflow engine. Type-aware pruning cuts false positives; it does not turn this into a dataflow analyser. A full AST/dataflow rewrite is out of scope for now.

FAQ

How similar are trace-mcp and codebase-memory-mcp? The closest pair in this space. Both parse with tree-sitter into a persistent knowledge graph, both do impact analysis and call-path tracing, both model IaC as nodes. The divergence is what sits on top: framework-aware edges, refactoring, security and code-linked memory for trace-mcp; raw language breadth and a much leaner advertised surface for codebase-memory-mcp.

It supports 161 languages and trace-mcp supports 81. Does that matter? Only if your repository contains a language in the gap. trace-mcp’s coverage targets the real-world long tail rather than a count; the depth goes into per-framework semantics instead.

Is codebase-memory-mcp cheaper in tokens? On advertised surface, yes — ~7K against our ~11.6K on the shipped default path as of August 29, 2026. The preset-bypass bug that put us at ~50K is fixed and the default preset is now minimal; the remaining ~1.7× gap is real and is the clearest place a competitor leads.

Does it have a published benchmark? Yes — a self-published preprint (arXiv 2603.27277) across 31 repositories, not independently reproduced and not peer-reviewed. So does trace-mcp, narrower: the PR review context benchmark, median 72.7% over 60 merged pull requests in 6 repositories nobody here maintains, with the losing cases and the re-run command shipped. Theirs is the wider workload; ours is the more auditable.

Can either one refactor code, not just read it? Only trace-mcp. codebase-memory-mcp is read-only analysis.

Next steps

Last updated: September 16, 2026