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.

37,718 ★3,007 forksCUpdated 1d ago

What you need to know

Ultra-fast code intelligence engine for AI coding agents — full-indexes an average repository in milliseconds and the Linux kernel (28M LOC / 75K files) in 3 minutes, answering structural queries in under 1ms. Parses 158 languages via vendored tree-sitter plus Hybrid LSP type resolution, ships as a single static binary, and exposes 15 MCP tools over a persistent knowledge graph.

Install

curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.sh | bash (macOS/Linux; add --ui for graph visualization)
Windows PowerShell: Invoke-WebRequest the install.ps1, Unblock-File, then run it
Package managers: npm install -g codebase-memory-mcp, pip install codebase-memory-mcp, AUR yay -S codebase-memory-mcp-bin, plus Homebrew, Scoop, Winget, Chocolatey, go install
Manual: download the platform archive from the latest release and run ./install.sh (or install.ps1)

Usage

  • Run install, restart your coding agent, then say 'Index this project'
  • Optional auto-indexing: codebase-memory-mcp config set auto_index true (with config set auto_index_limit 50000)
  • Use MCP tools: index_repository, list_projects, search_graph, trace_path, query_graph (read-only openCypher subset), get_architecture, detect_changes, get_code_snippet, manage_adr, search_code, ingest_traces
  • CLI mode: codebase-memory-mcp cli search_graph --project my-project --name-pattern '.*Handler.*' (every MCP tool is available as a one-shot CLI command)

Key features

  • 15 MCP tools: indexing, structured/semantic/BM25/structural search, call tracing, architecture overview, git diff impact mapping with risk classification, dead code detection, Cypher-like read-only queries, ADR management
  • 158 vendored tree-sitter grammars; Hybrid LSP semantic type resolution for Python, TypeScript/JS/JSX/TSX, PHP, C#, Go, C/C++, Java, Kotlin, Rust, Perl
  • Semantic search powered by bundled Nomic nomic-embed-code embeddings (no API key, no Ollama, no Docker)
  • Single static binary, zero runtime dependencies, 100% local, no telemetry; SQLite persistence at ~/.cache/codebase-memory-mcp
  • Cross-service linking (HTTP/gRPC/GraphQL/tRPC), channel detection (Socket.IO/EventEmitter/pub-sub), cross-repo edges, IaC indexing (Dockerfiles/K8s/Kustomize)
  • Team-shared graph artifact (.codebase-memory/graph.db.zst, zstd-compressed two-tier export) so teammates skip the reindex
  • 43 supported agent client surfaces (37 auto-detected) with Scout/Verify/Auditor tier agents; optional 3D graph visualization UI at localhost:9749

Best for

AI coding agents that need fast structural answers (call graphs, architecture, impact analysis, dead code) across large codebases without burning tokens on file-by-file exploration.

Caveats

  • The tool reads your codebase and writes to your agent configuration files by design — audit before running if you prefer
  • No built-in LLM — it is a structural analysis backend; the MCP client (Claude Code, etc.) is the intelligence layer
  • Windows: SmartScreen may warn for unsigned software; verify integrity with checksums.txt
  • All active CBM processes must run the exact same version, build, coordination ABI, and cache root (crash-safe admission barrier)
  • Windows install scripts may require Unblock-File / execution-policy bypass
  • arXiv preprint (2603.27277) reports 83% answer quality, 10x fewer tokens, 2.1x fewer tool calls vs file-by-file exploration at time of writing
Platforms: macOS (arm64/amd64) · Linux (arm64/amd64) · Windows (amd64)Clients: Claude Code · Codex CLI · Gemini CLI · Zed · OpenCode · VS Code · Cursor · Windsurf · Aider · KiloCode · Cline · Goose · Qwen Code · GitHub Copilot CLI · Kimi Code CLI · OpenHands · and 25+ more (43 total surfaces)
Documentation ↗

Reviewed 2026-08-07

Topics

aiderastclaude-codecode-analysiscode-intelligencecodexcursorcypherdeveloper-toolsgemini-cligraph-visualizationkilocodeknowledge-graphmcpmcp-servermodel-context-protocolopencodesqlitetree-sitterwindsurf
View on GitHub ↗AlternativesCompatibilityvs semble
Stars
37,718★
Forks
3,007
Language
C
License
MIT
Created
2026-02-24
Last push
2026-08-06