Prerequisites
Before setting up Mem0 with Cursor, ensure you have:-
A Mem0 Platform account and API key:
- Sign up at app.mem0.ai
- Get your API key (starts with
m0-)
- Cursor installed (cursor.com)
- Your API key added to your shell profile (persists across sessions):
Installation
Option A: One-Click Deeplink (MCP Only)
The fastest way to get started. Click the link below to install the Mem0 MCP server directly in Cursor: Install Mem0 MCP in CursorOption B: npx (MCP Only)
Option C: Manual Configuration (MCP Only)
Add the following to your.cursor/mcp.json:
Start a new Cursor session and ask: “List my mem0 entities” or “Search my memories for hello”. If the
mem0 tools appear and respond, you’re all set.Available MCP Tools
Once installed, the following tools are available in every Cursor session:| Tool | Description |
|---|---|
add_memory | Save text or conversation history for a user/agent |
search_memories | Semantic search across memories with filters |
get_memories | List memories with filters and pagination |
get_memory | Retrieve a specific memory by ID |
update_memory | Overwrite a memory’s text by ID |
delete_memory | Delete a single memory by ID |
delete_all_memories | Bulk delete all memories in scope |
delete_entities | Delete a user/agent/app/run entity and its memories |
list_entities | List users/agents/apps/runs stored in Mem0 |
Example Workflow
Troubleshooting
- “Connection failed”: Verify
MEM0_API_KEYis set:echo $MEM0_API_KEY - Duplicate tools: If you had a previous MCP config for
mem0, remove it before installing the plugin - No tools appearing: Go to Cursor Settings > MCP and verify the
mem0server shows as connected
Mem0 MCP Setup
Detailed MCP configuration for all clients
Claude Code Integration
Add Mem0 memory to Claude Code workflows
Using Mem0? Star us on GitHub to help more developers discover memory for AI apps.