codebase-memory-mcp: High-Performance Code Intelligence MCP server
codebase-memory-mcp is an MCP server that indexes codebases into a persistent knowledge graph, enabling AI coding agents to answer structural questions about a repository with sub-millisecond query times. It uses tree-sitter AST analysis across 158 languages, with Hybrid LSP semantic type resolution adding deeper understanding for Python, TypeScript, JavaScript, JSX, TSX, PHP, C#, Go, C, C++, Java, Kotlin, Rust, and Perl.
The index covers functions, classes, call chains, HTTP routes, and cross-service links. An average repository gets indexed in milliseconds — the Linux kernel (28 million lines of code, 75,000 files) completes in about three minutes. The server ships as a single static binary with zero dependencies, runs on macOS, Linux, and Windows, and exposes 15 MCP tools.
The design focus is on token efficiency: by pre-computing a knowledge graph from source, agents avoid reading raw code to answer structural questions, cutting token usage by roughly 99% compared to grep-based approaches.