by DeusData
High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph — average repo in milliseconds. 66 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.
# Add to your Claude Code skills
git clone https://github.com/DeusData/codebase-memory-mcpThe fastest and most efficient code intelligence engine for AI coding agents. Full-indexes an average repository in milliseconds, the Linux kernel (28M LOC, 75K files) in 3 minutes. Answers structural queries in under 1ms. Ships as a single static binary for macOS, Linux, and Windows — download, run install, done.
High-quality parsing through tree-sitter AST analysis across all 66 languages, enhanced with LSP-style hybrid type resolution for Go, C, and C++ (more languages coming soon) — producing a persistent knowledge graph of functions, classes, call chains, HTTP routes, and cross-service links. 14 MCP tools. Zero dependencies. Plug and play across 10 coding agents.
Research — The design and benchmarks behind this project are described in the preprint Codebase-Memory: Tree-Sitter-Based Knowledge Graphs for LLM Code Exploration via MCP (arXiv:2603.27277). Evaluated across 31 real-world repositories: 83% answer quality, 10× fewer tokens, 2.1× fewer tool calls vs. file-by-file exploration.
Security & Trust — This tool reads your codebase and writes to your agent configuration files. That is what it is designed to do. If you prefer to audit before running, the full source is here — every release binary is signed, checksummed, and scanned by 70+ antivirus engines. All processing happens 100% locally; your code never leaves your machine. Found a security issue? We want to know — see SECURITY.md. Security is Priority #1 for us.
install → restart agent → done.install auto-detects Claude Code, Codex CLI, Gemini CLI, Zed, OpenCode, Antigravity, Aider, KiloCode, VS Code, OpenClaw, and Kiro — configures MCP entries, instruction files, and pre-tool hooks for each.localhost:9749 (optional UI binary variant).Resource nodes for K8s kinds, Module nodes for Kustomize overlays with IMPORTS edges to referenced resources.One-line install (macOS / Linux):
curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.sh | bash
With graph visualization UI:
curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.sh | bash -s -- --ui
Windows (PowerShell):
# 1. Download the installer
Invoke-WebRequest -Uri https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.ps1 -OutFile install.ps1
# 2. (Optional but recommended) Inspect the script
notepad install.ps1
# 3. Run it
.\install.ps1
Options: --ui (graph visualization), --skip-config (binary only, no agent setup), --dir=<path> (custom location).
Restart your coding agent. Say "Index this project" — done.
Download the archive for your platform from the latest release:
codebase-memory-mcp-<os>-<arch>.tar.gz (macOS/Linux) or .zip (Windows) — standardcodebase-memory-mcp-ui-<os>-<arch>.tar.gz / .zip — with graph visualizationExtract and install (each archive includes install.sh or install.ps1):
macOS / Linux:
tar xzf codebase-memory-mcp-*.tar.gz
./install.sh
Windows (PowerShell):
Expand-Archive codebase-memory-mcp-windows-amd64.zip -DestinationPath .
.\install.ps1
Restart your coding agent.
The install command automatically strips macOS quarantine attributes and ad-hoc signs the binary — no manual xattr/codesign needed.
The install command auto-detects all installed coding agents and configures MCP server entries, instruction files, skills, and pre-tool hooks for each.
If you downloaded the ui variant:
codebase-memory-mcp --ui=true --port=9749
Open http://localhost:9749 in your browser. The UI runs as a background thread alongside the MCP server — it's available whenever your agent is connected.
Enable automatic indexing on MCP session start:
codebase-memory-mcp config set auto_index true
When enabled, new projects are indexed automatically on first connection. Previously-indexed projects are registered with the background watcher for ongoing git-based change detection. Configurable file limit: config set auto_index_limit 50000.
codebase-memory-mcp update
The MCP server also checks for updates on startup and notifies on the first tool call if a newer release is available.
codebase-memory-mcp uninstall
Removes all agent configs, skills, hooks, and instructions. Does not remove the binary or SQLite databases.
get_architecture returns languages, packages, entry points, routes, hotspots, boundaries, layers, and clusters in a single callmanage_adr persists architectural decisions across sessionsdetect_changes maps uncommitted changes to affected symbols with risk classificationMATCH (f:Function)-[:CALLS]->(g) WHERE f.name = 'main' RETURN g.namecodebase-memory-mcp cli search_graph '{"name_pattern": ".*Handler.*"}'~/.cache/codebase-memory-mcp/codebase-memory-mcp is a structural analysis backend — it builds and queries the knowledge graph. It does not include an LLM. Instead, it relies on your MCP client (Claude Code, or any MCP-compatible agent) to be the intelligence layer.
You: "what calls ProcessOrder?"
Agent calls: trace_call_path(function_name="ProcessOrder", direction="inbound")
codebase-memory-mcp: executes graph query, returns structured results
Agent: presents the call chain in plain English
Why no built-in LLM? Other code graph tools embed an LLM for natural language → graph query translation. This means extra API keys, extra cost, and another model to configure. With MCP, the agent you're already talking to is the query translator.
Benchmarked on Apple M3 Pro:
| Operation | Time | Notes | |-----------|------|-------| | Linux kernel full index | 3 min | 28M LOC, 75K files → 2.1M nodes, 4.9M edges
No comments yet. Be the first to share your thoughts!