Model Context Protocol (MCP) provides a standardized way for AI agents to manage their own memory through Mem0, without manual API calls.
Why use MCP
When building AI applications, memory management often requires manual integration. MCP eliminates this complexity by:- Universal compatibility: Works with any MCP-compatible client (Claude, Claude Code, Cursor, Windsurf, VS Code, OpenCode)
- Agent autonomy: AI agents decide when to save, search, or update memories
- Zero infrastructure: No servers to maintain - Mem0’s cloud MCP handles everything
- Standardized protocol: One integration works across all your AI tools
Setup
Add Mem0 MCP to all supported clients with a single command:Available tools
The MCP server exposes 9 memory tools to your AI client:| Tool | Purpose |
|---|---|
add_memory | Store conversations or facts |
search_memories | Find relevant memories with filters |
get_memories | List memories with pagination |
update_memory | Modify existing memory content |
delete_memory | Remove specific memories |
delete_all_memories | Bulk delete memories |
delete_entities | Remove user/agent/app entities |
get_memory | Retrieve single memory by ID |
list_entities | View stored entities |
How it works
- Configure the MCP server - Add Mem0 MCP to your AI client using the setup command above
- Agent connects - Your AI client connects to Mem0’s cloud MCP server over HTTP
- Autonomous memory - The agent decides when to store/retrieve memories as part of its reasoning
- No manual API calls - The agent manages memory automatically through MCP tools
Example interactions
Once connected, your AI agent can:Try these prompts
What you can do
The Mem0 MCP server enables powerful memory capabilities for your AI applications:- Health tracking: “I’m allergic to peanuts and shellfish” - Add new health information
- Research data: “Store these trial parameters: 200 participants, double-blind, placebo-controlled” - Save structured data
- Preference queries: “What do you know about my dietary preferences?” - Search and retrieve relevant memories
- Project updates: “Update my project status: the mobile app is now 80% complete” - Modify existing memory
- Data cleanup: “Delete all memories from 2023” - Bulk remove outdated information
- Topic overview: “Show me everything about Project Phoenix” - List all memories for a subject
Performance tips
- Enable graph memories for relationship-aware recall
- Use specific filters when searching large memory sets
- Batch operations when adding multiple memories
- Monitor memory usage in the Mem0 dashboard
Best practices
- Use the cloud MCP: The hosted MCP server at
https://mcp.mem0.ai/mcphandles infrastructure for you - Use wildcards:
user_id: "*"to search across all users - Monitor usage: Track memory operations in the dashboard
- Document patterns: Share successful prompt patterns with your team