loci

Registre officiel Productivité

Cross-session memory and hybrid RAG over your notes and docs. Local-first, with cited answers.

Installation

Ajoutez ceci à la configuration MCP de votre client (Claude Desktop : claude_desktop_config.json ; Cursor : .cursor/mcp.json ; VS Code et les autres utilisent la même forme « mcpServers »).

PYPI package loci-rag
Claude Code
claude mcp add loci -- uvx loci-rag==0.4.0
Configuration JSON (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "loci": {
            "command": "uvx",
            "args": [
                "loci-rag==0.4.0"
            ]
        }
    }
}

Documentation

Tirée du README du projet sur GitHub, actualisée chaque semaine. Les liens ouvrent GitHub.

Sommaire
  1. What you can do
  2. Quick start
  3. Web console
  4. Connect your AI tools
  5. A small daily workflow
  6. Documentation

English · 简体中文 · 繁體中文 · 日本語 · 한국어

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.

Dark theme preview

What you can do

NeedHow loci helps
Find a decision buried in your notesHybrid search across directories, with tag, path and date filters
Ask a question and check the evidenceAnswers cite source sections; optional claim-by-claim verification
Carry context between AI toolsMCP tools share one instance; durable memories are Markdown files
See what each coding agent remembersHarness discovery, file browsing, per-tool stats and digest notes
Manage the knowledge base visuallyBuilt-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.

Quick start

Try it first, with nothing configured
pip install loci-rag
loci demo

loci demo copies six fictional notes into ./loci-demo-notes, chunks them and answers three example questions — cited down to file > section — with no config.toml, no API key and no network. It is keyword-only (BM25, the same ranking hybrid search fuses with vector hits), which is exactly the point: something runs before you commit a key. Add [embed] later and the same index goes hybrid.

Actual loci demo output on the bundled sample notes; paths shortened, timings vary.

Index your own notes

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.toml

Edit 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_KEY and BRAIN_EMBED_API_KEY. After changing the embedding model, rebuild with loci ingest --force.

Web console

loci serve-http

Open 127.0.0.1:8765/ui to browse harness memories, search, ask questions, edit shared notes and inspect indexing activity. Clicking a search result opens an evidence pane with the passage it was cut from — the file > section citation, checkable without leaving the console. 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 toolsPurpose
brain_search · brain_askRetrieve excerpts or get cited answers
brain_remember · brain_forgetStore or retract durable memories
brain_links · brain_graphExplore note links and extracted relations
brain_wiki · brain_harnessConsolidate knowledge and inspect agent memories
brain_stats · brain_ingestInspect 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 memories

Indexing 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.

See a retrieval session

The usage guide includes the original bilingual retrieval example and a small evaluation you can rerun against your own corpus.

Documentation

GuideCovers
Usage guide / 中文指南Commands, filters, harness setup, access control and local models
Configuration exampleProvider settings, source directories and runtime options
ArchitectureModules and the retrieval pipeline
Changelog · RoadmapReleased changes and planned work
ContributingDevelopment 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 required

Find loci on Glama, ModelScope and awesome-mcp-servers. Source: GitHub · Gitee. Licensed under MIT.

Questions fréquentes

Qu'est-ce que loci ?

Cross-session memory and hybrid RAG over your notes and docs. Local-first, with cited answers.

Comment installer loci ?

Il s'exécute sur votre machine. Dans Claude Code : claude mcp add loci -- uvx loci-rag==0.4.0. Pour les autres clients, collez la configuration JSON de cette page dans leurs réglages MCP.

Faut-il une clé API pour loci ?

Son entrée au registre n'indique aucune clé ni secret obligatoire. Certaines fonctions peuvent tout de même demander un compte auprès du service auquel il se connecte.

loci est-il open source ?

Oui. Son code est sur GitHub sous licence MIT.

Qui maintient loci ?

Il est publié par IvenKooLab. AI.tn le référence sans le maintenir ni le recommander.

Issu du registre MCP officiel. Être listé n'est pas une recommandation : vérifiez le code et les permissions d'un serveur avant de lui donner accès à vos données.