# loci

loci gives AI tools shared memory and search across notes and docs. It returns answers tied to the source file sections.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed · ★ 100
- Author: IvenKooLab
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/IvenKooLab/loci
- Updated: 2026-10-22
- HTML: https://affpapa.org/en/nevibecode/mcp/loci

## What it does

loci turns notes, project documents, and agent memories into a local knowledge base that MCP clients can query. Its tools cover hybrid retrieval, cited Q&A, durable memory, note-link exploration, agent-memory inspection, and index refreshes. Search combines semantic vectors with BM25, while answers can point back to the relevant file and section.

The server reads Markdown, plain text, HTML, org-mode, and chat exports. PDF and Word support comes through optional extras. Several clients can use one instance when they share `LOCI_HOME`, including Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, and Zed. Setup needs Python 3.11+, `[llm]` and `[embed]` settings, plus an embedding endpoint that accepts `/embeddings`. Without Python 3.11+, the server will not start.

For Claude Code, install it with `claude mcp add loci -- uvx loci-rag`. API credentials may be supplied through `BRAIN_LLM_API_KEY` and `BRAIN_EMBED_API_KEY`. After changing the embedding model, rebuild the index with `loci ingest --force`.

## Requirements
- Needs: Python and uv (commands run via uvx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add loci -- uvx loci-rag
```
uvx runs the command named after the package; if the README names another one, use uvx --from loci-rag <command>

### Codex

**Platform CLI**
```bash
codex mcp add loci -- uvx loci-rag
```
uvx runs the command named after the package; if the README names another one, use uvx --from loci-rag <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "loci": {
            "command": "uvx",
            "args": [
                "loci-rag"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from loci-rag <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "loci": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "loci-rag"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from loci-rag <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add loci uvx loci-rag
```
uvx runs the command named after the package; if the README names another one, use uvx --from loci-rag <command>

## When to use it
- search notes for a buried deployment decision
- trace an answer back to its source section
- share durable memory across AI coding clients
- refresh the index after documents change
- inspect links and relations between notes

## Example prompts
- Search the notes for deployment decisions and cite the source files and sections.
- Tell me what we decided about deployment and why, with citations from the notes.
- Save this demo-environment rule as shared memory under the title `Demo environment`.

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
