universal-memory-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@universal-memory-mcp Store that I finished reading Dune yesterday."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
universal-memory-mcp
Persistent memory MCP server for single and multi-agent LLM systems. Gives AI agents long-term memory backed by SQLite with hybrid keyword + semantic search.
Features
Memory types: episodic (events/logs), semantic (facts/knowledge), procedural (how-to/workflows)
Hybrid search: FTS5 keyword search + cosine similarity over embeddings, with configurable weights
Knowledge graph: directed links between memories (caused_by, related_to, contradicts, supports, follows) with BFS traversal
Session checkpoints: save/restore agent state across conversations
Multi-agent support: scope memories by agent_id, session_id, or share globally
Optimistic locking: safe concurrent updates with version conflict detection
Pluggable embeddings: HuggingFace transformers (in-process) or llama-server (external HTTP)
Related MCP server: NeuralVaultCore
Install
uv syncUsage
Run as an MCP server (stdio transport):
uv run python server.pyOr via the wrapper script:
./run.shCLI
This package also installs a memory CLI:
uv run memory doctorIngest Claude/Codex logs
The log ingester reads local Claude/Codex JSONL/text logs, redacts common secrets, extracts durable memories, and stores only the extracted memories with log provenance metadata. Raw logs are not stored.
Dry-run first:
uv run memory ingest-logs codex --dry-run --root ~/.codex/sessions --extractor heuristic
uv run memory ingest-logs claude --dry-run --root ~/.claude/projects --extractor heuristicUse a local llama-server OpenAI-compatible chat endpoint for extraction:
llama-server --model /path/to/chat-model.gguf --port 8080
uv run memory ingest-logs all --llm-url http://localhost:8080 --llm-model localBy default the CLI does not send max_tokens to the chat endpoint, which avoids
truncating extraction responses from thinking models. Set an explicit cap only
when you need one:
uv run memory ingest-logs codex --llm-max-tokens 4096To also compute embeddings through a local embedding server:
llama-server --model embeddinggemma-300m-Q4_0.gguf --port 8787 --embedding --ctx-size 512
MEMORY_ENABLE_EMBEDDINGS=true \
MEMORY_EMBEDDING_BACKEND=llama-server \
MEMORY_EMBEDDING_DIMENSION=768 \
MEMORY_LLAMA_SERVER_URL=http://localhost:8787 \
uv run memory ingest-logs codex --llm-url http://localhost:8080Incremental checkpoints are stored in SQLite, so later runs only consume new events. For polling:
uv run memory watch-logs all --interval 30 --llm-url http://localhost:8080Claude Code config
Add to your MCP settings (~/.claude/settings.json or project .mcp.json):
{
"mcpServers": {
"memory": {
"command": "uv",
"args": ["run", "--directory", "/path/to/universal-memory-mcp", "python", "server.py"]
}
}
}Configuration
All settings via environment variables (prefix MEMORY_):
Variable | Default | Description |
|
| SQLite database path |
|
|
|
|
| HuggingFace model name |
|
| Embedding vector size |
|
| llama-server endpoint |
|
| Set |
|
| Hybrid search keyword weight |
|
| Hybrid search semantic weight |
|
| Minimum cosine similarity for semantic-channel recall results (0 = disabled). Keyword matches always survive. |
|
| Truncate recalled contents to this many chars (0 = disabled). Full text via exact fetch or |
Using llama-server backend
For lower memory usage with a GGUF model:
llama-server --model embeddinggemma-300m-Q4_0.gguf --port 8787 --embedding --ctx-size 512
MEMORY_EMBEDDING_BACKEND=llama-server MEMORY_EMBEDDING_DIMENSION=768 uv run python server.pyMCP Tools
The surface is deliberately small — five tools, tiered by call frequency:
Tool | Description |
| One retrieval tool, three selectors: |
| Store a memory with type, agent/session scope, importance; optional |
| Update with optimistic locking ( |
|
|
|
|
Errors are raised as MCP tool errors (isError: true), never returned as data.
Breaking changes in 0.2.0
get_memory, delete_memory, link_memories, get_linked_memories, create_session, checkpoint_session, restore_session, get_stats, extract_entities, get_entity_neighbors, check_contradictions, dream_status, and run_dream_jobs were folded into the five tools above. recall_memories now returns {mode, count, memories} instead of a bare list, truncates long contents by default, and applies a semantic relevance cutoff (MEMORY_RECALL_MIN_RELEVANCE).
Tests
uv run pytestLicense
Available Tools
5 toolsmanage_sessionA
Manage sessions for checkpoint/restore of agent state across conversations.
Inputs: action (required), state, agent_id, metadata, +3 more. Returns: object
memory_adminC
Administrative operations: statistics, background jobs, entity/contradiction maintenance, manual graph links, and deletion.
Inputs: action (required), limit, max_jobs, strength, +7 more. Returns: object
recall_memoriesA
Retrieve memories: hybrid/keyword/semantic search (query), exact fetch (memory_id), or entity lookup (entity).
Exactly one selector — query, memory_id, or entity — must be provided. Set expand_links>0 to include graph neighbors for each result.
Inputs: limit, query, entity, agent_id, +14 more. Returns: object
store_memoryB
Store a new memory with optional agent/session scoping, semantic embedding, and graph links.
Inputs: content (required), memory_type (required), links, agent_id, +3 more. Returns: object
update_memoryB
Update a memory with optimistic locking for concurrent agent safety.
Inputs: memory_id (required), content, metadata, importance, +2 more. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose: recall, store, update, session management, and admin operations. There is no overlap between their scopes, and the descriptions make the boundaries explicit.
Tool names follow a consistent verb_noun pattern (e.g., store_memory, update_memory, manage_session). The only minor deviation is memory_admin which uses a noun_verb pattern, but it remains clear and readable.
With 5 tools, the set is well-scoped for a memory server. Each tool covers an essential operation—CRUD for memories, session management, and admin—without being excessively minimal or bloated.
The tool set provides complete lifecycle coverage for memories (store, retrieve, update, delete via admin) plus session management and administrative maintenance. No obvious gaps are present for the stated purpose of agent memory management.
Related MCP Connectors
Cloud-hosted MCP server for durable AI memory
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
Hosted memory for AI agents over MCP. One memory shared by all your agents.
Persistent memory for AI agents across Claude, ChatGPT and any MCP client.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceA local-first MCP memory server providing persistent, searchable memory for AI agents, powered by SQLite.1 npm1Apache 2.0
- AlicenseNot gradedqualityDmaintenanceAn MCP server that provides persistent long-term memory for AI agents via local SQLite storage with low token overhead, enabling memory storage, retrieval, and management across sessions.1MIT
- FlicenseNot gradedqualityDmaintenanceAn MCP server for managing persistent AI memory using hybrid search (keyword + semantic vector) with SQLite storage and offline-first local embeddings.-
- AlicenseAqualityBmaintenanceA long-term memory MCP server for AI agents that stores memories (facts, decisions, etc.) in a single SQLite database with hybrid search and full edit history, ensuring consistency across sessions.43MIT