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.
Sidekick is available only in the Claude Code plugin.

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, 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 cannot add context to a prompt. Use search_memories to recall memories.
The plugin does not register subagent start or stop hooks.

Example Workflow

Search and capture

The local search_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_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.