loading…
Search for a command to run...
loading…
Provides persistent long-term memory for AI agents with semantic search and activation-based decay. Enables AI systems to remember across sessions through layer
Provides persistent long-term memory for AI agents with semantic search and activation-based decay. Enables AI systems to remember across sessions through layered memory architecture and automatic context-aware retrieval.
A Model Context Protocol (MCP) server that provides persistent long-term memory for AI agents. Designed for real-world use with Claude Code, enabling AI systems to remember across sessions.
┌─────────────────────────────────────────┐
│ Claude Code │
│ (or any MCP client) │
├─────────────────────────────────────────┤
│ MCP Protocol │
├─────────────────────────────────────────┤
│ Memory MCP Server │
│ ┌───────────┐ ┌──────────────────┐ │
│ │ Write / │ │ Surface / │ │
│ │ Update / │ │ Search / │ │
│ │ Delete │ │ Read │ │
│ └─────┬─────┘ └────────┬─────────┘ │
│ │ │ │
│ ┌─────▼─────────────────▼─────────┐ │
│ │ SQLite Database │ │
│ │ memories + embeddings + decay │ │
│ └─────────────────────────────────┘ │
├─────────────────────────────────────────┤
│ Auto-Surface Hook │
│ (keyword matching on user input) │
└─────────────────────────────────────────┘
| Field | Type | Description |
|---|---|---|
title |
text | Short title |
content |
text | Full content |
summary |
text | One-line summary |
compressed |
text | Medium compression |
layer |
int | 1=fact, 2=experience, 3=decision chain |
importance |
int | 1-5 scale |
emotion_intensity |
real | 0-10, high = flashbulb memory |
valence |
real | -1 to 1, negative to positive |
mood |
text | Mood description |
tags |
text | Comma-separated tags |
type |
text | note/diary/feedback/project/user |
embedding |
text | JSON array, generated on write |
activation_count |
int | Times recalled |
last_activated |
text | Last recall timestamp |
status |
text | active/decayed/expired |
| Tool | Description |
|---|---|
memory_write |
Create or update a memory with auto-embedding and dedup |
memory_read |
Read a specific memory by ID |
memory_search |
Semantic search using embedding similarity |
memory_surface |
Surface top memories by importance and relevance |
memory_update |
Update existing memory fields |
memory_delete |
Soft-delete a memory |
memory_decay |
Run decay cycle — deactivate unused memories |
memory_expire |
Permanently remove decayed memories |
memory_stats |
Get memory system statistics |
Memories decay based on last_activated, not created_at. A memory that keeps getting recalled stays active indefinitely. Decay thresholds:
Inspired by research on human memory consolidation — informed by 8 papers (see design doc).
auto_surface.cjs runs as a Claude Code UserPromptSubmit hook. On each user message, it:
This enables passive recall without explicit search commands.
npm install
Add to Claude Code MCP config:
{
"mcpServers": {
"memory": {
"command": "node",
"args": ["path/to/memory-mcp/index.js"]
}
}
}
Built on research from 8 papers:
See docs/design.md for detailed analysis of each paper's influence.
In active daily use. 95+ memories across 17 sessions. Iterating based on real-world usage patterns.
MIT
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"ai-long-term-memory-mcp-server": {
"command": "npx",
"args": []
}
}
}