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

Prompt-caching MCP plugin automatically reduces Claude API costs by identifying stable context
The prompt-caching MCP plugin automatically identifies stable parts of context like system prompts and tool definitions, then marks them for Anthropic's caching feature to reduce API costs by 80-92% in coding sessions.

Claude Code skill combines DeepMind Aletheia and Anthropic harness approaches
A Claude Code skill implements a Planner→Generator→Evaluator→Reviser pipeline that synthesizes DeepMind's Aletheia math research agent with Anthropic's multi-agent coding architecture, adding blind pre-analysis where the evaluator reasons about correct approaches before seeing candidate code.

Freddy MCP Server Connects Wearables to AI Agents with Headless Sign-In
Freddy is a personal MCP server that links wearables (Polar, Oura, Withings, Suunto, Intervals.icu, Hevy, plus WHOOP, Strava, Dexcom in beta) to AI clients like Claude Code, ChatGPT, and Notion AI via OAuth. New headless sign-in enables scheduled workflows for autonomous agents.

OpenObscure: Open-Source On-Device Privacy Firewall for AI Agents
OpenObscure is an open-source, on-device privacy firewall that sits between AI agents and LLM providers, using FF1 Format-Preserving Encryption to encrypt PII values before requests leave your device. It includes PII detection with 99.7% recall, cognitive firewall scanning, and runs on macOS/Linux/Windows with iOS/Android bindings.