Skip to main content
Glama

MCP-Loci

Your AI forgets everything between sessions. Loci fixes that.

Loci is a persistent memory server for Model Context Protocol — giving Claude and other MCP-compatible assistants a cross-session memory that actually works. Store facts, recall them semantically, and synthesize a full portrait of everything your AI knows.

Python License: MIT FastMCP


What it does

Tool

Description

remember

Store a named memory with type, description, and content

recall

Search memories — keyword, semantic, or hybrid

forget

Remove a memory by name or ID

synthesize

Cross-memory portrait: changes, uncertainties, and recommendations

health

Server status: memory count, embedding count, model state

Hybrid search combines BM25 keyword matching (SQLite FTS5) with local semantic embeddings (all-MiniLM-L6-v2) — so recall works whether you remember the exact word or just the general idea.


Related MCP server: AGI MCP Server

Quickstart

Install

pip install mcp-loci

Or with semantic search support (recommended):

pip install "mcp-loci[embeddings]"

Add to Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "memory": {
      "command": "python",
      "args": ["-m", "mcp_loci.server"]
    }
  }
}

Restart Claude Desktop. That's it — Claude now has persistent memory across sessions.

Try it

In Claude:

"Remember that my preferred code style is no trailing commas and 4-space indentation."

Close Claude. Reopen it.

"What's my preferred code style?"

Claude remembers.


Memory types

Use types to organize and filter your memories:

Type

Use for

user

Personal preferences, identity, background

feedback

Things Claude should always/never do

project

Active work context, goals, deadlines

reference

Where to find things — links, locations, sources


Install with [embeddings] to enable semantic recall. The first call loads the model (~90MB, local — no API key needed). Subsequent calls use a background-warmed model for instant response.

recall("what does adam prefer for formatting")
# → surfaces "preferred code style" memory even without exact keyword match

Set semantic: false for pure keyword search, or leave it on for hybrid (default).


Configuration

Env var

Default

Description

MCP_MEMORY_DB_PATH

~/.mcp-loci/memory.db

SQLite database location


Development

git clone https://github.com/underratedf00l/MCP-Loci
cd MCP-Loci
pip install -e ".[dev,embeddings]"
pytest

28 tests (24 unit + 4 integration). All green.


Why "Loci"?

The method of loci is a 2,500-year-old memorization technique — you place memories in specific locations in an imagined space so you can walk back and find them. That's exactly what this does, at the data layer.


License

MIT — see LICENSE.

Available Tools

5 tools
forgetForgetA

Soft-delete a memory by ID or name. Pinned memories require force=True.

Inputs: memory_id_or_name (required), force. Returns: object

healthHealthA

Return server health status — DB connectivity, embedding model state, memory counts.

Inputs: no named parameters. Returns: object

recallRecallB

Hybrid keyword + semantic search across memories, ranked by relevance and confidence.

Inputs: query (required), limit, semantic, type_filter, +2 more. Returns: result

rememberRememberC

Store or update a named memory with type, description, and content.

Inputs: name (required), type (required), content (required), description (required), +4 more. Returns: object

synthesizeSynthesizeC

Cross-memory synthesis — portrait, changes, uncertainties, recommendations.

Inputs: scope, type_filter, max_memories, force_refresh, +1 more. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool maps to a distinct memory operation: health for status, remember for writes, recall for retrieval, forget for deletion, and synthesize for cross-memory analysis. The potential recall/synthesize overlap is resolved by clear descriptions distinguishing ranked retrieval from derived insights.

    Naming Consistency4/5

    All names are lowercase single words with a predictable, readable style. Four are action verbs (remember, recall, forget, synthesize) while health is a noun, which is a minor deviation from the otherwise consistent verb pattern.

    Tool Count5/5

    Five tools is well-scoped for a memory service, covering health, write, retrieval, deletion, and synthesis without padding. Each tool earns its place in the lifecycle.

    Completeness4/5

    The core memory lifecycle is covered: status, create/update, search, soft-delete, and synthesis. Minor gaps include no explicit list/get-by-ID operation and only soft deletion, though recall and name-based forget likely let agents work around these.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      A
      quality
      Not graded
      maintenance
      Provides long-term memory storage for AI assistants with semantic search, enabling persistent storage of preferences, decisions, and context with relationship tracking between memories.
      19
      -
    • F
      license
      B
      quality
      D
      maintenance
      Enables persistent memory for AI systems by providing tools for episodic, semantic, and procedural data storage through a vector-and-graph-enhanced database. It allows models to maintain long-term continuity using similarity search, thematic clustering, and identity tracking.
      24
      1
      -
    • A
      license
      A
      quality
      D
      maintenance
      Provides persistent memory capabilities for AI assistants, enabling storage, recall, and analysis of information across conversations with intelligent memory management.
      25
      10 npm
      MIT