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

Brunnfeld Agentic World: Multi-Agent Medieval Economy Simulation Without Behavioral Prompts
A TypeScript simulation where 20 LLM agents autonomously trade in a medieval village economy with no behavioral instructions, goals, or trading strategies. Agents receive ~200 token perceptions each tick and interact through a deterministic engine handling physics, recipes, and market mechanics.

Claude Auto-Continue: Chrome extension automates tool-use limit interruptions
A developer built a free Chrome extension that automatically clicks 'Continue' when Claude hits its tool-use limit after roughly 20 tool calls, eliminating manual interruptions during agentic workflows. The extension includes optional token minimization and works across all tabs and windows.

MTPLX: 2.24x Faster Tokens on Apple Silicon Using Native MTP Heads
MTPLX achieves 63 tok/s on Qwen3.6-27B on M5 Max (up from 28 tok/s) using built-in MTP heads, with exact temperature sampling and no external drafter.

Bridge Claude Code to Chat Apps for Remote Interaction
A GitHub project called cc-connect bridges Claude Code to messaging platforms like Slack and Telegram, allowing remote interaction without exposing your local machine. The agent runs locally while a small bridge relays messages between the agent and chat apps.