An advanced cognitive-inspired memory management system for the Model Context Protocol (MCP) that provides persistent storage with brain-like memory processing features including consolidation, decay, reinforcement, and intelligent retrieval.
Memory Manager MCP Server implements sophisticated memory models inspired by human cognition:
- Working Memory: Active, immediate information processing
- Episodic Memory: Event-based memories with contextual details
- Semantic Memory: Factual knowledge and concepts
- Procedural Memory: How-to knowledge and skills
The system features automatic memory consolidation, natural decay patterns, reinforcement learning, and intelligent indexing for efficient retrieval.
- Memory Consolidation: Automatically merges related memories like human sleep consolidation
- Memory Decay: Natural forgetting curves for non-reinforced memories
- Reinforcement Learning: Strengthens frequently accessed or important memories
- Smart Indexing: Efficient retrieval with semantic search capabilities
- Layered Storage: Primary, secondary, and archival memory layers
- Encryption: Built-in memory encryption for sensitive data
- Guardian Module: Security policies and access control
- Monitoring: Real-time performance and health tracking
- Categorization: Project, technical, conversation, and configuration memories
- Retention Policies: Configurable retention periods per category
- Backup/Restore: Full state export and import capabilities
- Analytics: Memory usage metrics and insights
- Node.js 18.0.0 or higher
- npm or yarn package manager
- Git (for cloning the repository)
- Claude Desktop app (for MCP integration)
- Node.js 18.0.0 or higher
- npm or yarn package manager
- Git for Windows
- Claude Desktop app (for MCP integration)
- Windows Terminal or PowerShell (recommended)
-
Clone the repository
cd ~/Documents git clone [repository-url] memory-manager cd memory-manager
-
Install dependencies
npm install
-
Build the project
npm run build
-
Configure Claude Desktop
Open Claude Desktop configuration:
code ~/Library/Application\ Support/Claude/claude_desktop_config.json
Add the Memory Manager to your MCP servers:
{ "mcpServers": { "memory-manager": { "command": "node", "args": ["/Users/YOUR_USERNAME/Documents/memory-manager/dist/server.js"], "env": { "NODE_ENV": "production" } } } } -
Restart Claude Desktop
- Quit Claude Desktop completely
- Reopen Claude Desktop
- The Memory Manager should appear in your MCP tools
-
Clone the repository
cd C:\Users\YOUR_USERNAME\Documents git clone [repository-url] memory-manager cd memory-manager
-
Install dependencies
npm install
-
Build the project
npm run build
-
Configure Claude Desktop
Open Claude Desktop configuration:
notepad "$env:APPDATA\Claude\claude_desktop_config.json"Add the Memory Manager to your MCP servers:
{ "mcpServers": { "memory-manager": { "command": "node", "args": ["C:\\Users\\YOUR_USERNAME\\Documents\\memory-manager\\dist\\server.js"], "env": { "NODE_ENV": "production" } } } } -
Restart Claude Desktop
- Close Claude Desktop completely
- Reopen Claude Desktop
- The Memory Manager should appear in your MCP tools
Edit config.json to customize storage settings:
{
"storage": {
"basePath": "storage",
"maxSize": 104857600, // 100MB in bytes
"retentionPeriods": {
"shortTerm": 86400000, // 24 hours
"longTerm": 31536000000, // 365 days
"conversation": 604800000 // 7 days
}
},
"categories": [
"project",
"technical",
"conversation",
"configuration"
],
"defaultCategory": "technical"
}| Category | Default Retention | Use Case |
|---|---|---|
| project | 1 year | Long-term project information |
| technical | 6 months | Technical documentation, code snippets |
| conversation | 30 days | Chat context and discussions |
| configuration | Permanent | System settings, preferences |
// Store project information
await store_memory({
content: "Database schema redesign completed with improved indexing",
type: "semantic",
retention: "long-term",
context: {
environment: "production",
tags: ["database", "optimization", "project-x"],
emotional_state: 0.8,
attention_level: 0.9
}
});// Search by type
await retrieve_memories({
query: { type: "semantic" }
});
// Search by tags
await retrieve_memories({
query: { tags: ["database"] }
});await reinforce_memory({
id: "memory-id-123",
context: {
emotional_state: 0.9,
attention_level: 1.0,
related_memories: ["memory-id-456", "memory-id-789"]
}
});npm run build # Build TypeScript to JavaScript
npm run dev # Development mode with auto-reload
npm run clean # Clean build directory
npm run lint # Run ESLint
npm run format # Format code with Prettier
npm run test # Run testsnode demo.js # Basic functionality demo
node feeling-demo.js # Emotional context storage
node gratitude-demo.js # Gratitude memory example
node improvement-demo.js # System improvement tracking
node implementation-plan.js # Project planning storage-
"Memory Manager not showing in Claude"
- Ensure the path in
claude_desktop_config.jsonis absolute - Check that the build was successful (
npm run build) - Restart Claude Desktop completely
- Ensure the path in
-
"Permission denied" errors
- macOS: Check file permissions with
ls -la - Windows: Run terminal as Administrator
- Ensure storage directory is writable
- macOS: Check file permissions with
-
"Module not found" errors
- Delete
node_modulesand reinstall:rm -rf node_modules && npm install - Ensure Node.js version is 18.0.0 or higher:
node --version
- Delete
-
Storage issues
- Check available disk space
- Verify storage path exists and is writable
- Check logs in
memory-manager.log
Enable debug logging by setting the environment variable:
# macOS/Linux
export LOG_LEVEL=debug
# Windows
set LOG_LEVEL=debugThe server runs a health check endpoint on port 3000:
curl http://localhost:3000/health- Application logs:
memory-manager.log - Error logs:
memory-manager-error.log - MCP communication: Check Claude Desktop logs
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
This project is licensed under a Noncommercial No-Derivatives license - see the LICENSE file for details.
- Inspired by cognitive science research on human memory systems
- Built for the Model Context Protocol (MCP) ecosystem
- Designed for integration with Claude Desktop
- Create an issue on GitHub for bugs or feature requests
- Check existing issues before creating new ones
- Include logs and system information when reporting bugs
Copyright (c) 2025 MindXpansion.ai
This project is licensed under a Noncommercial No-Derivatives license. You may use and share unmodified copies for noncommercial purposes only. No selling, charging for access/hosting, or derivative works (including modifications) are permitted. See the full terms in LICENSE. See GitHub, https://github.com/MindXpansion/memory-manager, License.