xiy/claude-memory-server
If you are the rightful owner of claude-memory-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The Claude Memory Server is an MCP server that provides long-term memory capabilities for Claude, allowing persistent storage and retrieval of context across conversations.
Claude Memory Server
An MCP (Model Context Protocol) server that provides long-term memory capabilities for Claude, allowing persistent storage and retrieval of context across conversations.
Features
- 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
Memory Categories
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
Available Tools
- 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
Installation
- Clone or download this project
- Install dependencies:
bun install
- Build the project:
bun run build
Configuration
Claude Desktop Integration
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.
Manual Testing
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.
Usage Examples
Once integrated with Claude Desktop, you can use the memory tools in your conversations:
Storing Memories
Please store this as a memory: I prefer using TypeScript over JavaScript for all projects.
Category: preferences
Searching Memories
Search my memories for anything about TypeScript preferences.
Getting Statistics
Show me my memory statistics - how many memories I have by category.
Database
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.
Development
Project Structure
src/
āāā index.ts # Main MCP server implementation
āāā memory-service.ts # Memory business logic
āāā database.ts # SQLite database operations
Scripts
bun run build
- Build TypeScript to JavaScriptbun run start
- Start the compiled serverbun run dev
- Development mode with file watching
Future Enhancements
- 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
License
ISC License