claude-desktop-mem
v1.3.2
Published
Persistent memory MCP server for Claude Desktop — auto-captures, compresses, and injects conversation context across sessions
Maintainers
Readme
claude-desktop-mem
Persistent memory MCP server for Claude Desktop. It stores notes, decisions, preferences, facts, tasks, and conversation summaries in a local SQLite database (~/.claude-desktop-mem/memory.db) using Node.js's built-in node:sqlite module — no native compilation required. Memories survive across sessions, are full-text searchable with porter stemming, and are automatically deduplicated by content hash. An importance score (1–10) and recency weighting determine which memories surface first.
Prerequisites
- Node.js >=22.13.0 — required for the built-in
node:sqlitemodule- Check:
node --version - Install / upgrade: nodejs.org or nvm
- Check:
Quick Start
Install (recommended)
npm install -g claude-desktop-memAdd to your Claude Desktop config:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"claude-desktop-mem": {
"command": "claude-desktop-mem"
}
}
}Restart Claude Desktop.
Install from source (for development)
git clone https://github.com/velaswami/claude-desktop-mem
cd claude-desktop-mem
npm install
npm run buildThen use "command": "node" with "args": ["/absolute/path/to/dist/index.js"] in the config instead.
Tools
mem_save
Save information to persistent memory. Duplicates are auto-detected by content hash.
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| content | string | yes | — | The text to remember |
| type | string (enum) | no | "note" | One of: note, decision, preference, fact, task, context, summary |
| category | string | no | "general" | Freeform category label for grouping |
| tags | string[] | no | [] | Additional searchable tags |
| importance | number | no | 5 | Priority score 1–10 (higher surfaces first in recall) |
| session_id | string | no | — | Associate this memory with a named session |
mem_search
Full-text search across memories using porter stemming and prefix matching.
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| query | string | yes | — | Search terms |
| limit | number | no | 10 | Max results (1–50) |
| category | string | no | — | Restrict results to a specific category |
mem_recall
Browse top memories ranked by importance and recency.
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| limit | number | no | 10 | Max results (1–100) |
| category | string | no | — | Filter by category |
| type | string (enum) | no | — | Filter by type: note, decision, preference, fact, task, context, summary |
| verbose | boolean | no | false | Include timestamps and access count |
mem_forget
Delete a memory by its numeric ID (shown in mem_recall / mem_search output).
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| id | number | yes | ID of the memory to delete |
mem_status
Show memory system stats: total count, quota usage, DB size, and a snapshot of top memories. No parameters.
mem_export
Export all memories as JSON or CSV for backup or migration.
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| format | string (enum) | no | "json" | json or csv |
Prompts
mem_context
Injects your top memories as context at the start of a conversation, so Claude immediately knows what you've stored.
| Argument | Required | Description |
|----------|----------|-------------|
| category | no | Filter to a specific category |
| limit | no | Number of memories to include (default: value of CLAUDE_MEM_CTX_LIMIT) |
mem_summarize
Asks Claude to summarize the current conversation and save the key points as new memories. No arguments.
Environment Variables
| Variable | Default | Description |
|----------|---------|-------------|
| CLAUDE_MEM_DIR | ~/.claude-desktop-mem | Directory where memory.db is stored |
| CLAUDE_MEM_MAX_TOTAL | 2000 | Maximum total memories before writes are blocked |
| CLAUDE_MEM_MAX_SESSION | 200 | Maximum memories per session |
| CLAUDE_MEM_MAX_MB | 100 | Maximum DB size in MB before writes are blocked |
| CLAUDE_MEM_RECALL_LIMIT | 10 | Default result limit for mem_recall and mem_search |
| CLAUDE_MEM_CTX_LIMIT | 5 | Default number of memories injected by mem_context |
Storage
All data lives in a single SQLite file:
~/.claude-desktop-mem/memory.dbThe directory is created automatically on first run. To reset all memories, delete memory.db. To back up, copy the file or use mem_export.
Privacy
claude-desktop-mem is fully local. All memories are stored in ~/.claude-desktop-mem/memory.db on your machine. Nothing is sent to any external service. To delete everything, remove that file.
License
MIT
