Memento
Memento provides persistent memory capabilities through a SQLite/PostgreSQL-based knowledge graph with semantic search using BGE-M3 embeddings for intelligent context retrieval across conversations.
Core Operations:
Entity Management: Create, read, and delete entities with types, importance levels (critical/important/normal/temporary/deprecated), and tags for categorization
Observations: Add and delete text observations attached to entities, automatically indexed for full-text and semantic search
Relationships: Create and delete directed relations between entities with typed connections
Search and Retrieval:
Hybrid Search: Query using keyword matching, semantic similarity, or combined approaches with configurable distance thresholds and result limits
Graph Navigation: Retrieve entire knowledge graphs or expand specific entities to view all observations and relations
Enhanced Relevance: Scoring system incorporating temporal, popularity, contextual, and importance factors
Key Features:
Offline Operation: Fully offline quantized BGE-M3 model (1024-dimensional embeddings) without external API calls
Multiple Backends: Support for SQLite (FTS5) and PostgreSQL with vector extension capabilities
Cascading Deletion: Remove entities with automatic cleanup of linked observations and relations
MCP Integration: Designed for seamless integration with Claude Desktop via MCP protocol
Leverages Node.js for running the embedding model offline via @xenova/transformers, enabling semantic search capabilities without requiring an internet connection.
Provides a persistent memory storage backend using SQLite with FTS5 for fast keyword search and sqlite-vec for semantic vector search, supporting a structured graph of entities, observations, and relations.
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., "@Memento search for project meeting notes from last week"
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.
Memento
Some memories are best persisted.
Provides persistent memory capabilities through a SQLite-based knowledge graph that stores entities, observations, and relationships with semantic search using BGE-M3 embeddings for intelligent context retrieval across conversations.
Features
Semantic vector search (sqlite-vec/pgvector, 1024d)
Offline embedding model (
bge-m3)Modular repository layer with SQLite and PostgreSQL backends
Enhanced Relevance Scoring with temporal, popularity, contextual, and importance factors
Structured graph of
entities,observations, andrelationsEasy integration with Claude Desktop (via MCP)
Related MCP server: Engram
Prerequisites
System SQLite Version Check
Memento requires SQLite 3.38+. Most macOS and Linux distros ship sqlite3 out of the box, but double-check that it's there and new enough:
sqlite3 --version # should print a version string, e.g. 3.46.0Important Note: This check is just to verify SQLite is installed on your system. Memento does NOT use the sqlite3 CLI for its operation it uses the Node.js sqlite3 module internally.
If you see "command not found" (or your version is older than 3.38), install SQLite:
Platform | Install command |
macOS (Homebrew) |
|
Debian / Ubuntu |
|
Configuration
Memento now supports pluggable storage backends. Configuration is controlled entirely through environment variables so it remains easy to embed inside MCP workflows.
Variable | Description |
| Optional selector for the database backend. Defaults to |
| Filesystem path for the SQLite database file (only used when the driver is |
| Optional absolute path to a pre-built |
| PostgreSQL connection string consumed by the |
| Individual PostgreSQL connection parameters. Used when no DSN is provided. |
| When set to |
| Optional path to a JSON Lines file. When set, Memento appends one event after each successful graph mutation. |
Write hook events
Set MEMENTO_WRITE_HOOK_PATH when another process needs to react to memory writes without polling the full graph:
MEMENTO_WRITE_HOOK_PATH=/tmp/memento-events.jsonl mementoEach line is a JSON object with an ISO timestamp, an operation, and the changed entity/relation payload. Example:
{"timestamp":"2026-05-05T16:33:16.619Z","operation":"create_entity","entity":{"name":"Hook Test","entityType":"test"}}Supported operations are create_entity, add_observations, create_relation, delete_entities, delete_relations, delete_observations, and set_importance. Delete events are emitted only for records that were actually removed.
Hook write failures are logged to stderr but do not fail the graph mutation that already succeeded. Consumers that require strict reconciliation should combine the hook with occasional read_graph or targeted open_nodes checks.
PostgreSQL notes
The PostgreSQL manager requires the
pgvectorextension. It is automatically initialized withCREATE EXTENSION IF NOT EXISTS vector.
Claude Desktop:
{
"mcpServers": {
"memory": {
"description": "Custom memory backed by SQLite + vec + FTS5",
"command": "npx",
"args": [
"@iachilles/memento@latest"
],
"env": {
"MEMORY_DB_PATH": "/Path/To/Your/memory.db"
},
"options": {
"autoStart": true,
"restartOnCrash": true
}
}
}
}Troubleshooting
sqlite-vec Extension Issues
Important: Memento loads the sqlite-vec extension programmatically through Node.js, NOT through the sqlite3 CLI.
Common misconceptions:
❌ Creating shell aliases for sqlite3 CLI won't affect Memento
❌ Loading extensions in sqlite3 CLI won't help Memento
✅ Use the npm-installed sqlite-vec or set
SQLITE_VEC_PATHenvironment variable if automatic detection fails. This should point to the Node.js-compatible version of the extension, typically found in yournode_modulesdirectory.
If automatic vec loading fails:
# Find the Node.js-compatible vec extension
find node_modules -name "vec0.dylib" # macOS
find node_modules -name "vec0.so" # Linux
# Use it via environment variable
SQLITE_VEC_PATH="/full/path/to/node_modules/sqlite-vec-darwin-x64/vec0.dylib" mementoAPI Overview
This server exposes the following MCP tools:
create_entitiescreate_relationsadd_observationsdelete_entitiesdelete_relationsdelete_observationsread_graphsearch_nodesopen_nodesset_importance- Set importance level (critical/important/normal/temporary/deprecated)
When MEMENTO_WRITE_HOOK_PATH is configured, mutating tools also append JSONL write events for downstream consumers.
An example of an instruction set that an LLM should know for effective memory handling (see MEMORY_PROTOCOL.md)
Embedding Model
This project uses @xenova/transformers, with a quantized version of bge-m3, running fully offline in Node.js.
License
MIT
Available Tools
10 toolsadd_observationsB
Add text observations to existing entities and index them for full-text and semantic search.
Inputs: observations (required).
create_entitiesA
Create entities in the knowledge graph. Inserts each entity if not exists and optionally seeds it with observations.
Inputs: entities (required).
create_relationsB
Create directed relations between entities. Skips existing relations.
Inputs: relations (required).
delete_entitiesB
Delete entities (and cascaded observations/relations) by their names.
Inputs: entityNames (required).
delete_observationsB
Remove specific observations from entities by matching text.
Inputs: deletions (required).
delete_relationsA
Remove specified relations between entities without deleting the entities themselves.
Inputs: relations (required).
open_nodesA
Expand specified entities: return their full details including observations and relations.
Inputs: names (required).
read_graphA
Retrieve the entire knowledge graph: all entities with their observations and relations.
Inputs: no named parameters.
search_nodesC
Search for entities and relations by semantic similarity.
Inputs: query (required), topK, threshold.
set_importanceB
Set the importance level for an entity (critical, important, normal, temporary, deprecated).
Inputs: entityName (required), importance (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Each tool targets a distinct operation: create entities, relations, and observations; read via open_nodes, read_graph, and search_nodes; update via add_observations and set_importance; delete for entities, observations, and relations. No overlap exists.
All tool names follow a consistent verb_noun pattern in snake_case (e.g., create_entities, delete_observations, search_nodes). No deviations or mixed styles.
10 tools is well-scoped for a knowledge graph management server, covering all essential operations without redundancy. The number is within the ideal range (3-15).
The toolset covers CRUD for entities, observations, and relations, plus search and importance setting. Minor gaps exist: no update for entity properties (beyond importance) and no update for relations, but core workflows are complete.
Maintenance
Related MCP Connectors
An MCP memory server. One memory your agents share — across models, devices and apps.
Persistent personal memory for AI assistants — save, search, and recall across every MCP client.
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
Hosted agent memory: store, search, and recall facts across sessions from any MCP client.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceA local-first MCP memory server providing persistent, searchable memory for AI agents, powered by SQLite.1Functional Source , Version 1.1, ALv2 Future
- AlicenseNot gradedqualityDmaintenanceA local-first memory MCP server that enables storing, searching, and managing personal memories with hybrid keyword and semantic recall, all on-device.MIT
- AlicenseNot gradedqualityBmaintenanceA local memory server for AI agents that stores and retrieves information via MCP, keeping all data in SQLite on your machine.188 PyPI1Apache 2.0
- FlicenseNot gradedqualityDmaintenanceAn MCP server for managing persistent AI memory using hybrid search (keyword + semantic vector) with SQLite storage and offline-first local embeddings.-