codebase-memory-mcp logo

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.

releasebuildtests 5604_passinglanguages 158agent_surfaces 43pure_C zero_dependenciesmacOS_|_Linux_|_Windows supportedVirusTotal scanned_every_releasearXiv 2603.27277Hybrid_LSP 10_languages
Website GitHub

What is it?

What it is

codebase-memory-mcp is a zero‑dependency, static‑binary code‑intelligence engine that builds a persistent knowledge graph of a codebase using tree‑sitter parsing and a lightweight Hybrid LSP type‑resolution layer. It exposes 14 MCP tools (search, trace, architecture, Cypher queries, etc.) over JSON‑RPC and can be plugged into any MCP‑compatible agent.

Why it exists

It was created to give AI coding agents fast, token‑efficient, local access to a structural view of a repository—enabling sub‑millisecond architecture queries, call‑graph tracing, and semantic search without sending code to external services or paying for LLM APIs. The goal is extreme indexing speed, 158‑language support, and zero runtime dependencies for privacy and security.

Who should use it

Developers using AI coding agents (Claude Code, Codex CLI, Gemini CLI)Teams working with large codebases (e.g., Linux kernel, 28M LOC)Engineers needing fast code intelligence with zero dependenciesResearchers studying code graph analysis

Who should avoid it

Users requiring simple grep-like tools without graph analysisProjects avoiding binary dependencies or static binariesTeams without MCP-compatible agentsUsers prioritizing manual code review over automated graph insights

How it works

A quick walkthrough in plain English

How codebase-memory-mcp works

Step 1 of 3

You interact with it

Open codebase-memory-mcp, send a request, or connect it to your stack.

Features

Aider
Ast
Claude Code
Code Analysis
Code Intelligence
Codex

Advantages

  • Open source (MIT)
  • Active C ecosystem
  • Self-hosted deployment options

Disadvantages

  • Requires operational ownership for self-hosted setups
  • Community support varies by project maturity

Installation

native

curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.sh | bash

FAQ

How do I install codebase-memory-mcp?

Use the one-line install script for macOS/Linux: `curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.sh | bash`. For Windows, use PowerShell: `curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.ps1 | Invoke-WebRequest -OutFile install.ps1` followed by `.\install.ps1`. The `install` command auto-detects and configures coding agents.

What languages does it support?

It supports 158 languages via vendored tree-sitter grammars, including Python, TypeScript, Java, C++, Go, Rust, and many others. Hybrid LSP type resolution is available for Python, TypeScript, PHP, C#, Go, C, C++, Java, Kotlin, and Rust.

How does it ensure security and privacy?

All processing happens locally with no telemetry. Binaries are signed, checksummed, and scanned by 70+ antivirus engines. No API keys or external dependencies are required. You can audit the source code at https://github.com/DeusData/codebase-memory-mcp.

What performance benefits does it offer?

It indexes large repositories like the Linux kernel (28M LOC) in 3 minutes. Structural queries take under 1ms, and it reduces tokens by 99.2% compared to file-by-file search. The RAM-first pipeline releases memory after indexing.

Can I visualize the knowledge graph?

Yes, download the `ui` variant and run `codebase-memory-mcp --ui=true --port=9749`. The 3D graph visualization UI will be accessible at `http://localhost:9749`.

How does it integrate with coding agents?

The `install` command auto-detects and configures 11 agents (Claude Code, Codex CLI, Gemini CLI, etc.) by setting up MCP entries, instruction files, and pre-tool hooks. For example, it injects structured context into Claude Code's `Grep`/`Glob` commands.

Loading documentation…
View on GitHub

Featured in Videos

YouTube tutorials and walkthroughs for codebase-memory-mcp

t5

70,223,459 views

Starts at 00:00

Share

Alternatives

Similar projects ranked by category, topics, and text overlap.

Compare
codebase-memory-mcp | MushyBook