RepoDaily · 2026-06-19 · Developer tool / CLI

codebase-memory-mcp Review: Local Codebase Graphs for Claude Code, Codex, Cursor, and Other Coding Agents

#1 Developer tool / CLI C +2,308 DeusData/codebase-memory-mcp Open repository

Evaluate codebase-memory-mcp for local code indexing, call-graph queries, token reduction, MCP integration, large-repo performance, security posture, and where graph context beats file-by-file retrieval.

Repo typeDeveloper tool / CLI
Best forTeams using AI coding agents on medium-to-large repos who want structural code understanding without burning token budgets
Risk levelLow
Time to evaluate10–15 minutes (download, install, index a real project)

Primary question: Does your team rely on AI coding agents and need deeper, faster codebase context than file-by-file retrieval provides?

Evaluation snapshot: should you adopt codebase-memory-mcp?

Verdict: Worth a 15-minute trial if your coding agents repeatedly search large or polyglot repositories. Skip it when simple repo maps or file search already answer your structural questions cheaply.

Try it if

  • Claude Code, Codex, Cursor, or another MCP-capable agent repeatedly rereads files to answer architecture and call-chain questions
  • Your repo is large, polyglot, or split across services where cross-file and cross-service relationships matter
  • You want local code intelligence without sending source code to a hosted indexing service

Skip it if

  • Your repos are small enough that grep, repo maps, and normal agent context are already fast and cheap
  • Your workflow is CI-centric and you need organization-wide hosted search, governance, and team administration
  • You cannot validate graph accuracy on a real repository before depending on impact analysis or dead-code results

15-minute evaluation checks

  1. Install the local binary and index one representative 50K+ line repository
  2. Ask the same three structural questions with and without graph context: architecture overview, call trace, and change-impact scope
  3. Compare wrong-file exploration, tool calls, latency, and token use rather than judging the 3D graph visualization
  4. Confirm the MCP configuration works with your primary agent and that local storage/security boundaries match team policy

Verification scope

Evidence level: L1Last verified: 2026-07-20Product model: open_sourceLicense: MIT

Test environment: Documentation review only; no RepoDaily runtime test environment recorded yet

Verified

  • Reviewed the repository README, contribution guide, MIT license, project homepage, and linked arXiv preprint
  • Checked that the documented architecture, installation path, supported-agent list, and security claims are traceable to cited project sources

Not assessed

  • RepoDaily has not yet completed a hands-on installation or indexed a representative repository
  • Long-running stability, multi-user deployment, benchmark reproducibility, graph accuracy, and token savings remain unverified
95/100

RepoDaily adoption score

RepoDaily rates this as 95/100 (strong) for adoption: evidence, installation path, production risk, differentiation, license clarity, and AI/agent fit are scored from the article sources and adoption notes.

Directional score from RepoDaily sources and adoption notes, not a benchmark.Risk: Low
95Evidence quality

6 source(s) across 3 source category/categories, plus a RepoDaily-specific evidence module when available.

100Installability

6 workflow step(s), 6 next-action step(s), and 3 command/install signal(s) were detected.

87Maintenance confidence

Trending momentum is +2,308 stars, with maintenance/release/issue signals counted when present.

100Production readiness

Risk is marked low, with 7 security note(s) and 4 explicit skip condition(s).

99Differentiation

4 opportunity lens item(s), 4 alternative(s), and 0 type-specific section(s) support differentiation.

82License clarity

License source or license wording is present.

90Agent / AI fit

9 AI/agent-related signal(s) were detected in the article text and metadata.

Project overview

codebase-memory-mcp is a Model Context Protocol server written in pure C that transforms an entire codebase into a persistent knowledge graph of functions, classes, call chains, HTTP routes, and cross-service links. It ships as a single static binary with zero runtime dependencies and supports 158 languages through vendored tree-sitter grammars, with enhanced semantic type resolution for 9 languages via Hybrid LSP.

The project targets a well-known pain point: AI coding agents are context-blind. They grep, read, and re-read files, burning hundreds of thousands of tokens to answer questions a simple call graph could resolve instantly. By pre-indexing structural relationships into SQLite-backed graph storage, codebase-memory-mcp lets agents query architecture, trace calls, detect dead code, and map change impact in under a millisecond.

An accompanying arXiv preprint (2603.27277) reports evaluation across 31 real-world repositories with 83% answer quality, 10x fewer tokens, and 2.1x fewer tool calls compared to file-by-file exploration. The project earned 2,308 stars in its trending period, signaling strong developer interest in MCP-native code intelligence.

Problem it solves

  • AI coding agents lack structural understanding — they cannot trace call graphs, identify dead code, or map change impact without extensive file-by-file exploration
  • Token costs explode on large repos: five structural questions can consume ~412,000 tokens via traditional file search
  • Existing code intelligence tools often require runtimes (Node, Python, JVM), cloud API keys, or Docker containers, creating setup friction
  • Multi-service repos with HTTP route links between components are difficult for agents to navigate without explicit cross-references
  • Infrastructure-as-code (Dockerfiles, Kubernetes manifests, Kustomize) is typically invisible to code analysis tools

How it works

  1. Download the single static binary for macOS (arm64/amd64), Linux (arm64/amd64), or Windows (amd64) — or run the one-line installer
  2. Run the install command, which auto-detects installed coding agents and configures MCP server entries, instruction files, skills, and pre-tool hooks
  3. Restart your agent and say 'Index this project' — the multi-pass pipeline uses tree-sitter AST analysis to extract functions, classes, calls, imports, and HTTP routes
  4. The extracted graph is persisted in SQLite (WAL mode with FTS5), with optional Hybrid LSP semantic type resolution for 9 languages
  5. Agents query the graph through 14 MCP tools — architecture overview, call tracing, impact analysis, Cypher queries, dead code detection, semantic search, and more
  6. Optional 3D graph visualization UI available at localhost:9749 via the UI binary variant

Who This Fits

  • Teams already using MCP-compatible coding agents (Claude Code, Codex CLI, Gemini CLI, Cursor, Aider, etc.) on polyglot or large repos
  • Organizations concerned about data privacy — all processing is 100% local, code never leaves the machine
  • Developers who value minimal dependencies and want a single binary with no Docker, no runtime, no API keys
  • Engineering teams that need infrastructure-as-code visibility alongside application code analysis

Architecture Highlights

The codebase is organized into modular C layers: a foundation layer (arena allocator, hash table, string utilities), a SQLite graph store with WAL mode and FTS5, a Cypher-to-SQL query translator, an MCP server implementing JSON-RPC 2.0 over stdio with 14 tools, and a multi-pass indexing pipeline. Tree-sitter grammars for 64 extraction languages are vendored as C source and compiled directly into the binary.

Infrastructure languages (Dockerfile, Kubernetes manifests, Kustomize) follow an infra-pass pattern that reuses the existing tree-sitter YAML grammar rather than adding new grammars. K8s manifests emit Resource nodes; Kustomize files emit Module nodes with IMPORTS edges. This design keeps the binary lean while extending coverage to ops artifacts.

Memory is managed through a RAM-first pipeline using LZ4 compression, in-memory SQLite, and fused Aho-Corasick pattern matching, with memory released after indexing completes.

Security Posture

  • SLSA Level 3 build provenance attested on every release
  • Every release binary is signed, checksummed, and scanned by 70+ antivirus engines via VirusTotal
  • 8-layer automated security audit runs in CI: static allow-list, binary string scan, UI audit, install audit, network egress test, MCP fuzzing, dependency integrity, and frontend integrity
  • All processing is 100% local — no code leaves the machine
  • Pre-commit hooks enforce security checks; any new system(), popen(), fork(), or network call must be justified and added to an allowlist
  • OpenSSF Scorecard badge displayed in README

MCP Integration Surface: C Server, Knowledge Graph, Agent Memory

This project still belongs in the code-intelligence bucket conceptually, but the stable RepoDaily enum treats it as a developer tool. The concrete integration surface is an MCP server that exposes codebase-memory behavior to AI coding agents through local commands, graph storage, and repository indexing.

Before adoption, inspect `README.md`, C build instructions, the MIT `LICENSE`, and the arXiv paper, then run it on a repository where maintainers can check whether graph edges, symbols, and summaries match reality. The strongest test is not a pretty graph; it is whether the agent makes fewer wrong-file edits after indexing.

Who should pay attention?

Good fit if

  • Your team uses Claude Code, Codex CLI, Gemini CLI, Cursor, or other supported agents on repos above 50K lines
  • You are spending too much on token costs from agents doing repetitive file exploration
  • You need cross-language call graph tracing and dead code detection without setting up language servers for every language
  • You want infrastructure-as-code (Docker, K8s, Kustomize) indexed alongside application code
  • You value reproducible, dependency-free tooling that works the same on macOS, Linux, and Windows

Skip for now if

  • Your projects are small enough that file-by-file agent exploration works fine
  • Your team does not use any MCP-compatible coding agent
  • You need code intelligence integrated into a CI/CD pipeline rather than a developer workstation tool
  • Your primary language is not well-covered by tree-sitter grammars or the 9 Hybrid LSP languages

Risks and cautions

Low

Low adoption risk: single binary, zero dependencies, fully local processing, MIT-licensed, with strong security practices including SLSA 3 and per-release antivirus scanning.

  • Single static binary with no runtime dependencies — no Docker, Node, Python, or JVM required
  • All code processing happens locally; no data is sent to any server
  • MIT licensed with DCO sign-off enforcement, matching Linux kernel contribution standards
  • Uninstall cleanly removes all agent configs, skills, hooks, and instructions
  • The install command auto-detects agents and auto-configures them — manual setup is minimal
  • Maturity signals: 5,604 passing tests, arXiv preprint with 31-repo evaluation, CI-enforced linting and security audits
  • SLSA Level 3 build provenance on every release
  • All release binaries signed, checksummed, and VirusTotal-scanned (70+ engines)
  • 8-layer automated security audit in CI including network egress testing and MCP fuzzing
  • 100% local processing — code never leaves the machine
  • Pre-commit security hooks activated via git config core.hooksPath
  • Any new system(), popen(), fork(), or network call requires explicit allowlist approval
  • SECURITY.md published with responsible disclosure guidance

Alternatives to compare

ApproachWhen to useTrade-off
Sourcegraph Cody / Sourcegraph
When you need web-hosted, enterprise-scale code search across many repos with a team web UIPaid tiers for enterprise; requires server infrastructure
aider with repo-map
When you are already using Aider and its built-in tree-sitter repo map is sufficient for your repo sizeFree / open source; included in Aider
Language-specific LSP servers
When you need deep semantic analysis for a single language and already have LSP infrastructureFree; requires per-language setup and runtime
Custom grep/ripgrep workflows
When your team has simple codebases and manual search patterns are adequateFree; no structural understanding

What this trend reveals

Cut Agent Token Costs on Large Monorepos

The reported 120x token reduction on structural queries (3,400 vs 412,000 tokens for 5 queries) translates directly to lower API spend. For teams running agents on repos with millions of lines, the savings could justify adoption within a single sprint.

Index a representative large repo, run 5 typical agent questions with and without the MCP server, and compare token usage and answer quality.

Cross-Service Architecture Discovery

HTTP route extraction across Go, Express, Laravel, Kotor, and Python frameworks — with cross-service linking — gives agents awareness of service boundaries that file-based tools fundamentally cannot provide. This is especially valuable in microservice architectures.

Point the indexer at a multi-service repo and verify that HTTP route nodes and cross-service edges appear in the graph visualization UI.

Infrastructure-as-Code Visibility

Dockerfiles, Kubernetes manifests, and Kustomize overlays are indexed as first-class graph nodes with cross-references. Teams managing complex K8s deployments gain a navigable map of resource dependencies without a separate tool.

Index a repo with mixed application code and K8s manifests, then query for Resource and Module nodes via Cypher-like queries.

Standardize Code Intelligence Across Agent Ecosystems

With one-command support for 11 agents, teams standardizing on MCP can provide consistent structural context regardless of which agent individual developers prefer. This reduces fragmentation in tooling and training.

Install on a developer machine with two different agents configured, confirm both receive the same graph context, and compare agent output quality.

Best next action

Install on a Developer Machine and Index a Real Project

The fastest way to evaluate codebase-memory-mcp is to install the binary, let it auto-configure your preferred agent, and index a representative repo. Within 15 minutes you can compare agent answer quality and token usage with and without the graph.

  1. Download the installer for your platform or run the one-line curl/PowerShell install command
  2. Run install — it will auto-detect your coding agents and configure MCP entries
  3. Restart your agent and open a real project of moderate size (50K+ lines)
  4. Say 'Index this project' and wait for the pipeline to complete
  5. Ask your agent 3–5 structural questions (call traces, architecture overview, dead code) and assess answer quality and speed
  6. Optionally launch the 3D graph visualization UI at localhost:9749 to visually explore the knowledge graph

RepoDaily verdict

codebase-memory-mcp stands out in the MCP ecosystem for doing something both obvious and hard: giving AI coding agents real structural understanding of a codebase through a fast, dependency-free, locally-run graph. The pure-C implementation, 158-language coverage, infrastructure-as-code indexing, and aggressive token reduction make it a practical upgrade for any team whose agents spend too long reading files. Strong security practices and an arXiv-backed benchmark story reduce adoption anxiety. If your team uses MCP-compatible agents on repos of meaningful size, this is worth the 15-minute evaluation.

Sources

Feedback

Did this page help you make a decision?

Anonymous feedback helps RepoDaily improve what is actually useful.

Report outdated or missing evidence