MCP server for memory management with long-term and short-term memory capabilities using local database
npm install @peakmojo/mcp-openmemory 
Gives Claude the ability to remember your conversations and learn from them over time.
- Memory Storage: Save and recall conversation messages
- Memory Abstracts: Maintain summarized memory context across conversations
- Recent History: Access recent conversations within configurable time windows
- Local Database: Uses SQLite for persistent storage without external dependencies
You must configure MEMORY_DB_PATH to a persistent location to avoid losing your conversation history when Claude Desktop closes. If not configured, the database defaults to ./memory.sqlite in a temporary location that may be cleared when the application restarts.
json
{
"mcpServers": {
"memory": {
"command": "npx",
"args": ["@buryhuang/mcp-openmemory"],
"env": {
"MEMORY_DB_PATH": "/path/to/your/memory.sqlite"
}
}
}
}
`
Or run from source
`json
{
"mcpServers": {
"memory": {
"command": "npx",
"args": ["/path/to/your/repo/server.js"]
"env": {
"MEMORY_DB_PATH": "/path/to/your/memory.sqlite"
}
}
}
}
`$3
-
MEMORY_DB_PATH: Path to SQLite database file (default: ./memory.sqlite)Available Tools
- save_memory: Store individual conversation messages
- recall_memory_abstract: Get current memory summary
- update_memory_abstract: Update the memory summary
- get_recent_memories: Retrieve recent conversation history
Usage
The server starts automatically when configured with Claude Desktop. The database will be created automatically on first use.
Example System Prompt
`
Memory Usage Guidelines
You should use memory tools thoughtfully to enhance conversation continuity and context retention:
When to Save Memory
- save_memory: Store significant conversation exchanges, important decisions, user preferences, or key context that would be valuable to remember in future conversations
- Focus on information that has lasting relevance rather than temporary details
- Save when users share important personal information, project details, or ongoing work contextWhen to Update Memory Abstract
- update_memory_abstract: After processing recent conversations, combine new important information with existing context to create an improved summary
- Update when there are meaningful developments in ongoing projects or relationships
- Consolidate related information to maintain coherent context over timeWhen to Recall Memory
- recall_memory_abstract: Use at the beginning of conversations to understand previous context, or when you need background information to better assist the user
- get_recent_memories: Access when you need specific details from recent exchanges that aren't captured in the abstract
- Recall when the user references previous conversations or when context would significantly improve your assistanceWhat Constitutes Critical Information
- User preferences and working styles
- Ongoing projects and their current status
- Important personal or professional context
- Decisions made and their rationale
- Key relationships or collaborations mentioned
- Technical specifications or requirements for recurring tasksUse these tools to build continuity and provide more personalized assistance, not as error-prevention mechanisms or intent-guessing systems.
``MIT License