Claude's context window resets between sessions, but MCP servers can provide persistent memory through knowledge graphs, vector stores, and RAG systems. This lets Claude remember past conversations, access your knowledge base, and maintain context across sessions. Here are the best options for adding memory.
Recommended MCP Servers
Mem0 MCP
mem0ai/mem0-mcp
Memory manager for AI apps and agents using various graph and vector stores with ingestion from 30+ data sources.
Key Features
- Graph and vector store support
- 30+ data source ingestion
- Persistent memory across sessions
- Semantic search capabilities
Installation
pip install mem0-mcpMem0 is purpose-built for giving AI agents memory. It combines graph and vector storage, ingests from dozens of sources, and provides semantic search. The go-to choice for building agents that remember everything.
ApeRAG
apecloud/ApeRAG
Production-ready RAG platform combining Graph RAG, vector search, and full-text search for knowledge graphs and context engineering.
Key Features
- Graph RAG + vector search
- Full-text search support
- Knowledge graph building
- Production-ready architecture
Installation
See GitHub for deployment optionsApeRAG is a serious RAG platform for organizations that need production-grade knowledge management. It combines multiple search strategies (graph, vector, full-text) for comprehensive retrieval. Best for building your own knowledge graph.
Neo4j MCP
neo4j-labs/neo4j-mcp
Neo4j integration for knowledge graph memory with query support and Aura instance management.
Key Features
- Knowledge graph storage
- Cypher query support
- Neo4j Aura integration
- Relationship-based memory
Installation
npx neo4j-mcpNeo4j MCP brings the power of graph databases to Claude's memory. Perfect for storing and querying relationship-heavy knowledge where connections between concepts matter as much as the concepts themselves.
Memory Server (Anthropic)
anthropics/mcp-server-memory
Official Anthropic MCP server for persistent memory storage using a simple key-value approach.
Key Features
- Simple key-value storage
- Official Anthropic support
- Lightweight and fast
- File-based persistence
Installation
npx @modelcontextprotocol/server-memoryThe official memory server from Anthropic provides simple, reliable memory storage. It's not as feature-rich as Mem0 or ApeRAG, but it's officially supported and perfect for basic persistent memory needs.
Quick Comparison
| MCP | Stars | Best For | Pros | Cons |
|---|---|---|---|---|
| Mem0 | >1k | Full memory system | 30+ data sources | More complex setup |
| ApeRAG | >500 | Knowledge graphs | Enterprise-grade | Requires deployment |
| Neo4j MCP | >400 | Relationship data | Graph queries | Neo4j dependency |
| Memory Server | >2k | Simple memory | Official support | Basic features |
Getting Started
To give Claude memory:
For simple persistent memory, use the official Memory Server:
npx @modelcontextprotocol/server-memoryFor full-featured memory, install Mem0:
pip install mem0-mcpConfigure Claude Code to use the memory server and start building persistent context.
Example prompt: "Remember that my preferred coding style is functional programming and I work primarily in TypeScript."