Skip to main content
Add persistent memory to Cursor with the Mem0 plugin. Cursor captures completed work in the background, and its agent can search relevant project context in later sessions. You can also connect only the hosted MCP server when you do not need lifecycle capture.
Current plugin version: 0.3.1.

Prerequisites

Before setting up Mem0 with Cursor, ensure you have:
  1. A Mem0 Platform account and API key:
  2. Cursor installed (cursor.com)
  3. Python 3.10 or newer available as python3
  4. Your API key added to your shell profile (persists across sessions):
Already have mem0 configured as an MCP server in Cursor? Remove the existing entry from your Cursor MCP settings before installing to avoid duplicate tools.

Installation

Add the Mem0 marketplace:
Open Cursor’s Customize page or run /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, a sidekick agent, and six memory skills. The fastest way to get started. Click the link below to install the Mem0 MCP server directly in Cursor: Install Mem0 MCP in Cursor

Option 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 focused search_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 can allow or block a prompt, but it cannot add context to that prompt. The plugin therefore gives the agent search_memories and a memory-aware sidekick for recall instead of claiming automatic per-prompt injection.
Cursor’s subagentStart hook also cannot inject parent context. The bundled Sidekick searches Mem0 itself, while the lifecycle hooks correlate its start and completion for later capture.

Example Workflow

Troubleshooting

  • “Connection failed”: Verify MEM0_API_KEY is set: echo $MEM0_API_KEY
  • Duplicate tools: Do not combine the full plugin with an MCP-only option. Remove the standalone mem0 MCP entry before installing the plugin.
  • No tools appearing: Go to Cursor Settings > MCP and verify the mem0 server 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.