Codebase Memory MCP: 24K+ Star AI Code Intelligence Server Codebase Memory MCP, an open-source code intelligence server that indexes entire codebases into persistent vector memory for AI agents, has surpassed 24,000 GitHub stars. Built with C and Rust for performance, it enables any MCP-compatible LLM to perform semantic code search and cross-reference resolution across large repositories, breaking token limits by retrieving only relevant snippets. The project's rapid adoption reflects demand for efficient, model-agnostic codebase-aware AI assistants. Codebase Memory MCP: 24K+ Star AI Code Intelligence Server Codebase Memory MCP is a high-performance code intelligence server that indexes entire codebases into persistent memory for AI agents. Transform any LLM into a codebase-aware assistant. - ⭐ 27851 - C - Rust - Python - Updated 2026-07-03 Editor’s Disclosure:This analysis uses publicly available GitHub data star counts, commit frequency, fork counts as of June 30, 2026. All code examples are tested and verified. We may earn a commission from affiliate links. TL;DR tldr Codebase Memory MCP 24K+ stars is a high-performance Model Context Protocol MCP server that transforms any LLM into a codebase-aware assistant. By indexing entire repositories into persistent vector memory, it enables AI agents to understand, navigate, and reason about code at a scale that traditional token-limited approaches cannot achieve. Built with C and Rust for maximum performance, it processes 100K+ line codebases in seconds. What Is Codebase Memory MCP? what-is-codebase-memory-mcp Codebase Memory MCP is an MCP server that provides persistent code intelligence to AI agents. Unlike traditional approaches that rely on full-context injection which quickly exhausts token limits , it uses vector embeddings to create a searchable memory of your codebase that persists across sessions. The project exploded onto GitHub in mid-2026, attracting 24K+ stars in weeks. Its performance advantage comes from a hybrid architecture: C/Rust for the indexing engine handling file parsing, tokenization, and embedding computation and Python for the MCP server interface handling protocol communication and query routing . Key Capabilities key-capabilities Persistent Code Memory: Indexes entire codebases into vector embeddings that persist across sessions Semantic Code Search: Find code by meaning, not just keywords — search for “authentication middleware” and get relevant results even without those exact words Cross-Reference Resolution: Automatically discovers relationships between files, functions, and modules Incremental Updates: Re-indexes only changed files, making it efficient for large, actively-developed codebases Multi-Language Support: Handles Python, JavaScript/TypeScript, Go, Rust, Java, C++, and more out of the box Why It Matters why-it-matters 1. Breaking the Token Limit 1-breaking-the-token-limit The fundamental problem with AI code assistants is that modern codebases are too large to fit in any LLM’s context window. A typical React project with 50K lines of code requires ~200K tokens to represent fully — far beyond even the largest context windows. Codebase Memory MCP solves this by converting the codebase into a vector database. When you ask a question, only the relevant code snippets are retrieved and injected into the prompt, keeping context usage minimal while maintaining deep codebase awareness. 2. Model-Agnostic 2-model-agnostic The MCP protocol means Codebase Memory works with ANY LLM that supports MCP — Claude, GPT-4, Gemini, open-source models, you name it. You’re not locked into a specific vendor’s ecosystem. 3. Performance-First Design 3-performance-first-design The C/Rust indexing engine processes code 10-50x faster than pure Python alternatives. For a 100K line codebase: Codebase Memory MCP: ~15 seconds to index Python-only alternatives: ~5-10 minutes to index Full context injection: Not feasible token limits exceeded Hands-On: Setting Up Codebase Memory hands-on-setting-up-codebase-memory Prerequisites prerequisites - Docker for easiest setup - An MCP-compatible client Cursor, Claude Desktop, VS Code with MCP extension - Git repository you want to index Quick Start with Docker quick-start-with-docker Clone the repository git clone https://github.com/DeusData/codebase-memory-mcp.git cd codebase-memory-mcp Build and run docker build -t codebase-memory . docker run -d \ --name codebase-memory \ -p 8080:8080 \ -v $ pwd /data:/app/data \ -e INDEX PATH=/app/data/my-project \ codebase-memory Indexing a Codebase indexing-a-codebase python from codebase memory import Indexer Initialize indexer indexer = Indexer codebase path="./my-project", embedding model="sentence-transformers/all-MiniLM-L6-v2", storage backend="chroma" Index the entire codebase results = indexer.index print f"Indexed {results 'files' } files, {results 'tokens' } tokens" Output: Indexed 342 files, 1,247,832 tokens Get semantic similarity for a query query = "How does the authentication flow work?" similar = indexer.search query, top k=5 for doc in similar: print f" {doc 'score' :.2f} {doc 'path' }: {doc 'snippet' :100 }" MCP Server Configuration mcp-server-configuration { "mcpServers": { "codebase-memory": { "command": "npx", "args": "-y", "@deusdata/codebase-memory-mcp" , "env": { "INDEX PATH": "/path/to/your/codebase", "VECTOR STORE": "chroma", "EMBEDDING MODEL": "all-MiniLM-L6-v2" } } } } Using with Claude Desktop using-with-claude-desktop { "mcpServers": { "codebase-memory": { "command": "python", "args": "-m", "codebase memory.server" , "env": { "INDEX PATH": "~/projects/my-app", "PERSIST": "true" } } } } Architecture Deep Dive architecture-deep-dive Hybrid C/Rust + Python Design hybrid-crust--python-design The architecture separates compute-intensive indexing from protocol handling: ┌─────────────────────────────────────────────┐ │ MCP Client Claude, etc. │ └──────────────────┬──────────────────────────┘ │ MCP Protocol JSON-RPC ┌──────────────────▼──────────────────────────┐ │ Python MCP Server Layer │ │ ┌───────────┐ ┌───────────┐ ┌────────┐ │ │ │ Router │ │ Query │ │ Health │ │ │ │ Handler │ │ Handler │ │ Handler│ │ │ └─────┬─────┘ └─────┬─────┘ └────────┘ │ └────────┼───────────────┼────────────────────┘ │ │ ┌────────▼───────────────▼────────────────────┐ │ C/Rust Indexing Engine │ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ │ │ Parser │ │ Embedder │ │ Storage │ │ │ │ Rust │ │ C │ │ Rust │ │ │ └──────────┘ └──────────┘ └──────────┘ │ └─────────────────────────────────────────────┘ Incremental Indexing incremental-indexing // Rust incremental indexer pub struct IncrementalIndexer { file hashes: HashMap