Skip to main content
MCP server CX Codex

loci — Claude Code MCP server: what it does, how to install

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

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add loci -- uvx loci-rag
Open on GitHub

What loci 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.

What it helps with

  • 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 for the agent

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

How to install loci

Platform CLI

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>

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about loci

How do I install loci in Claude Code?

Run claude mcp add loci -- uvx loci-rag. This registers loci as an MCP server for Claude Code.

What does loci do?

loci indexes notes and documents, searches them with a hybrid method, and answers questions with source-section references. Its MCP tools also manage shared memories and expose note relationships.

What does loci require to run?

It requires Python 3.11+, values for [llm] and [embed], and an embedding endpoint that supports /embeddings. API keys can be provided with BRAIN_LLM_API_KEY and BRAIN_EMBED_API_KEY.

Similar MCP servers

All MCP servers for Agent setup: memory, context, orchestration →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor