AI Long-Term Memory MCP Server
Uses SQLite as the underlying database for storing memories, embeddings, and decay information, providing a simple single-file storage solution for memory management.
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., "@AI Long-Term Memory MCP Serversearch for memories about user preferences for coffee shops"
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.
MAPLE: Memory-Augmented Persistent Learning Engine
A Model Context Protocol (MCP) server that provides persistent long-term memory for AI agents. Built on a 3-agent architecture with multi-channel retrieval, automatic memory extraction, and activation-based decay. Designed for real-world daily use with Claude Code.
In active production use — 60+ memories across 30+ sessions, iterating based on real-world usage patterns.
Features
3-Layer Memory Architecture: Facts → Experiences → Decision Chains, with distinct decay and retrieval policies per layer
Multi-Channel Hybrid Search: BM25 keyword matching + vector semantic similarity + entity extraction + mood detection, with configurable channel weights
Surprise-Based Scoring: Information-gain metric that automatically prioritizes novel, high-value content for storage
Activation-Based Decay: Memories that get recalled stay alive; unused ones fade — inspired by human memory consolidation research
Emotion-Aware Storage: Valence, intensity, and mood tags enable "flashbulb memory" effects for emotionally significant events
Auto-Extract Pipeline: Hooks into conversation flow to automatically extract and store new memories without explicit commands
Auto-Surface: Context-aware passive recall — relevant memories are injected into conversations automatically
Intelligent Deduplication: Embedding-based similarity detection (>80% threshold) with automatic merging
MCP Protocol Native: Full integration with Claude Code and any MCP-compatible client
Chunked Memory Support: Long memories are automatically chunked with parent-child relationships for granular retrieval
Related MCP server: Recall
Architecture
3-Agent Design (MAPLE v2)
┌──────────────────────────────────────────────────────────┐
│ Claude Code / MCP Client │
├──────────────────────────────────────────────────────────┤
│ MCP Protocol │
├──────────────────────────────────────────────────────────┤
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ Retrieval │ │ Extraction │ │ Maintenance │ │
│ │ Agent │ │ Agent │ │ Agent │ │
│ │ │ │ │ │ │ │
│ │ • BM25 │ │ • Auto- │ │ • Decay │ │
│ │ • Semantic │ │ extract │ │ • Dedup │ │
│ │ • Entity │ │ • Auto-learn │ │ • Consolidate│ │
│ │ • Mood │ │ • Surprise │ │ • Expire │ │
│ │ • Surface │ │ scoring │ │ • Rewrite │ │
│ └──────┬───────┘ └──────┬───────┘ └──────┬───────┘ │
│ │ │ │ │
│ ┌──────▼─────────────────▼─────────────────▼────────┐ │
│ │ SQLite + Embeddings │ │
│ │ memories · chunks · FTS5 · cosine similarity │ │
│ └───────────────────────────────────────────────────┘ │
├──────────────────────────────────────────────────────────┤
│ Auto-Surface Hook (UserPromptSubmit) │
│ Auto-Extract Hook (conversation flow → memory) │
└──────────────────────────────────────────────────────────┘The three agents operate independently:
Retrieval Agent: Multi-channel search with weighted scoring (BM25 30% + Semantic 30% + Entity 20% + Mood 20%)
Extraction Agent: Monitors conversations and automatically identifies memory-worthy content using surprise scoring
Maintenance Agent: Background processes for decay, deduplication, consolidation, and expiration
Memory Schema
Field | Type | Description |
| text | Short title |
| text | Full content |
| text | One-line summary |
| text | Medium compression |
| int | 1=fact, 2=experience, 3=decision chain |
| int | 1-5 scale |
| real | 0-10, high = flashbulb memory |
| real | -1 to 1, negative to positive |
| text | Mood description |
| text | Comma-separated tags |
| text | note/diary/feedback/project/user |
| text | JSON array, generated on write |
| int | Times recalled |
| text | Last recall timestamp |
| text | active/decayed/expired |
MCP Tools
Tool | Description |
| Create or update a memory with auto-embedding and dedup |
| Read a specific memory by ID |
| Semantic search using embedding similarity |
| Surface top memories by importance and relevance |
| Update existing memory fields |
| Soft-delete a memory |
| Run decay cycle — deactivate unused memories |
| Permanently remove decayed memories |
| Get memory system statistics |
Decay Mechanism
Memories decay based on last_activated, not created_at. A memory that keeps getting recalled stays active indefinitely. Decay thresholds:
Low importance (1-2) + not activated in 7 days → decay
Medium importance (3) + not activated in 14 days → decay
High importance (4-5) + not activated in 30 days → decay
Pinned memories never decay
Inspired by research on human memory consolidation — informed by 8 papers (see design doc).
Auto-Surface Hook
auto_surface.cjs runs as a Claude Code UserPromptSubmit hook. On each user message, it:
Extracts keywords from the message
Searches the memory database for matches
Injects relevant memories into the conversation context
This enables passive recall without explicit search commands.
Setup
npm installAdd to Claude Code MCP config:
{
"mcpServers": {
"memory": {
"command": "node",
"args": ["path/to/memory-mcp/index.js"]
}
}
}Design Decisions
SQLite over vector DB: Simpler deployment, single file, good enough for <10K memories
Activation-based decay over time-based: Mimics human memory — used memories strengthen, unused ones fade
Embedding dedup: Prevents memory bloat from repeated similar events
Layered architecture: Separates facts (stable) from experiences (contextual) from decisions (actionable)
Research References
Built on research from 8 papers:
Generative Agents (Stanford, 2023): Memory stream, reflection, planning/react
MemGPT (2023): Tiered memory with OS-inspired page management
LUFY (2024): Forgetting mechanism with emotion arousal weighting
MemoRAG (2024): Memory-inspired retrieval with dual scoring
Mem0 (2024): Graph-based memory with auto-extraction and dedup
A-Mem (2024): Self-organizing agentic memory networks
LoCoMo (2024): Long-context conversation memory benchmark
Chloe/Noah (Community): Four-dimensional companion AI memory
See docs/design.md for detailed analysis of each paper's influence.
Key Technical Highlights
Zero-config passive recall: Memories surface automatically via hooks — no explicit search commands needed in conversation
Bilingual support: Chinese/English tokenization via jieba + transformer embeddings, supporting mixed-language memory retrieval
Production-tested: Daily use across 30+ sessions with real conversation data
Single-file deployment: SQLite-based, no external database required
Extensible: MCP protocol means any compatible AI client can use this memory system
Status
In active daily use. Iterating based on real-world usage patterns. v3 with enhanced multi-agent coordination in progress.
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityDmaintenanceProvides AI agents with persistent, searchable memory that survives across conversations using semantic search, temporal versioning, and smart organization. Enables long-term context retention and cross-session continuity for AI assistants.Last updated14
- FlicenseAquality-maintenanceProvides long-term memory storage for AI assistants with semantic search, enabling persistent storage of preferences, decisions, and context with relationship tracking between memories.Last updated19
- Alicense-qualityFmaintenanceProvides persistent, semantic memory storage for LLMs across sessions using vector embeddings and FAISS search. Features bio-inspired memory consolidation, intelligent forgetting, and semantic retrieval without API costs.Last updatedMIT

Memsolus MCP Serverofficial
AlicenseAqualityDmaintenanceProvides persistent long-term memory for AI agents through semantic search and automated knowledge graph extraction. It enables agents to store, recall, and reason over facts, preferences, and relationships across multiple conversations and sessions.Last updated1411MIT
Related MCP Connectors
Persistent memory for AI agents. Search, store, and recall across sessions.
Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.
Persistent memory and knowledge graphs for AI agents. Hybrid search, context checkpoints, and more.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/hpy6370-sys/memory-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server