memory-mcp-server
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., "@memory-mcp-server remember that we chose SQLite for local storage"
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.
memory-mcp-server
A Model Context Protocol (MCP) server that provides persistent memory for AI assistants. Stores, searches, and associates conversation logs using hybrid search (FTS5 full-text + vector similarity) with A-MEM style note structuring.
Features
Hybrid Search -- FTS5 full-text search + vector similarity with RRF (Reciprocal Rank Fusion)
A-MEM Note Structuring -- Automatic summary, keywords, tags, and context extraction via LLM
Associative Search -- Serendipity-driven discovery through TF-IDF random walk and link exploration
Multi-backend Storage -- SQLite (local), Turso (cloud), or Hybrid (local + cloud sync)
MEMORY.md / CLAUDE.md Integration -- Auto-generated memory index and project context import
Data Export/Import -- JSONL format for backup and migration
Structured Logging -- Configurable log levels, output to stderr (MCP-safe)
Embedding Queue -- Batched, async embedding generation for performance
Related MCP server: MCP Memory Server
Installation
npm install memory-mcp-serverOr run directly:
npx memory-mcp-serverQuick Start
Claude Desktop Configuration
Add to your claude_desktop_config.json:
{
"mcpServers": {
"memory": {
"command": "npx",
"args": ["-y", "memory-mcp-server"],
"env": {
"MEMORY_DB_PATH": "/path/to/memory.db",
"OPENAI_API_KEY": "sk-..."
}
}
}
}Environment Variables
Variable | Description | Default |
| Path to SQLite database file |
|
| Tenant ID for multi-tenant isolation |
|
| Storage backend: |
|
| OpenAI API key for embeddings + LLM structuring | (optional) |
| Path for auto-generated MEMORY.md | (optional) |
| Path to CLAUDE.md project context | (optional) |
| Turso database URL (for turso/hybrid mode) | (optional) |
| Turso auth token (for turso/hybrid mode) | (optional) |
| Hybrid sync interval in ms |
|
| Sync to cloud on every write |
|
| Log level: |
|
| Log format: |
|
MCP Tools
memory_save
Save a conversation message as a memory note. Automatically generates summary, keywords, tags, embeddings, and links when OpenAI API key is configured.
Parameters:
content (string, required) -- The content to save
role (enum, required) -- user | assistant | system | summary
session_id (string, optional) -- Session ID
project (string, optional) -- Project name
keywords (string[], optional) -- Keywords (auto-generated if omitted)
tags (string[], optional) -- Tags (auto-generated if omitted)memory_search
Search memories using hybrid search (FTS5 + vector similarity with RRF fusion).
Parameters:
query (string, required) -- Search query (keywords or natural language)
date_from (string, optional) -- Filter: earliest date (ISO 8601)
date_to (string, optional) -- Filter: latest date (ISO 8601)
project (string, optional) -- Filter: project name
tags (string[], optional) -- Filter: tags
session_id (string, optional) -- Filter: session ID
limit (number, optional) -- Max results (default: 10)memory_associate
Discover related memories through associative (serendipity) search.
Parameters:
seed (string, optional) -- Seed text (random if omitted)
temperature (number, optional) -- 0.0=focused, 1.0=exploratory (default: 0.5)
limit (number, optional) -- Max results (default: 5)memory_stats
Get statistics about stored memories: total notes, sessions, links, date range, and top keywords.
memory_summarize
Summarize memories for a given period or project using LLM.
Parameters:
project (string, optional) -- Filter by project
date_from (string, optional) -- Start date (ISO 8601)
date_to (string, optional) -- End date (ISO 8601)memory_update_index
Update the MEMORY.md index file and optionally import CLAUDE.md content.
memory_export
Export memory data as JSON Lines (JSONL) format for backup or migration.
Parameters:
date_from (string, optional) -- Export from date
date_to (string, optional) -- Export until date
include_links (boolean, optional) -- Include note links (default: true)
include_sessions (boolean, optional) -- Include sessions (default: true)memory_import
Import memory data from JSONL format (from a previous export).
Parameters:
data (string, required) -- JSONL content to import
merge_strategy (enum, optional) -- skip (default) or overwritememory_migrate
Migrate data between storage backends (e.g., SQLite to Turso).
memory_sync_status
(Hybrid mode only) Get sync status of the hybrid adapter.
Architecture
MCP Client (Claude Desktop, etc.)
|
stdio transport
|
+-------------------+
| MCP Server |
| (10 tools) |
+-------------------+
|
+-------------------+-------------------+
| | |
NoteBuilder SearchEngine AssociateEngine
(LLM + Embed) (FTS + Vec) (Random Walk)
| | |
+-------------------+-------------------+
|
+-------------------+
| StorageAdapter |
| (interface) |
+---+-------+---+---+
| | |
SQLite Turso Hybrid
(local) (cloud) (sync)Key Components
NoteBuilder -- A-MEM style note structuring with LLM (summary, keywords, tags, context) and embedding generation
SearchEngine -- Hybrid search combining FTS5 BM25 scoring with vector cosine similarity via RRF
AssociateEngine -- Serendipity search using TF-IDF random walk, link exploration, and vector space exploration with MMR diversity
EmbeddingQueue -- Batched async embedding generation with configurable batch size and flush delay
ImportanceScorer -- Multi-signal importance scoring (content, links, freshness, role)
DataTransfer -- JSONL-based export/import for backup and migration
MemoryIndex -- Auto-generates MEMORY.md with recent memories, frequent topics, and user preferences
ClaudeContext -- Imports CLAUDE.md sections as searchable system notes
SessionManager -- Session lifecycle with timeout-based auto-end and MEMORY.md update triggers
Logger -- Structured logging to stderr with configurable levels (debug/info/warn/error)
Storage Backends
Backend | Use Case | Vector Search | FTS5 |
SQLite | Local development, single machine | Yes (sqlite-vec) | Yes |
Turso | Cloud deployment, multi-device | No | LIKE fallback |
Hybrid | Best of both -- local speed + cloud sync | Yes (via local) | Yes (via local) |
Graceful Degradation
The server works without an OpenAI API key:
Without API key: FTS-only search, no auto-structuring, no embeddings
With API key: Full hybrid search, LLM structuring, vector embeddings, auto-linking
Development
# Install dependencies
npm install
# Run in development mode
npm run dev
# Run tests
npm test
# Type check
npm run typecheck
# Build
npm run buildLicense
MIT
Available Tools
9 toolsmemory_associateA
Discover related memories through associative search (serendipity search). Uses TF-IDF random walk, note link exploration, and vector space exploration to find surprising connections.
Inputs: seed, limit, temperature.
memory_exportB
Export memory data as JSON Lines (JSONL) format. Includes notes, links, and sessions for backup or migration.
Inputs: date_to, date_from, include_links, include_sessions.
memory_importB
Import memory data from JSON Lines (JSONL) format. Restores notes, links, and sessions from a previous export.
Inputs: data (required), merge_strategy.
memory_migrateB
Migrate memory data from one storage backend to another (e.g., SQLite to Turso). Creates the target adapter, copies all tenants, sessions, notes, and links.
Inputs: target_type (required), target_db_path, target_turso_url, target_turso_token.
memory_saveB
Save a conversation message as a memory note. Automatically generates summary, keywords, tags, embeddings, and links using LLM and embedding models when available.
Inputs: role (required), content (required), tags, project, +2 more.
memory_searchB
Search past memories using hybrid search (FTS5 full-text + vector similarity with RRF fusion). Returns relevant conversation logs and notes matching the query.
Inputs: query (required), tags, limit, date_to, +3 more.
memory_statsA
Get statistics about stored memories: total notes, sessions, links, date range, etc.
Inputs: no named parameters.
memory_summarizeA
Summarize memories for a given period or project. Uses LLM to create a coherent summary from stored notes.
Inputs: date_to, project, date_from.
memory_update_indexB
Update the MEMORY.md index file with latest memory data. Also optionally imports CLAUDE.md content as searchable context.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool has a distinct role: search (query-based retrieval), associate (serendipity/link exploration), and summarize (LLM aggregation) are separated by their retrieval strategy, and the storage tools (save, migrate, export, import, update_index) target clearly different operations. The only mild overlaps are search vs. associate (both surface related memories) and update_index's optional CLAUDE.md import vs. memory_import, but descriptions make the boundaries readable.
Every tool follows the same memory_<verb> pattern (memory_search, memory_save, memory_export, memory_import), with only memory_stats deviating to a noun, which is conventional and still predictable. No style mixing (no camelCase or stray prefixes).
Nine tools sit comfortably in the well-scoped 3-15 range, and each covers a genuinely distinct lifecycle concern (retrieval, persistence, maintenance, portability). Nothing appears redundant or padded.
The surface covers retrieval, creation, aggregation, maintenance, and full backup/restore (export/import/migrate), so major workflows are unblocked. However, there is no explicit delete/forget operation, no get-by-id for a single note, and no direct note edit, which are notable gaps for a persistent memory store where forgetting or correcting a memory matters.
Maintenance
Related MCP Connectors
Persistent memory for AI assistants: store, search, and connect knowledge across conversations.
Persistent personal memory for AI assistants: search what you told it before and save new facts.
Persistent memory for AI agents. Search, store, and recall across sessions.
Persistent memory and knowledge graph for AI assistants — keyword + vector + graph search.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to store and retrieve memories with semantic search capabilities using vector embeddings. Provides persistent memory storage with SQLite backend for context retention across conversations.1MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to store and retrieve long-term memories with semantic search, supporting various memory types and tags via PostgreSQL and pgvector.-
- AlicenseAqualityCmaintenanceProvides persistent, searchable memory for AI agents, enabling them to retain, recall, and reflect on information across conversations.191MIT

Engramofficial
FlicenseNot gradedqualityBmaintenancePersistent memory for AI agents. Stores verbatim conversation transcripts and makes them searchable by meaning via semantic embeddings.24-