Loci MCP server
{
"mcpServers": {
"3m1ry33t-loci": {
"command": "uvx",
"args": [
"loci-mem"
]
}
}
}{
"mcpServers": {
"3m1ry33t-loci": {
"command": "uvx",
"args": [
"loci-mem"
]
}
}
}{
"mcpServers": {
"3m1ry33t-loci": {
"command": "uvx",
"args": [
"loci-mem"
]
}
}
}{
"servers": {
"3m1ry33t-loci": {
"command": "uvx",
"args": [
"loci-mem"
]
}
}
}{
"mcpServers": {
"3m1ry33t-loci": {
"command": "uvx",
"args": [
"loci-mem"
]
}
}
}file .mcp.json (in your project root)file claude_desktop_config.jsonfile ~/.cursor/mcp.jsonfile .vscode/mcp.jsonfile ~/.codeium/windsurf/mcp_config.jsoninstall uvx loci-memversion 0.5.0
What it does
Loci is a scoped memory system for coding agents that routes questions to the right project repository and answers based on project-specific code structure and history, or abstains if out of scope. It solves the problem of merged indexes where large projects dominate retrieval results regardless of relevance by maintaining separate stores and deciding scope per query.
- Answer questions about code structure like 'what calls run_agent_turn' by querying the structure store across scoped projects.
- Explain historical context like 'why was the session cookie dropped on localhost' by retrieving from the episode store with correct project scope.
- Search across multiple personal or work projects to find 'which projects use wrangler and D1' without large repositories drowning out smaller relevant ones.
Tools this server exposes
| Tool | Does |
|---|---|
| ask | Query the routed stores and return a scoped, cited answer or abstain if the question is out of scope. |
| scan | Register git repositories as scopes; optionally split monorepos into per-package scopes. |
| graphs | Extract code symbols and structure across ~18 languages to populate the structure store. |
| index | Build the routing index and episode store from scopes and graphs. |
| embed | Encode episode chunks with local embeddings for semantic ranking. |
| calibrate | Fit per-scope semantic thresholds to routing behavior on your corpus. |
| doctor | Report what is missing in the installation and suggest commands to fix it. |
| eval | Measure routing accuracy and retrieval quality against your corpus. |
Before you enable it
An MCP server runs with whatever access you give it. Start with a development account rather than production, and check which tools the server exposes before you let an agent call them unattended.