Current plugin version:
0.3.1.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)
-
Python 3.10 or newer available as
python3 - Your API key added to your shell profile (persists across sessions):
Installation
Option A: Full Plugin (Recommended)
Add the Mem0 marketplace:/plugins, select the Mem0 Plugins marketplace, and install Mem0 at user or project scope. Enter your Mem0 API key when Cursor asks for the plugin configuration, then restart Cursor.
The full plugin includes automatic capture, the search_memories recall tool, lifecycle hooks, and six memory skills.
Option B: 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 C: npx (MCP Only)
Option D: 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.What’s included
MCP-only tools
Options B, C, and D expose the following hosted tools. The full plugin uses the focusedsearch_memories tool and captures writes through lifecycle hooks.
Lifecycle hooks
The full plugin translates Cursor’s native events into the shared Mem0 memory lifecycle:Cursor’s
beforeSubmitPrompt hook cannot add context to a prompt. Use search_memories to recall memories.Example Workflow
Search and capture
The localsearch_memories tool accepts query, top_k, category, scope (repo, dir, or mine), and optional run_id with every scope. Use a known session ID to recall memories saved in that session; omit it to search across sessions. See search scopes for the shared Python search contract, including legacy repository memory compatibility.
Captured prompts and responses retain their full redacted text without a per-message character cutoff. Large extraction inputs are split across requests without dropping message text; recall output and tool-result previews have separate limits.
Troubleshooting
- “Connection failed”: Verify
MEM0_API_KEYis set:echo $MEM0_API_KEY - Duplicate tools: Do not combine the full plugin with an MCP-only option. Remove the standalone
mem0MCP entry 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.