DeusData/codebase-memory-mcp

High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph — average repo in milliseconds. 158 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.

What it solves

AI coding agents often struggle to understand large codebases because they rely on file-by-file exploration or simple grep searches, which consume massive amounts of tokens and require many tool calls. codebase-memory-mcp provides a high-performance, local knowledge graph of a codebase, allowing agents to perform structural queries and impact analysis with significantly fewer tokens and higher accuracy.

How it works

The engine uses tree-sitter AST analysis across 162 languages and a "Hybrid LSP" for semantic type resolution in popular languages (like Python, TypeScript, and Rust) to build a persistent knowledge graph of functions, classes, and call chains. It is implemented as a native executable (written in C) that uses a RAM-first pipeline with LZ4 compression and in-memory SQLite for extreme indexing speed. It integrates with AI agents via the Model Context Protocol (MCP), providing 17 specialized tools for search and analysis.

Who it’s for

Developers using AI coding agents (such as Claude Code or Codex) who need the agent to have a deep, structural understanding of large-scale repositories without the overhead of slow indexing or high token costs.

Highlights

  • Extreme Performance: Indexes the Linux kernel (28M LOC) in 3 minutes and answers structural queries in under 1ms.
  • Token Efficiency: Reduces token usage by up to 120x compared to file-by-file exploration.
  • LSP-Enhanced: Supports semantic type resolution for 12 major languages to produce high-fidelity call graphs.
  • Built-in Visualization: Includes a 3D interactive graph UI served directly from the binary at localhost:9749.
  • Local & Private: All processing happens 100% locally with no requirement for API keys, Docker, or external hosted services.
  • Infrastructure-Aware: Indexes Dockerfiles and Kubernetes manifests as graph nodes with cross-references.
  • Broad Language Support: Supports 162 languages via vendored tree-sitter grammars.

Related

  • Project
  • Project
  • Project
  • Project
  • Project