universal-memory-mcp
Click on "Install 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-mcpStore 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.
| Name | Required | Description | Default |
|---|---|---|---|
| state | No | checkpoint: agent state to save as JSON string (working memory, goals, progress, etc.). Required. | |
| action | Yes | 'create' a session, 'checkpoint' agent state into it, or 'restore' saved state. | |
| agent_id | No | create: agent running this session. | |
| metadata | No | create: session metadata as JSON string. | |
| session_id | No | Session UUID. Required for checkpoint/restore; optional for create (None = auto-generate). | |
| checkpoint_id | No | restore: specific checkpoint ID. None = latest checkpoint. | |
| parent_session_id | No | create: parent session ID for forked sessions. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so description carries full burden. It reveals three actions (create, checkpoint, restore) and mentions 'across conversations', signaling persistence scope. However, it does not disclose details like whether checkpoints are retained indefinitely, if there are size limits, or side effects like overwriting previous checkpoints when creating a new one. Adequate but not rich.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence that says exactly what the tool does. Front-loaded with the key concept (managing sessions for checkpoint/restore). No filler, no redundancy with schema. Perfectly concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the output schema exists (agents can inspect return structure) and full parameter documentation, the description covers the essential purpose. It is a generic session management tool, not overly complex. The one-line description plus rich schema is sufficient. Could mention that sessions persist across conversations, but that is already implied.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, but the description adds no parameter-level detail beyond the schema. Baseline starts at 3 for full coverage; the description earns a 4 because the schema itself is very descriptive (documents which params are for which action, defaults, required status, and data types), so the description doesn't need to repeat. Minimal added value, but the schema does the work.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool manages sessions for checkpoint/restore of agent state. It distinguishes from memory-related sibling tools which focus on recall/store/update operations, not session lifecycle management.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies the tool is for saving and restoring agent state across conversations but does not explicitly state when to use this vs memory tools. No guidance on when to create vs checkpoint vs restore, or prerequisites like needing a session_id for checkpoint/restore. The context of 'across conversations' is helpful but implied.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
memory_adminC
Administrative operations: statistics, background jobs, entity/contradiction maintenance, manual graph links, and deletion.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | check_contradictions: maximum candidates to return. | |
| action | Yes | 'stats': system statistics. 'dream_status': background job queue snapshot. 'run_dream_jobs': drain pending dream-cycle jobs in-process. 'extract_entities': re-extract entities for a memory (idempotent). 'check_contradictions': dry-run contradiction check, no links created. 'link': create a directed graph link between two memories. 'delete': delete a memory and all its graph links (destructive). | |
| max_jobs | No | run_dream_jobs: process at most this many jobs. None = drain queue. | |
| strength | No | link: link strength 0.0-1.0. | |
| memory_id | No | Memory UUID. Required for extract_entities/check_contradictions/delete. | |
| created_by | No | link: agent creating this link. | |
| to_memory_id | No | link: target memory UUID. | |
| hot_threshold | No | check_contradictions: similarity threshold for hot-zone candidates. | |
| relation_type | No | link: relationship type. Required for link. | |
| from_memory_id | No | link: source memory UUID. | |
| warm_threshold | No | check_contradictions: similarity threshold for warm-zone candidates. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description must disclose behavioral traits. It mentions deletion and idempotent extraction in parameter descriptions, but the main description omits side effects, authorization requirements, or whether actions are read-only. The term 'administrative' is vague.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, short sentence that front-loads the key concept 'Administrative operations'. It is efficient, though the list after the colon could be better structured for readability.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (11 parameters, 7 actions) and the existence of an output schema, the description is too brief. It does not provide a high-level overview of how the actions interrelate or the typical usage workflow, leaving gaps that the schema alone must fill.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the input schema already documents all parameters and their semantics (e.g., action enum values). The main description adds no additional meaning beyond listing the categories, so the baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states 'Administrative operations' which clearly differentiates it from sibling tools like recall_memories and store_memory. However, it lists multiple categories (stats, background jobs, etc.) rather than a single verb+resource, making the purpose broad but distinguishable.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. The description does not mention when not to use it or how to choose among the many actions. Users must infer from the tool name and enum values.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum results to return. | |
| query | No | Search query (natural language or keywords). Exactly one of query/memory_id/entity must be set. | |
| entity | No | Entity lookup: return memories mentioning this entity surface form (e.g. 'src/foo.py', 'store_memory'). Paths use forward slashes. | |
| agent_id | No | Filter by agent ID. None = search all agents. | |
| time_end | No | ISO8601 end time filter. | |
| memory_id | No | Exact fetch: return the memory with this UUID (always full content). | |
| session_id | No | Filter by session ID. None = search all sessions. | |
| time_start | No | ISO8601 start time filter (e.g. '2025-01-01T00:00:00Z'). | |
| entity_type | No | With entity: filter by entity type. None = match any type. | |
| memory_type | No | Filter by memory type. None = search all types. | |
| search_mode | No | With query: 'hybrid' (keyword+semantic), 'keyword' (FTS5 only), 'semantic' (vector only) | hybrid |
| expand_links | No | Graph expansion depth: attach linked memories to each result under 'links'. 0 = off. | |
| full_content | No | Return full memory contents instead of snippets (default: contents over MEMORY_RECALL_SNIPPET_CHARS are truncated; fetch full text via memory_id). | |
| link_relation | No | With expand_links: filter links by relation type. None = all relations. | |
| min_relevance | No | Minimum cosine similarity for semantic-channel results. None = server default (MEMORY_RECALL_MIN_RELEVANCE). 0 disables. Keyword matches always survive. | |
| link_direction | No | With expand_links: traversal direction. | both |
| min_importance | No | Minimum importance score filter. | |
| exclude_superseded | No | Exclude memories marked as superseded by a newer version. Default True. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must carry the burden. It does disclose the exclusive-selector constraint and the expand_links graph-neighbor behavior. However, it does not explicitly state read-only safety, snippet truncation vs. full content, or how multiple modes interact with filters. The verb 'Retrieve' implies non-mutating behavior, but additional behavioral context beyond the schema is limited.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact and front-loaded: the first sentence immediately conveys the three access modes, and the second sentence adds the selector constraint and graph expansion tip. Every sentence contributes information without bloat or repetition, making it highly scannable.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's high complexity (18 parameters) and the presence of a rich output schema, the description does not need to explain every filter or return field. It covers the core access patterns, the mandatory-selector constraint, and the optional graph expansion feature. The schema and output schema handle the remaining details, so the description is sufficiently complete for an agent to understand the tool's main behavior.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the baseline is 3. The description adds value by stating the cross-parameter exclusivity rule (exactly one of query, memory_id, or entity) and that expand_links>0 includes graph neighbors. These constraints are not uniformly obvious from individual parameter descriptions, so this is a meaningful enhancement over the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description starts with the specific verb 'Retrieve memories' and enumerates three distinct retrieval modes (hybrid/keyword/semantic search via query, exact fetch via memory_id, entity lookup via entity). This clearly differentiates the tool from its write/manage/admin siblings (store_memory, update_memory, manage_session, memory_admin).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives a clear within-tool usage rule ('Exactly one selector — query, memory_id, or entity — must be provided') and explains when expand_links is useful. However, it does not explicitly state when to choose this tool over alternatives, such as 'use this for reading existing memories' vs. 'use store_memory to create new ones'. The guidance is implied by context rather than stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
store_memoryB
Store a new memory with optional agent/session scoping, semantic embedding, and graph links.
| Name | Required | Description | Default |
|---|---|---|---|
| links | No | Graph links to create from this new memory to existing memories. | |
| content | Yes | Memory content text to store | |
| agent_id | No | Agent identifier (e.g. 'principal_investigator'). None = shared memory. | |
| metadata | No | JSON string of additional metadata (task_id, experiment_id, etc.) | |
| importance | No | Salience score 0.0-1.0 for pruning priority. Default 0.5. | |
| session_id | No | Session identifier for grouping memories. None = unscoped. | |
| memory_type | Yes | Type: 'episodic' (events/logs), 'semantic' (facts/knowledge), 'procedural' (how-to/workflows) |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions optional scoping, embedding, and links, but does not disclose operational traits such as idempotency, permissions required, side effects of invalid inputs (e.g., non-existent link targets), or any constraints on memory creation. For a tool with 7 parameters, this is insufficient.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence of 14 words, stating the core action and key optional features. It is front-loaded with the verb and resource, containing no filler or redundant information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has 7 parameters, 2 required, an output schema, and no annotations, the description covers the high-level purpose but omits details about behavior (e.g., whether it returns the created memory), error conditions, or constraints on required parameters. The output schema may fill some gaps, but for a creation tool, more context would improve agent confidence.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description adds context by naming 'agent/session scoping' (mapping to agent_id/session_id), 'graph links' (mapping to links), and 'semantic embedding' (implied by memory_type). While helpful, it does not provide additional semantic depth beyond what the schema already documents.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Store a new memory') and identifies the resource as a memory. It distinguishes this tool from siblings like recall_memories (retrieval), update_memory (modification), manage_session (session management), and memory_admin (admin tasks) by positioning it as the creation action.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no explicit guidance on when to use this tool versus alternatives. It does not mention prerequisites, when not to use it, or direct users to other tools for related tasks. The sibling tool names provide implicit context, but the description itself lacks any usage direction.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
update_memoryB
Update a memory with optimistic locking for concurrent agent safety.
| Name | Required | Description | Default |
|---|---|---|---|
| content | No | New content. None = keep existing. | |
| metadata | No | New metadata as JSON string. None = keep existing. | |
| memory_id | Yes | UUID of the memory to update | |
| importance | No | New importance score. None = keep existing. | |
| updated_by | No | Agent making this update. | |
| expected_version | No | Expected version for optimistic locking. None = skip check. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It introduces 'optimistic locking' as a key behavior, which is useful for agent reasoning. However, it does not explain what happens on version conflict, whether the operation is idempotent, or any authentication/authorization requirements. The description adds some value beyond the schema but is not comprehensive.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence that is front-loaded with the core action. It contains no filler words and is easy to parse. However, it could be slightly more structured (e.g., listing key aspects) without losing conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (6 parameters, optimistic locking, an output schema), the description is too brief. It fails to explain the locking mechanism, what happens on conflict, how to use the output schema, or any other contextual details. The description leaves significant gaps that the agent must infer from parameter names alone.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description does not add any additional meaning to the parameters beyond what is already documented in the schema. The term 'optimistic locking' relates to the 'expected_version' parameter, but this connection is not elaborated. Therefore, no extra semantic value is provided.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly indicates the verb 'Update' and the resource 'memory'. It adds a specific behavioral qualifier ('optimistic locking for concurrent agent safety') that distinguishes it from basic update operations. However, it does not explicitly differentiate from the sibling tool 'store_memory' (which likely creates a new memory), leaving some ambiguity about when to use each.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives such as 'store_memory', 'recall_memories', or 'memory_admin'. It does not mention prerequisites, limitations, or conflict scenarios. The optimistic locking mention implies usage in concurrent environments, but without explicit directives, the agent must infer appropriateness.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
5 tool updates
v0.1.0- First observed
manage_session - First observed
memory_admin - First observed
recall_memories - First observed
store_memory - First observed
update_memory
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.
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Cloud-hosted MCP server for durable AI memory
Persistent memory for AI agents — log and recall conversation context over MCP.
Persistent memory for AI agents across Claude, ChatGPT and any MCP client.
An MCP memory server. One memory your agents share — across models, devices and apps.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceA local-first MCP memory server providing persistent, searchable memory for AI agents, powered by SQLite.11Apache 2.0
- AlicenseNot gradedqualityCmaintenanceAn 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.24MIT