MCP Server Indexes Codebases into Knowledge Graph for 10x Token Reduction

codebase-memory-mcp is an MCP server that replaces file-by-file code exploration with graph queries for AI coding assistants. It parses codebases with tree-sitter into a persistent knowledge graph stored in SQLite, containing functions, classes, call relationships, HTTP routes, and cross-service links as nodes and edges.
Key Features and Specifications
- Single Go binary with zero infrastructure requirements (no Docker, no databases, no API keys)
- Supports 35 programming languages
- Sub-millisecond query performance
- Auto-syncs on file changes via background polling
- Cypher-like query language for complex graph patterns
- MIT licensed
Performance Benchmarks
The server was benchmarked across 35 real-world repositories, showing at least 10x fewer tokens for structural questions compared to traditional file-by-file exploration. Example: A query like "what calls ProcessOrder?" returns a precise call chain in one graph query (~500 tokens) instead of reading dozens of files (~80K tokens).
Tested repositories ranged from 78 to 49,000 nodes. The Linux kernel stress test handled 20,000 nodes and 67,000 edges with zero timeouts.
Use Case for Local LLM Setups
This is particularly valuable for local LLM setups with smaller context windows (8K-32K), where every token counts. The graph returns exactly the structural information needed without dumping entire file contents into context.
The server works with any MCP-compatible client or via CLI mode for direct terminal use.
📖 Read the full source: r/LocalLLaMA
👀 See Also

Free Wizard Migrates ChatGPT History to Claude Projects — Key Lessons on Token Limits and RAG
A free, no-code tool walks ChatGPT exports into Claude Projects, revealing that 26MB JSON hits token limits and topic splitting is the fix. Claude's RAG only reads parts of large files, so specific queries work best.

OpenClaw Plugin Connects AI Agents to Meshtastic Radio Mesh for Off-Grid Operation
A new open-source plugin bridges the OpenClaw framework with Meshtastic's LoRa radio mesh network, enabling AI conversations, API queries, and device control without internet or cellular connectivity.

agentcache: Python Library for Multi-Agent LLM Prefix Caching
agentcache is a Python library that enables multi-agent LLM frameworks to share cached prompt prefixes, achieving up to 76% cache hit rates and cutting inference time by more than half in tests with GPT-4o-mini.

Engram: Open-source memory layer for Claude Code and MCP clients
Engram is an open-source memory layer that works as an MCP server with any client like Claude Code, Cursor, or Windsurf. It stores unlimited memories with semantic vector search, achieves 80% accuracy on LOCOMO benchmark, and uses about 800 tokens per query versus 5K+ for file-based approaches.