AgentConn
C

Codebase Memory MCP

Coding Free

About Codebase Memory MCP

Codebase-memory-mcp is a high-performance code intelligence MCP server that indexes codebases into a persistent knowledge graph, delivering a 99.2% token reduction compared to file-by-file exploration. Built in pure C with zero runtime dependencies, it uses tree-sitter AST analysis across 158 languages enhanced with Hybrid LSP semantic type resolution for Python, TypeScript, Go, Rust, and more. Five structural queries consume approximately 3,400 tokens versus 412,000 tokens through traditional grep-based search. Evaluated across 31 real-world repositories, it achieves 83% answer quality with 10× fewer tokens and 2.1× fewer tool calls versus file-by-file exploration. Ships as a single static binary with zero dependencies.

Key Features

  • 99.2% token reduction vs file-by-file exploration (3,400 vs 412,000 tokens)
  • 158 language support via tree-sitter AST analysis
  • Sub-millisecond query performance on persistent knowledge graphs
  • Hybrid LSP semantic type resolution for 11 languages
  • 14 MCP tools for code navigation, call chains, and cross-service links
  • Single static binary, zero dependencies, works with 11 coding agents

Overview

Codebase-memory-mcp solves one of the most expensive problems in AI-assisted development: the token cost of code exploration. Instead of having your agent grep through files and read source code token by token, codebase-memory-mcp indexes your entire repository into a persistent knowledge graph — functions, classes, call chains, HTTP routes, and cross-service links — that can be queried in sub-millisecond time for a fraction of the token cost. Built in pure C with zero runtime dependencies, it ships as a single static binary that works with 11 major coding agents.

Key Capabilities

The token efficiency gains are dramatic and well-documented: five structural queries consume approximately 3,400 tokens versus 412,000 tokens through traditional file-by-file exploration — a 99.2% reduction. The system achieves this through tree-sitter AST parsing across 158 programming languages, enhanced with Hybrid LSP semantic type resolution for Python, TypeScript/JavaScript, Go, Rust, C, C++, Java, Kotlin, PHP, and C#. The resulting knowledge graph captures not just syntax but semantic relationships — which functions call which, how types flow through the codebase, and where cross-service boundaries exist. Research published on arXiv (2603.27277) validates the approach across 31 real-world repositories.

Use Cases

Development teams use codebase-memory-mcp to dramatically reduce the cost of AI-assisted code review, bug investigation, and feature implementation. The persistent knowledge graph means agents don’t need to re-explore the codebase on every interaction — the structural understanding carries across sessions. It’s particularly valuable for large monorepos, polyglot codebases, and microservice architectures where traditional grep-based exploration would consume enormous token budgets. The 14 MCP tools provide specialized queries for navigating call chains, finding HTTP routes, tracing type hierarchies, and identifying cross-service dependencies.

Similar Agents