loci
Allows indexing and searching an existing Obsidian vault. Users can keep using Obsidian for note-taking while loci provides hybrid search, Q&A with citations, and durable memory over the vault's Markdown files.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@lociwhat did we decide about deployment, and where is that written?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Turn scattered notes, project docs and agent memories into a knowledge base you can search and ask questions about — from your terminal, browser or MCP client.
loci combines vector search with BM25 and returns answers with file > section citations. Your files and index stay on your machine. Embedding and chat requests go to the providers you configure; local endpoints can keep the entire workflow offline.
Quick start · Web console · MCP setup · Usage guide · 中文说明

Actual console UI with fictional demo data. No personal knowledge base, account or API key is connected; counts are illustrative.

What you can do
Need | How loci helps |
Find a decision buried in your notes | Hybrid search across directories, with tag, path and date filters |
Ask a question and check the evidence | Answers cite source sections; optional claim-by-claim verification |
Carry context between AI tools | MCP tools share one instance; durable memories are Markdown files |
See what each coding agent remembers | Harness discovery, file browsing, per-tool stats and digest notes |
Manage the knowledge base visually | Built-in Web console for search, Q&A, memories, indexing and audit |
Markdown, text, HTML, org-mode and chat exports work out of the box. Optional extras add PDF, Word and OCR support. Keep using your existing note editor or Obsidian vault.
Related MCP server: loci-mcp
Quick start
Requires Python 3.11+. Start from source so the example configuration is available:
git clone https://github.com/IvenKooLab/loci.git
cd loci
python -m pip install -e .
cp config.example.toml config.tomlEdit config.toml: fill in [llm] and [embed], and change [[sources]].path to your notes directory. The embedding endpoint must support /embeddings; chat and embeddings may use different providers.
loci ingest
loci search "deployment decisions"
loci ask "What did we decide about deployment, and why?"Already have a configuration? Install the package with python -m pip install loci-rag and set LOCI_HOME to your instance directory. For optional document support, use python -m pip install 'loci-rag[pdf,docx]'.
API keys can be supplied through
BRAIN_LLM_API_KEYandBRAIN_EMBED_API_KEY. After changing the embedding model, rebuild withloci ingest --force.
Web console
loci serve-httpOpen 127.0.0.1:8765/ui to browse harness memories, search, ask questions, edit shared notes and inspect indexing activity. The console includes Chinese/English and light/dark switches; no frontend build is required.
By default, anonymous loopback clients have admin access. Behind a reverse proxy or SSH tunnel, set [http] local_admin = false and configure role-based tokens. See access control.
For DeepSeek Harness, loci-dsh brings search, Q&A and memory capture into the Harness workbench through the same HTTP backend.
Connect your AI tools
Point each MCP client at the same LOCI_HOME so they share the same config, index and memory files:
{
"mcpServers": {
"loci": {
"command": "loci-mcp",
"env": { "LOCI_HOME": "/absolute/path/to/your/loci-instance" }
}
}
}Use an absolute executable path if your client cannot find loci-mcp. The instance directory must contain your config.toml.
MCP tools | Purpose |
| Retrieve excerpts or get cited answers |
| Store or retract durable memories |
| Explore note links and extracted relations |
| Consolidate knowledge and inspect agent memories |
| Inspect and refresh the index |
The server also exposes note resources and briefing, study-plan and contradiction-check prompts. See the MCP guide for details.
A small daily workflow
loci watch # keep changed documents indexed
loci remember "Use staging for demos" --title "Demo environment"
loci search "demo environment" --tag memory
loci ask "How should I prepare a demo?" --verify
loci harness # inspect detected agent memoriesIndexing is incremental. Notes stay readable as Markdown. For multiple machines, sync source files and memory notes, then rebuild each local index; keep credentials out of the repository.

The usage guide includes the original bilingual retrieval example and a small evaluation you can rerun against your own corpus.
Documentation
Guide | Covers |
Commands, filters, harness setup, access control and local models | |
Provider settings, source directories and runtime options | |
Modules and the retrieval pipeline | |
Released changes and planned work | |
Development conventions and offline testing |
loci uses the OpenAI-compatible SDK and ChromaDB, with no LangChain or LlamaIndex dependency. BM25, loaders and the MCP transport are implemented in the project.
python -m pip install -e '.[dev,pdf]'
pytest # offline tests; no API keys requiredFind loci on Glama, ModelScope and awesome-mcp-servers. Source: GitHub · Gitee. Licensed under MIT.
This server cannot be deployed
Maintenance
Related MCP Connectors
Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.
Persistent memory for AI agents. Search and store durable facts, preferences and decisions.
Universal persistent memory and knowledge retrieval layer for AI agents and LLMs.
Persistent memory and knowledge graphs for AI agents. Hybrid search, context checkpoints, and more.
Related MCP Servers
- FlicenseNot gradedqualityAmaintenanceEnables AI hosts such as Claude Desktop, Cursor, and Cline to search, ask questions of, and receive cited answers from a local hybrid vector-plus-BM25 index built over scattered notes, project docs, PDFs, and chat logs. Exposes 8 tools with resources and prompts so agents can retrieve section-level citations from a personal knowledge base without leaving their own interface.-
- FlicenseNot gradedqualityAmaintenanceEnables AI agents and MCP hosts to query locally indexed notes, docs, chat logs, and other files via hybrid vector/BM25 retrieval with section-level citations. Exposes tools, resources, and prompts for searching and asking over the indexed content.-
- FlicenseNot gradedqualityAmaintenanceEnables AI hosts and agents to search, ask, and retrieve cited sections from a locally indexed collection of notes, documents, PDFs, web pages, org files, and chat logs using hybrid vector and BM25 retrieval.-
- FlicenseNot gradedqualityAmaintenanceEnables AI agents and MCP hosts to query a local, machine-resident index of scattered notes, project docs, PDFs, Office files, and chat exports using hybrid vector + BM25 retrieval with section-level citations. Exposes tools, resources, and prompts so hosts like Claude Desktop, Cursor, and Cline can search, ask, and explore linked knowledge through natural language.-