mcp-local-rag
View on GitHubLocal-first RAG server for developers. Semantic + keyword search for code and technical docs. Works with MCP or CLI. Fully private, zero setup.
A TypeScript MCP server and CLI that builds a fully local hybrid (semantic + keyword) index over PDF, DOCX, Markdown, text, and HTML documents. Runs embeddings and vector storage on-device with LanceDB and Hugging Face models, so private docs stay searchable offline from Claude Code, Cursor, Codex, or the terminal.
Use Cases
Search private PDF/DOCX/Markdown/text documents without sending them to an embedding APIGive Claude Code, Cursor, Codex, or OpenCode local semantic search over project docsFind exact API names, class names, and error codes via hybrid keyword + semantic retrievalIngest client-fetched HTML pages and convert them to Markdown for searchIndex and caption figures in figure-heavy PDFs with an opt-in local vision modelRun ingestion and queries from the terminal via CLI without an MCP clientReconcile an index with a document root using sync_start/sync_status jobsRead surrounding chunks with read_chunk_neighbors for more contextKeep retrieval fully offline and zero-config after the first embedding model downloadScope searches to a path prefix with the scope parameter
Built With
- Language
- TypeScript
- Frameworks
- Model Context Protocol SDK · LanceDB · Transformers.js · Hugging Face · ONNX Runtime (WebGPU) · Readability · Mammoth · Node.js · TypeScript · Vitest · Biome
Tags
mcp-server · local-rag · rag · hybrid-search · semantic-search · vector-search · embeddings · local-first · privacy-first · offline · cli · document-search · pdf · docx · markdown · developer-tools