Knowledge RAG
A local-first RAG server that plugs into Claude Code (and other MCP clients) as a MCP tool, giving a coding agent retrieval over your own document collections with zero external servers and zero API keys. Its primary identity is an MCP server / agent tool, not a new retrieval technique — the close sibling of headroom on the local-first, bring-your-own-context axis. By Lyon (lyonzin); MIT; ~135★, v4.3.1 (2026-06). T1: first-party project repo (spoke convention; not third-party-validated).
What it does
- Hybrid retrieval. Semantic search (BAAI bge-small-en-v1.5, 384-dim) + BM25 keyword search (optimized inverted index), fused and then cross-encoder reranked (Xenova ms-marco-MiniLM-L-6-v2). This is the hybrid-retrieval pattern (research-wiki) packaged as a turnkey tool.
- 13 MCP tools for search, document management, indexing, and retrieval evaluation.
- 20 file-format parsers (Markdown, PDF, JSON, source code, Office DOCX/XLSX/PPTX, CSV…), with section-aware chunking for Markdown and fixed-size chunking elsewhere.
- Self-contained stack. ChromaDB vector store + persistent metadata; ONNX Runtime embeddings (CPU default, optional CUDA 12); stdio / SSE / HTTP transports; Python 3.11+. Installable via PyPI, an NPM wrapper, Docker, or source.
Why it matters here
It is a concrete instance of the spoke’s local-first agent infrastructure thread: rather than a hosted
retrieval API, the whole RAG pipeline runs on the developer’s machine and exposes itself to the agent
through MCP — the same “compress/serve context locally” posture as headroom, and a natural companion to
the fully-local agent stack. The retrieval science it uses (hybrid
semantic+BM25 + reranking) lives in ../research-wiki (hybrid-retrieval-rag,
retrieval-augmented-generation); here the subject is the MCP-server packaging of it.
Related
model-context-protocol · headroom · from-local-llm-to-agent · ask-search · hybrid-retrieval-rag · retrieval-augmented-generation