Mem0 logo
Search & AIAuth: OAuthHosting: Official hosted

Mem0 MCP Server

Give your AI agents persistent memory — store, search, and recall context across sessions via MCP.

Updated

What is Mem0 MCP?

The Mem0 MCP server is a Model Context Protocol server that gives AI agents a persistent memory layer — letting them store, search, update, and recall context across conversations and sessions instead of starting from scratch each time.

It is an officially hosted, cloud service from Mem0. Rather than running anything locally, clients connect to the remote endpoint at https://mcp.mem0.ai/mcp and authenticate via OAuth against your Mem0 account, which scopes every memory operation to your workspace and API key. The server wraps Mem0's hosted Memory API, so the agent decides when to save a fact, look one up, or clean up stale entries.

Once connected, an agent can persist user preferences, prior decisions, and conversation history, then semantically search that store on later turns. This turns one-off chats into a continuous, context-aware experience and is compatible with MCP clients such as Claude, Claude Code, Cursor, Windsurf, and VS Code.

Tools the Mem0 MCP server exposes

ToolWhat it does
add_memorySave text or conversation history for a user or agent; Mem0 extracts and indexes key facts automatically.
search_memoriesSemantic search across stored memories with filters and result limits.
get_memoriesList memories using structured filters and pagination.
get_memoryRetrieve a single memory by its memory_id.
update_memoryOverwrite a memory's text after confirming the memory_id.
delete_memoryDelete a single memory by memory_id.
delete_all_memoriesBulk delete all memories within the current scope.
delete_entitiesDelete a user, agent, app, or run entity and its associated memories.
list_entitiesEnumerate the users, agents, apps, and runs stored in Mem0.
list_eventsList memory operation events with filters and pagination.
get_event_statusCheck the status of an async memory operation by event_id.

Connect the Mem0 MCP server

Claude Code

  1. 1

    Add the remote server

    Run: npx mcp-add --name mem0-mcp --type http --url "https://mcp.mem0.ai/mcp" --clients "claude code"

  2. 2

    Authenticate with OAuth

    On first use Claude Code opens a browser to sign in to your Mem0 account and authorize the connection.

  3. 3

    Verify the tools are available

    Ask Claude to list MCP tools or to save and recall a memory; you should see the Mem0 memory tools (add_memory, search_memories, etc.).

Requires a Mem0 account; the free Hobby tier is enough to get started.

Cursor

  1. 1

    Add the remote server

    Run: npx mcp-add --name mem0-mcp --type http --url "https://mcp.mem0.ai/mcp" --clients "cursor"

  2. 2

    Authenticate with OAuth

    Cursor opens a browser window to sign in to Mem0 and grant access to your workspace.

  3. 3

    Confirm in Cursor settings

    Open Cursor's MCP settings to confirm mem0-mcp shows as connected, then prompt the agent to store or search a memory.

Works with Cursor's MCP support; no local server install needed.

Sample use cases

A coding agent in Cursor or Claude Code that remembers your stack and preferences

The agent recalls past decisions and conventions across sessions instead of re-asking, producing more consistent suggestions.

A scheduled support-triage agent that needs customer history

It searches Mem0 for prior interactions before responding and stores new context for the next run.

A research assistant accumulating findings over time

Earlier conclusions are persisted and retrieved on later runs, building a continuous knowledge base.

Security & permissions

The hosted Mem0 MCP server uses OAuth: clients sign in to your Mem0 account in a browser and authorize the connection, rather than pasting a long-lived key into a config file. Once authorized, the agent can read and write memories in your Mem0 workspace — it can add, search, update, and delete memories and entities (users, agents, apps, runs) within the scope of your account. Because memory tools include destructive operations like delete_memory and delete_all_memories, treat the connection as having full read/write access to your stored context, and only connect agents you trust. All data lives in Mem0's hosted platform under your account.

Using Mem0 MCP with Gamut

In a Gamut workflow, Mem0 acts as the long-term memory tool for an automated agent: Gamut manages the OAuth connection to the hosted Mem0 MCP server, so an event- or schedule-triggered agent can call searchmemories at the start of a run to load relevant prior context, then addmemory or update_memory to persist new facts and decisions before it finishes. This lets recurring or webhook-driven agents stay context-aware across runs without you wiring up storage yourself — for example, a scheduled support-triage or research agent that remembers a customer's history or its own earlier conclusions from one invocation to the next.

Frequently asked questions

What is the Mem0 MCP server?

It is an officially hosted Model Context Protocol server from Mem0 that gives AI agents a persistent memory layer. Connected at https://mcp.mem0.ai/mcp, it lets agents save, semantically search, update, and recall context across sessions using tools like add_memory and search_memories.

Is the Mem0 MCP server free?

You can use it on Mem0's free Hobby tier, which includes 10,000 memories and 1,000 retrieval calls per month. Heavier usage moves to paid plans starting at $19/month (Starter), with Growth, Pro, and Enterprise tiers above that. The core Mem0 library is also open source under Apache 2.0.

How do I connect Mem0 MCP to Claude Code or Cursor?

Run npx mcp-add --name mem0-mcp --type http --url "https://mcp.mem0.ai/mcp" --clients "claude code" (or "cursor"). On first use the client opens a browser to sign in to your Mem0 account via OAuth and authorize access, after which the memory tools become available.

Is Mem0 MCP hosted or self-hosted?

The official server at https://mcp.mem0.ai/mcp is a hosted cloud service — no local install is required; you just connect and authenticate. Mem0's core memory library is open source, so self-hosting your own memory stack is possible, but the official MCP endpoint described here is the hosted option.