An MCP (Model Context Protocol) server that provides long-term memory capabilities for Claude, allowing persistent storage and retrieval of context across conversations.
- Persistent Memory Storage: Store important context, facts, and preferences
- Full-Text Search: Search through memories using natural language queries
- Organized Categories: Categorize memories for better organization
- CRUD Operations: Create, read, update, and delete memory entries
- SQLite Database: Fast, reliable local storage with FTS5 search capabilities
facts
- Important facts and informationpreferences
- User preferences and settingsconversations
- Conversation context and historyprojects
- Project-related informationlearning
- Things learned during interactionsgoals
- User goals and objectivescontext
- General context informationreminders
- Things to remember
- store_memory - Store a new memory entry
- search_memory - Search memories using full-text search
- get_memory - Retrieve a specific memory by ID
- update_memory - Update an existing memory
- delete_memory - Delete a memory by ID
- list_memories - List memories by category or recent
- get_memory_stats - Get memory statistics and categories
- Clone or download this project
- Install dependencies:
bun install
- Build the project:
bun run build
To integrate with Claude Desktop, you need to update your Claude Desktop configuration:
-
Find your Claude Desktop config directory:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%/Claude/claude_desktop_config.json
- macOS:
-
Add the memory server configuration:
{ "mcpServers": { "claude-memory": { "command": "node", "args": ["/path/to/claude-memory-server/dist/index.js"], "env": {} } } }
-
Update the path in the
args
array to point to your actual installation directory. -
Restart Claude Desktop for the changes to take effect.
You can also run the server directly for testing:
# Development mode
bun run dev
# Production mode
bun run start
The server uses stdio transport and will communicate via standard input/output.
Once integrated with Claude Desktop, you can use the memory tools in your conversations:
Please store this as a memory: I prefer using TypeScript over JavaScript for all projects.
Category: preferences
Search my memories for anything about TypeScript preferences.
Show me my memory statistics - how many memories I have by category.
The server uses SQLite for storage with the following features:
- FTS5 Full-Text Search for natural language queries
- Automatic indexing on categories, dates, and relevance scores
- JSON metadata storage for flexible data
- Triggers to keep search index synchronized
The database file (memory.db
) will be created in the project directory on first run.
src/
├── index.ts # Main MCP server implementation
├── memory-service.ts # Memory business logic
└── database.ts # SQLite database operations
bun run build
- Build TypeScript to JavaScriptbun run start
- Start the compiled serverbun run dev
- Development mode with file watching
- Vector Embeddings: Semantic search using OpenAI embeddings
- Memory Expiration: Automatic cleanup of old memories
- Export/Import: Backup and restore memory data
- Memory Relationships: Link related memories together
- HTTP Transport: Web-based interface for memory management
ISC License