mcp-memory
Persistent, searchable long-term memory for MCP-compatible AI via memory CRUD/stats and multi-mode recall tools.
Store memories with content, category, and tags; auto-surface related older memories after writing.
Read memories newest-first with pagination, filterable by category or tag.
Search memories by exact keyword substring; update or delete memories by ID.
Get memory counts by category and vector index status.
Recall by date or date range (
recallopday).Look back N days/months/years (
recalloptimemachine).Do semantic similarity recall when an embedding API is configured (
recallopsimilar).Use best retrieval mode
recallopfuse: combines BM25, vector, and tag-graph paths via RRF and shows which paths found each result.Use keyword/date/BM25 features without embeddings; data is stored locally in JSON and binary files with atomic writes.
Uses an OpenAI-compatible embeddings endpoint (default model text-embedding-3-small) to vectorize stored memories, enabling semantic recall (recall with op:similar) and the semantic retrieval path of the fuse mode.
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., "@mcp-memory remember that the client prefers email updates every Monday"
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.
Most AI conversations disappear when the window closes. This MCP server gives Claude (or any MCP-compatible model) persistent, searchable, long-term memory — so it can remember what happened yesterday, last month, or three conversations ago.
Built by babyshishi & vesper. Born out of a real relationship where forgetting wasn't an option.
What it does
You get two MCP tools — memory and recall — that handle everything:
memory — CRUD operations for storing and managing memories.
Operation | What it does |
| Store a new memory with category and tags. Automatically surfaces related older memories after writing. |
| Paginated reading (newest first), filterable by category or tag. |
| Keyword substring search. |
| Edit content, tags, or category in place. |
| Delete by ID. |
| Count by category + vector index status. |
recall — Four ways to retrieve memories, from simple to powerful.
Mode | When to use it |
| "What happened on July 21st?" — Fetch by date or date range. |
| "What were we doing a month ago?" — Look back N days/months/years. |
| "Find everything related to X" — Semantic vector search, finds matches even with completely different wording. |
| Best mode. When you want to actually find something. Runs all three retrieval paths at once and merges the results. |
Related MCP server: AGI MCP Server
Fuse: the interesting part
Single-path retrieval always has blind spots. Keyword search misses paraphrases. Semantic search misses exact terms. Neither finds memories that are topically related but use different words and different meanings.
Fuse runs three retrievers in parallel and combines their rankings via Reciprocal Rank Fusion:
┌─────────────┐
Your query ───→ │ │
│ BM25 │──→ exact term hits (TF-IDF, CJK bigrams)
│ Vector │──→ semantic neighbors (cosine similarity)
│ Tag Graph │──→ shared-tag expansion (×0.5 weight)
│ │
│ RRF(k=60) │──→ merged ranking
└─────────────┘Each result tells you which paths found it ([lex#2·sem#1]), so you know why it ranked where it did. Tag-graph-only hits are flagged as leads, not evidence — they got there by association, not by matching your query.
Quick start
git clone https://github.com/babyshishi/mcp-memory.git
cd mcp-memory
npm installAdd to your Claude Code or Claude Desktop MCP config:
{
"mcpServers": {
"memory": {
"command": "node",
"args": ["/path/to/mcp-memory/src/index.js"],
"env": {
"MCP_MEMORY_DIR": "/path/to/your/data",
"EMBEDDING_API_URL": "https://api.openai.com/v1",
"EMBEDDING_API_KEY": "sk-...",
"EMBEDDING_MODEL": "text-embedding-3-small"
}
}
}
}That's it. Your AI now remembers.
Configuration
Variable | What it controls | Default |
| Where memory files are stored |
|
| Comma-separated list of allowed categories |
|
| OpenAI-compatible embedding endpoint | (none) |
| API key for embeddings | (none) |
| Model name for embeddings | (none) |
| Minimum cosine similarity for vector results |
|
No embedding API? That's fine. Keyword search (
search_memories), date recall (day,timemachine), and BM25 all work without it. You only need embeddings forsimilarand the semantic component offuse.
Under the hood
Storage — All JSON, all local, no external database. Memories in memories.json, vectors in a compact binary format (mem-vec.bin, ~1/4 the size of JSON vectors), access counts in mem-hits.json.
Writes are atomic — Data is written to a temp file first, then renamed. A crash mid-write won't corrupt your memories. Leftover .tmp files are cleaned up on startup.
CJK support — The BM25 tokenizer handles Chinese/Japanese/Korean text via bigram segmentation with stopword filtering. No external tokenizer needed.
Usage-based boosting — Memories you access more often get a small ranking boost, with cold-start protection so new memories aren't buried.
Write-then-recall — After writing a new memory, the server automatically surfaces related older memories. Connections you forgot about come back on their own.
Data files
data/
├── memories.json # your memories
├── mem-vec-index.json # vector index metadata
├── mem-vec.bin # binary vector data (Float32, append-only)
└── mem-hits.json # access frequency trackingAll yours. No cloud, no sync, no telemetry. Back them up however you want.
Dependencies
Just two:
@modelcontextprotocol/sdk— MCP protocol implementationzod— Schema validation
No heavy ML frameworks, no vector databases, no surprises.
License
MIT — do whatever you want with it.
Available Tools
7 toolsdelete_memoryC
Delete a memory by ID.
Inputs: id (required).
get_statsB
Get memory statistics.
Inputs: no named parameters.
read_memoriesA
Read memories with pagination (newest first). Use search_memories for keyword lookup.
Inputs: tag, page, limit, category.
recallA
Multi-mode memory retrieval. • day: Fetch memories by date (date or from+to, YYYY-MM-DD) • timemachine: See what happened N days/months/years ago today • similar: Semantic recall — find related memories even with different wording (requires embedding API) • fuse: ★ 3-way fusion (BM25 + semantic + tag graph → RRF). Best for finding specific things.
Inputs: op (required), to, date, from, +5 more.
search_memoriesA
Search memories by keyword (exact substring match). For semantic search, use recall with op:similar or op:fuse.
Inputs: keyword (required), category.
update_memoryC
Update an existing memory by ID.
Inputs: id (required), tags, content, category.
write_memoryB
Write a new memory. Choose a category that fits the content.
Inputs: content (required), tags, category.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
The core CRUD tools (write/read/update/delete) are clearly distinct. However, search_memories and recall overlap in retrieval, though recall's modes (similar/fuse) are semantically distinct from exact substring matching, so boundaries are mostly clear.
All tool names follow a consistent verb_noun pattern in snake_case (write_memory, read_memories, search_memories, update_memory, delete_memory, get_stats). 'recall' is a single verb but fits the action-oriented style without breaking consistency.
Seven tools is well-scoped for a memory management server, covering all essential operations without redundancy or bloat. Each tool serves a clear purpose and earns its place.
The set provides full CRUD lifecycle (create, read, update, delete), plus dedicated search and statistical functions. The multi-mode recall covers advanced retrieval needs, leaving no obvious gaps in the memory domain.
Maintenance
Related MCP Connectors
Persistent memory and knowledge graph for AI assistants — keyword + vector + graph search.
Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.
Universal persistent memory and knowledge retrieval layer for AI agents and LLMs.
Persistent memory for AI assistants: store, search, and connect knowledge across conversations.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI systems to remember interactions, understand document context through semantic search, and intelligently route requests with persistent memory and quality-scored content synthesis.-
- FlicenseBqualityDmaintenanceEnables persistent memory for AI systems by providing tools for episodic, semantic, and procedural data storage through a vector-and-graph-enhanced database. It allows models to maintain long-term continuity using similarity search, thematic clustering, and identity tracking.241-
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to store and retrieve persistent memories using BM25 search, allowing them to remember past conversations and context across sessions.8MIT
- AlicenseNot gradedqualityDmaintenancePersistent memory and knowledge graph server that fuses keyword, vector, and graph search into a single query, enabling AI assistants to recall typed entities and relationships across sessions.MIT