Codebase Memory MCP: Graph-based code exploration for Claude Code

A developer has created an MCP server called codebase-memory-mcp that addresses a common issue with Claude Code: inefficient token usage when exploring codebase structure. Instead of having Claude grep through files one at a time for questions like "what calls this function?" or "find dead code," this tool builds a persistent knowledge graph of the codebase.
How it works
The server uses Tree-sitter to parse 64 languages (including Python, Go, JavaScript, TypeScript, Rust, Java, and C++) into a SQLite-backed graph that captures functions, classes, call chains, HTTP routes, and cross-service links. When Claude Code asks structural questions, it queries this graph instead of scanning files individually.
Performance improvements
In one comparison, 5 structural questions consumed approximately 412,000 tokens via traditional file-by-file exploration versus only about 3,400 tokens via graph queries—a 120x reduction. The developer reports average savings of around 20x fewer tokens in regular usage, plus significant time savings.
Key features
- 64 language support via Tree-sitter parsing
- Call graph tracing: "what calls ProcessOrder?" returns full chain in <100ms
- Dead code detection with smart entry point filtering
- Cross-service HTTP linking (finds REST calls between services)
- Cypher-like query language for ad-hoc exploration
- Architecture overview with Louvain community detection
- Architecture Decision Records that persist across sessions
- 14 MCP tools (also works with Codex CLI, Cursor, Windsurf and other integrations)
- CLI mode for direct terminal use without an MCP client
Setup and usage
The tool is a single Go binary with no Docker, external databases, or API keys required. Installation is via codebase-memory-mcp install which auto-configures Claude Code. Users simply say "Index this project" to begin, and the graph auto-syncs when files are edited to stay current.
Benchmarks and licensing
The developer benchmarked across 35 real open-source repositories ranging from 78 to 49,000 nodes, including the Linux kernel. The project is open source under MIT license.
📖 Read the full source: r/ClaudeAI
👀 See Also

OpenGalatea MCP Server Connects Claude to Prusa 3D Printers
OpenGalatea is an open-source MCP server that enables Claude to control Prusa 3D printers via PrusaLink, allowing natural language commands to search Printables.com, slice models, and manage prints.

OpenHelm: A macOS App for Automating Claude Code Tasks
OpenHelm is a free, local macOS application that automates repetitive Claude coding tasks by running jobs on a schedule, auto-retrying failures, and breaking work into chunks to avoid session limits. It uses your existing Claude subscription for LLM calls.

Interactive Mind Map Visualizes Claude Tool Ecosystem
A developer created an interactive HTML mind map using D3.js to track features across Claude's Chat, Cowork, and Code tools, including platform availability, pricing differences, and connector compatibility.

Comparison of 8 AI Coding Models on Real-World TypeScript Feature Implementation
A developer tested 8 AI coding models on implementing a /rename command in an open-source TypeScript Telegram bot project, evaluating them on cost, execution time, correctness, and technical quality. GPT-5.4 scored highest on implementation correctness while GLM 5 offered the best cost-performance ratio.