šŸ”Œ

Mnemosyne MCP

Memory•⭐ 30

Hierarchical local memory engine for AI agents with semantic search, exposed through MCP tools.

Claude CodeCursorZed

Overview

Hierarchical local memory engine for AI agents with semantic search, exposed through MCP tools.

Setup

Run with npx:

npm install -g @mnemosyne/mcp

Configuration

MNEMOSYNE_DB, MNEMOSYNE_EMBEDDING_MODEL environment variables; SQLite backend

Documentation

Mnemosyne MCP

Overview

Mnemosyne is a hierarchical local memory engine for AI agents, exposed through MCP. The name comes from Mnemosyne, the Greek muse of memory.

Where most agent memory systems treat memory as a flat list of facts, Mnemosyne organizes memory as a tree — each node can have children, each level has different retention, and the hierarchy is traversable by the agent. Featured on Show HN as "Mnemosyne: Local hierarchical memory engine for AI agents (MCP Native)".

The design is inspired by cognitive science: long-term memory in humans isn't a database, it's a hierarchy of concepts and associations. Mnemosyne brings that structure to agent memory, with SQLite as the storage backend and MCP as the interface.

Features

  • Hierarchical memory tree: nodes can have parent/child relationships
  • Multiple memory types: facts, procedures, preferences, events
  • Local-first: SQLite backend, no cloud dependency
  • Semantic search: embed-based similarity on top of the tree
  • Retrieval by hierarchy: fetch by path, subtree, or depth
  • MCP-native: works with any MCP client
  • Cross-session persistence: memory survives restarts

Installation

# Install globally
npm install -g @mnemosyne/mcp

# Or run with npx
npx -y @mnemosyne/mcp

Configuration

{
  "mcpServers": {
    "mnemosyne": {
      "command": "npx",
      "args": ["-y", "@mnemosyne/mcp"],
      "env": {
        "MNEMOSYNE_DB": "~/.mnemosyne/memory.db",
        "MNEMOSYNE_EMBEDDING_MODEL": "nomic-embed-text-v1.5"
      }
    }
  }
}

Available Tools

ToolDescription
remember_factStore a fact at a given path
remember_procedureStore a procedure/how-to at a given path
remember_preferenceStore a user preference
remember_eventStore an event with timestamp
get_memoryFetch a memory by path
list_subtreeList all memories under a path
search_memorySemantic search across all memories
forgetDelete a memory by path
forget_subtreeRecursively delete a subtree

Example Usage

Storing hierarchical memories

Ask Claude: "Remember that user prefers Python over JavaScript for backend work, and store this under Preferences/Language."

{
  "tool": "remember_preference",
  "args": {
    "path": "Preferences/Language/Backend",
    "content": "User prefers Python over JavaScript for backend work.",
    "reason": "User mentioned this on 2026-08-28"
  }
}

Retrieving context

Ask Claude: "What are my preferred languages?"

{
  "tool": "list_subtree",
  "args": {
    "path": "Preferences/Language"
  }
}

Response:

{
  "path": "Preferences/Language",
  "children": [
    {"path": "Preferences/Language/Backend", "content": "Prefers Python"},
    {"path": "Preferences/Language/Frontend", "content": "Prefers TypeScript"}
  ]
}

Semantic search

{
  "tool": "search_memory",
  "args": {
    "query": "how do I deploy the agent service",
    "top_k": 5
  }
}

Hierarchy Design

The Mnemosyne tree is intentionally shallow but organized:

/
ā”œā”€ā”€ Facts/          # Stable knowledge
│   ā”œā”€ā”€ Project/
│   └── Domain/
ā”œā”€ā”€ Procedures/     # How-tos
│   ā”œā”€ā”€ Deploy/
│   └── Debug/
ā”œā”€ā”€ Preferences/    # User preferences
│   ā”œā”€ā”€ Language/
│   ā”œā”€ā”€ Style/
│   └── Workflow/
└── Events/         # Timestamped events
    ā”œā”€ā”€ Meetings/
    └── Decisions/

You can create custom branches as needed.

Pros

  • āœ… True hierarchy: navigable memory tree, not flat key-value
  • āœ… Local-first: SQLite, no cloud, no API cost
  • āœ… Semantic search: embed-based retrieval on top of structure
  • āœ… Cross-session persistence: memory survives restarts
  • āœ… MCP-native: works with any MCP client
  • āœ… Named after Greek muse: charming design philosophy

Cons

  • āŒ Tiny community: ~30 GitHub stars, single maintainer
  • āŒ No sync: SQLite-only, no cloud replication
  • āŒ Embedding model is separate: you need to run your own embedder
  • āŒ Hierarchical design is opinionated: some use cases want flat memory
  • āŒ No forgetting curve: memories don't decay naturally without manual cleanup

When to Use

Use Mnemosyne MCP when:

  • You want structured, hierarchical agent memory — not a flat memory bank
  • You need local-first with no cloud dependency
  • You want semantic search combined with path-based traversal
  • You're building personal assistants where memory structure matters

Prefer alternatives when:

  • You need multi-user sync — use Zep, Mem0, or OpenViking
  • You want flat, simple memory — use the official memory-mcp
  • You need production-grade durability — use a managed vector database

Resources