Mnemosyne MCP
Hierarchical local memory engine for AI agents with semantic search, exposed through MCP tools.
Overview
Hierarchical local memory engine for AI agents with semantic search, exposed through MCP tools.
Setup
Run with npx:
npm install -g @mnemosyne/mcpConfiguration
MNEMOSYNE_DB, MNEMOSYNE_EMBEDDING_MODEL environment variables; SQLite backendDocumentation
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
| Tool | Description |
|---|---|
remember_fact | Store a fact at a given path |
remember_procedure | Store a procedure/how-to at a given path |
remember_preference | Store a user preference |
remember_event | Store an event with timestamp |
get_memory | Fetch a memory by path |
list_subtree | List all memories under a path |
search_memory | Semantic search across all memories |
forget | Delete a memory by path |
forget_subtree | Recursively 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
