Prerequisites
- Mem0 Platform account (Sign up here)
- API key (Get one from dashboard)
- Python 3.10+, Docker, or Node.js 14+
- An MCP-compatible client (Claude Desktop, Cursor, or custom agent)
What is Mem0 MCP?
Mem0 MCP Server exposes Mem0’s memory capabilities as MCP tools, letting AI agents decide when to save, search, or update information.Deployment Options
Choose from three deployment methods:- Python Package (Recommended) - Install locally with
uvxfor instant setup - Docker Container - Isolated deployment with HTTP endpoint
- Smithery - Remote hosted service for managed deployments
Available Tools
The MCP server exposes these memory tools to your AI client:| Tool | Description |
|---|---|
add_memory | Save text or conversation history for a user/agent |
search_memories | Semantic search across existing memories with filters |
get_memories | List memories with structured filters and pagination |
get_memory | Retrieve one memory by its memory_id |
update_memory | Overwrite a memory’s text after confirming the ID |
delete_memory | Delete a single memory by memory_id |
delete_all_memories | Bulk delete all memories in scope |
delete_entities | Delete a user/agent/app/run entity and its memories |
list_entities | Enumerate users/agents/apps/runs stored in Mem0 |
Quickstart with Python (UVX)
1
Install the MCP Server
2
Configure your MCP client
Add this to your MCP client (e.g., Claude Desktop):Set your environment variables:
3
Test with the Python agent
4
Verify the setup
Your AI client can now:
- Automatically save information with
add_memory - Search memories with
search_memories - Update memories with
update_memory - Delete memories with
delete_memory
If you get “Connection failed”, ensure your API key is valid and the server is running.
Quickstart with Docker
1
Build the Docker image
2
Run the container
3
Configure your client for HTTP
For clients that connect via HTTP (instead of stdio):
4
Verify the setup
The container should start successfully and respond to HTTP requests. If port 8080 is occupied, change it with
-p 8081:8081.Quickstart with Smithery (Hosted)
For the simplest integration, use Smithery’s hosted Mem0 MCP server - no installation required. Example: One-click setup in Cursor- Visit smithery.ai/server/@mem0ai/mem0-memory-mcp and select Cursor as your client

- Open Cursor → Settings → MCP
- Click
mem0-mcp→ Initiate authorization - Configure Smithery with your environment:
MEM0_API_KEY: Your Mem0 API keyMEM0_DEFAULT_USER_ID: Your user IDMEM0_ENABLE_GRAPH_DEFAULT: Optional, set totruefor graph memories
- Return to Cursor settings and wait for tools to load
- Start chatting with Cursor and begin storing preferences
Quick Recovery
- “uvx command not found” → Install with
pip install uvor usepip install mem0-mcp-serverinstead. Make sure your Python environment hasuvinstalled (or system-wide). - “Connection refused” → Check that the server is running and the correct port is configured
- “Invalid API key” → Get a new key from Mem0 Dashboard
- “Permission denied” → Ensure Docker has access to bind ports (try with
sudoon Linux)
Next Steps
Additional Resources
- Mem0 MCP Repository - Source code and examples
- Platform Quickstart - Direct API integration guide
- MCP Specification - Learn about MCP protocol