**Give your AI a memory that persists across conversations.** Never lose important context again.
MCP Memory is a robust, Elasticsearch-backed knowledge graph system that gives AI models persistent memory beyond the limits of their context windows. Built for the Model Context Protocol (MCP), it ensures your LLMs remember important information forever, creating more coherent, personalized, and effective AI conversations.
Why AI Models Need Persistent Memory
Ever experienced these frustrations with AI assistants?
Your AI forgetting crucial details from earlier conversations
Having to repeat the same context every time you start a new chat
Losing valuable insights once the conversation history fills up
Inability to reference past work or decisions
MCP Memory solves these problems by creating a structured, searchable memory store that preserves context indefinitely. Your AI can now build meaningful, long-term relationships with users and maintain coherence across days, weeks, or months of interactions.
Key Features
** Persistent Memory**: Store and retrieve information across multiple sessions
** Smart Search**: Find exactly what you need with powerful Elasticsearch queries
** Contextual Recall**: AI automatically prioritizes relevant information based on the conversation
** Relational Understanding**: Connect concepts with relationships that mimic human associative memory
** Long-term / Short-term Memory**: Distinguish between temporary details and important knowledge
** Memory Zones**: Organize information into separate domains (projects, clients, topics)
** Reliable & Scalable**: Built on Elasticsearch for enterprise-grade performance
5-Minute Setup
Getting started is incredibly simple:
Prerequisites
**Docker**: Required for running Elasticsearch (or a local Elasticsearch installation)
**Node.js**: Version 18 or higher
**npm**: For package management
Connecting to Claude Desktop
MCP Memory is designed to work seamlessly with Claude Desktop, giving Claude persistent memory across all your conversations:
**Copy and configure the launch script**:
The repository includes a `launch.example` file that you can simply copy:
```bash
# Copy the example launch file
cp launch.example launch.sh
# Edit launch.sh to add your Groq API key
# This is required for smart memory retrieval
nano launch.sh # or use your preferred editor
```
Make the script executable:
```bash
chmod +x launch.sh
```
**Add the command to Claude Desktop**:
- Open Claude Desktop Settings
- Navigate to the "Commands" section
- Click "Add New Command"
- Configure as follows:
- **Name**: MCP Memory
- **Command**: /path/to/mcp-servers/memory/launch.sh
- **Arguments**: Leave empty
- **Run in background**: Yes
- **Show in menu**: Yes
**Verify connection**:
- Start the command from Claude Desktop
- You should see a notification that Claude is connected to MCP Memory
- Try asking Claude about something you discussed in a previous conversation!
For complete examples and visual guides, see the [Claude Desktop MCP Server Setup Guide](https://github.com/anthropic-claude/claude-desktop-mcp-examples) online.
How It Works
MCP Memory creates a structured knowledge graph where:
**Entities** represent people, concepts, projects, or anything worth remembering
**Relations** connect entities, creating a network of associations
**Observations** capture specific details about entities
**Relevance scoring** determines what information to prioritize
When integrated with an LLM, the system automatically:
Stores new information learned during conversations
Retrieves relevant context when needed
Builds connections between related concepts
Forgets unimportant details while preserving critical knowledge
Example: How Agents Use Memory
From the User's Perspective
**Conversation 1: Initial Information**
**Conversation 2: Days or Weeks Later**
**Conversation 3: After the Birthday**
How the Agent Uses Memory
When the user mentions something important, the agent:
**Recognizes important information** worth remembering
**Stores it in memory** by creating entities, relations, and observations
**Updates existing information** when new details emerge
When the user mentions something related to stored information, the agent:
**Searches memory** for relevant context based on the current conversation
**Retrieves important details** that might be helpful
**Incorporates this information** naturally into its responses
This happens automatically - the user simply has a normal conversation with the assistant, and the memory system works behind the scenes to maintain context across sessions.
Intelligent Entity Management
MCP Memory includes smart handling of entity creation and updates:
When attempting to create an entity that already exists, the system returns the existing entity data with guidance on how to extend it with new information
The system intelligently differentiates between creating new entities and updating existing ones
Entity relationships are automatically maintained even when information is updated
Admin Tools
MCP Memory includes a comprehensive admin CLI for maintaining your knowledge graph:
Advanced Features
Memory Zones
Organize knowledge into separate domains:
Conversational Memory Management
You can also instruct the assistant to organize memories in different zones through natural conversation:
**Creating and Using Memory Zones**
**Retrieving Zone-Specific Information**
**Switching Between Memory Zones**
By organizing memory into separate zones, conversations become more relevant and focused on the current topic or project.