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

cldctrl: Terminal Dashboard for Managing Claude Code Sessions
cldctrl is an npm package that provides a terminal dashboard for launching and managing Claude Code sessions across projects. It reads existing ~/.claude data, auto-discovers projects, and shows token usage with rate limit bars.

Testreel: Programmatic Demo Video Generation with Claude Code
Testreel is an npm package that generates polished product demo videos from JSON, YAML, or Playwright interaction descriptions. It creates webm/mp4/gif videos with cursor overlays, click ripples, and gradient backgrounds.

MuninnDB adds Dream Engine for LLM memory consolidation with vault isolation
MuninnDB, a Go-based cognitive memory database, now includes a Dream Engine that performs LLM-driven memory consolidation between sessions using deduplication thresholds and semantic review. The system features vault trust tiers for data isolation and runs locally with Ollama.

Scalpel v2.0: Codebase Scanner and AI Agent Orchestrator
Scalpel v2.0 is an open-source tool that scans codebases across 12 dimensions and assembles custom AI agent teams. It includes a pure bash scanner that runs without AI tokens and works with Claude Code, Codex, Gemini, Cursor, Windsurf, Aider, and OpenCode.