loci
A queryable personal knowledge base over scattered notes, docs and chat logs, using hybrid vector-plus-keyword retrieval with section-level citations and an MCP server so AI agents can use the same index.
loci indexes local files, such as project docs, notes and chat logs scattered across many directories, using heading-aware chunking, embeddings and hybrid retrieval that combines vector search with BM25 keyword search, so a bilingual query can find a matching document even when it is written in the other language, and every citation points to a specific section rather than only a file. An answer comes from an LLM call over the retrieved passages, reached through any OpenAI-compatible API.
An MCP server exposes the same index to AI agents and coding clients such as Claude Desktop, Cursor or Cline, so those tools become a front end for the knowledge base at no extra cost; an evaluation script shows that adding the keyword side of the hybrid retrieval improves results over vector search alone on a bilingual test set. Reranking is available from two providers: a pointwise large-language-model scorer, or an offline cross-encoder model that runs locally at a small cost in extra latency. Office documents, PDF tables, web pages, org files and chat logs are supported input formats alongside plain text.
It is written in Python in about 300 lines of core code, with no LangChain dependency, and stores its index on the local machine; only embedding and chat calls go out, to an OpenAI-compatible endpoint of the user's choice.