mcp-memory-server
๐ง Advanced Memory System for Claude Desktop - MCP Server with CosmosDB, RAG, and intelligent entity extraction
Documentation
๐ง MCP Memory Server
Advanced Memory System for Claude Desktop - Transform Claude into an AI assistant with photographic memory using MCP (Model Context Protocol).
โจ What it does
Imagine Claude with persistent memory that:
- ๐ง Remembers everything from your conversations
- ๐ Automatically retrieves context when you reference past topics
- ๐ค Understands references like "that project", "this company", "he/she"
- ๐ Builds knowledge over time across all your sessions
- ๐ ๏ธ Auto-captures results from web searches and other tools
๐ Quick Start
Prerequisites
- Node.js 18+
- Azure Cosmos DB account
- OpenAI API key
- Claude Desktop
Installation
git clone https://github.com/PlumyCat/mcp-memory-server.git
cd mcp-memory-server
npm install
npm run buildConfiguration
1. Environment setup:
cp .env.example .env
# Edit .env with your API keys2. Claude Desktop configuration:
{
"mcpServers": {
"memory": {
"command": "node",
"args": ["/path/to/mcp-memory-server/dist/index.js"],
"cwd": "/path/to/mcp-memory-server"
}
}
}3. Test the magic:
You: "I'm working on a TypeScript project using CosmosDB"
Claude: [Responds normally + automatic background storage]
# Later...
You: "What was that project we discussed?"
Claude: "You mentioned working on a TypeScript project using CosmosDB..."๐ฏ Key Features
๐ง Intelligent Memory Storage
- Automatic entity extraction (people, companies, projects, tools)
- Semantic storage with OpenAI embeddings
- Conversation context preservation
- Smart deduplication
๐ Advanced Search & Retrieval
- Semantic similarity search
- Entity relationship mapping
- Timeline-based retrieval
- Context-aware responses
๐ค Entity Resolution
- Automatic pronoun resolution ("he" โ "John Smith")
- Reference understanding ("that company" โ "Microsoft")
- Cross-conversation entity linking
- Confidence scoring
๐ Analytics & Insights
- Conversation pattern analysis
- Entity interaction timelines
- Knowledge growth tracking
- Usage statistics
๐ ๏ธ Available Tools
The server provides 6 MCP tools for Claude:
| Tool | Description | Example Usage |
|---|---|---|
| `memory_store` | Store information with auto entity extraction | Automatically triggered during conversations |
| `memory_search` | Semantic search through stored memories | "Find all discussions about React" |
| `context_inject` | Get relevant context for current query | "What did we discuss about this project?" |
| `entity_resolve` | Resolve references to actual entities | "Who is 'he' referring to?" |
| `conversation_analyze` | Analyze conversation patterns | "Show my discussion statistics" |
| `memory_timeline` | Get timeline of entity interactions | "Timeline of Microsoft mentions" |
๐ Project Structure
mcp-memory-server/
โโโ src/
โ โโโ config/ # Azure Cosmos DB configuration
โ โโโ memory/ # Core memory system (RAG, storage, graph)
โ โโโ types/ # TypeScript type definitions
โ โโโ utils/ # Entity extraction, context injection
โ โโโ server.ts # Main MCP server implementation
โโโ scripts/ # Maintenance and health check scripts
โโโ tests/ # Unit and integration tests
โโโ docs/ # Technical documentation
โโโ dist/ # Compiled JavaScript (generated)๐๏ธ Architecture
Core Components
- RAG System: Vector similarity search with OpenAI embeddings
- Entity Extractor: NLP-based entity recognition with custom patterns
- Memory Storage: Optimized CosmosDB integration with smart indexing
- Context Injector: Intelligent context retrieval for conversations
- Graph Engine: Entity relationship mapping and traversal
Data Flow
graph TD
A[User Message] --> B[Entity Extraction]
B --> C[Embedding Generation]
C --> D[CosmosDB Storage]
D --> E[Semantic Search]
E --> F[Context Injection]
F --> G[Enhanced Claude Response]๐ง Configuration
Environment Variables
# Azure Cosmos DB
COSMOS_ENDPOINT=https://your-account.documents.azure.com:443/
COSMOS_KEY=your-primary-key
COSMOS_DATABASE_NAME=memory-db
COSMOS_CONTAINER_CONVERSATIONS=conversations
COSMOS_CONTAINER_ENTITIES=entities
# OpenAI
OPENAI_API_KEY=your-openai-api-key
# Optional
NODE_ENV=production
LOG_LEVEL=info
MEMORY_RETENTION_DAYS=30Advanced Configuration
See Configuration Guide for detailed setup options.
๐งช Testing
# Run all tests
npm test
# Health check
npm run health-check
# Test memory functionality
npm run test-memory๐ Performance
- Storage: Optimized CosmosDB indexing for sub-100ms queries
- Search: Vector similarity with 95%+ accuracy
- Memory: Efficient entity deduplication and compression
- Scalability: Handles 1000+ entities with consistent performance
๐ฃ๏ธ Roadmap
โ Completed
- Core memory storage and retrieval
- Entity extraction and resolution
- Semantic search with embeddings
- CosmosDB integration
- MCP server implementation
๐ In Progress
- [ ] Intelligent entity deduplication
- [ ] Auto-capture of all MCP tool results
- [ ] Enhanced entity classification patterns
- [ ] Contradiction detection system
๐ฎ Planned
- [ ] Multi-user memory isolation
- [ ] Graph traversal with Gremlin queries
- [ ] Advanced analytics dashboard
- [ ] Memory compression and archiving
See Roadmap for detailed feature planning.
๐ค Contributing
We welcome contributions! Please see our Contributing Guidelines for details.
Development Setup
git clone https://github.com/PlumyCat/mcp-memory-server.git
cd mcp-memory-server
npm install
npm run dev๐ Documentation
- Usage Guide - Comprehensive usage examples
- API Reference - Detailed API documentation
- Architecture - Technical architecture details
- Troubleshooting - Common issues and solutions
๐ Support
- ๐ Check the Usage Guide for examples
- ๐ Report issues on GitHub Issues
- ๐ฌ Discuss on GitHub Discussions
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
- Model Context Protocol (MCP) for the foundational protocol
- Claude Desktop for the AI assistant platform
- Azure Cosmos DB for scalable data storage
- OpenAI for embedding generation
- Compromise.js for natural language processing
โญ Star History
Made with โค๏ธ for the Claude Desktop community
Frequently asked questions
What is mcp-memory-server?
mcp-memory-server is ๐ง Advanced Memory System for Claude Desktop - MCP Server with CosmosDB, RAG, and intelligent entity extraction
How do I install mcp-memory-server?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is mcp-memory-server open source?
Yes โ it is hosted on GitHub at https://github.com/PlumyCat/mcp-memory-server and has 1 stars.
Related MCP tools
๐ Cherry Studio is a desktop client that supports for multiple LLM providers. Built for the Model Context Protocol to enhance AI capabilities.
Enhanced ChatGPT Clone: Features Agents, MCP, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini...
FastGPT is a knowledge-based platform built on the LLMs, offers a comprehensive suite of out-of-the-box capabilities such as data processing, RAG retrieval, ...
Composio equips your AI agents & LLMs with 100+ high-quality integrations via function calling for the Model Context Protocol. Enhance AI assistants with powerf
๐ฆ Repomix is a powerful tool that packs your entire repository into a single, AI-friendly file. Perfect for when you need to feed your codebase to Large Lan...
AI Agents & MCPs & AI Workflow Automation โข (~400 MCP servers for AI agents) โข AI Automation / AI Agent with MCPs โข AI Workflows & AI Agents โข MCPs for AI Ag...
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP