Mem0 MCP Server

A Model Context Protocol server that can store and retrieve memories for LLM context control

Local serverstdioGo

What is the Mem0 MCP MCP server?

A Model Context Protocol server that can store and retrieve memories for LLM context control. The mem0 mcp mcp server wraps that behind the Model Context Protocol, so an assistant can use it through 4 defined tools rather than through you.

What it actually does

A Model Context Protocol (MCP) server that integrates with Mem0.ai to provide persistent memory capabilities for LLMs. It allows AI agents to store and retrieve information across sessions.

Its toolset

Everything the assistant can do here goes through one of these:

  • Inputs — ** content (string) or messages (array of role/content objects), userId (string), runId / sessionId (string), agentId (string), appId (string)
  • Behavior — ** Cloud V3 additions are asynchronous. By default, this tool polls the background queue until completed. Pass waitForCompletion: false to get the
  • Requires — A Mem0 API key
  • Self-contained — All data stays on your machine

Configuration

You will need 8 environment variables: MEM0_API_KEY, DEFAULT_USER_ID, DEFAULT_AGENT_ID, DEFAULT_APP_ID, SUPABASE_URL, SUPABASE_KEY, OPENAI_API_KEY, ORG_ID. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

This server supports three storage modes: 1. Cloud Storage Mode ☁️ (Recommended for production) * Requires a Mem0 API key (provided as MEM0_API_KEY environment variable) * Memories are persistently stored on Mem0's cloud servers * No local database needed * Full feature support with advanced filtering and search 2. Supabase Storage Mode 🗄️ (Recommended for self-hosting) * Requires

Adding it to your client

Installation goes through your MCP client rather than a global install: point it at @smithery/cli on npm and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.

When to reach for it

Plenty of AI and media services servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. Mem0 MCP's toolset — Inputs, Behavior, Requires and 1 more — is a fair guide to whether it matches your workflow. It is maintained by pinkpixel-dev; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Caveats

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the mem0 mcp mcp server does with a few real requests.

Available tools

ToolWhat it does
Inputs** content (string) or messages (array of role/content objects), userId (string), runId / sessionId (string), agentId (string), appId (string), metadata (object), infer (boolean), customInstructions (string), waitForComp
Behavior** Cloud V3 additions are asynchronous. By default, this tool polls the background queue until completed. Pass waitForCompletion: false to get the eventId immediately.
RequiresA Mem0 API key
Self-containedAll data stays on your machine

How to install the Mem0 MCP MCP server

{
  "mcpServers": {
    "mem0-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@pinkpixel/mem0-mcp"
      ],
      "env": {
        "MEM0_API_KEY": "YOUR_MEM0_API_KEY_HERE",
        "DEFAULT_USER_ID": "user123",
        "ORG_ID": "your-org-id",
        "PROJECT_ID": "your-project-id"
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

This server supports three storage modes: 1. Cloud Storage Mode ☁️ (Recommended for production) * Requires a Mem0 API key (provided as MEM0_API_KEY environment variable) * Memories are persistently stored on Mem0's cloud servers * No local database needed * Full feature support with advanced filtering and search 2. Supabase Storage Mode 🗄️ (Recommended for self-hosting) * Requires

VariableDescriptionRequired
MEM0_API_KEYCredential the server authenticates with.Yes
DEFAULT_USER_IDConfiguration value read at startup.Optional
DEFAULT_AGENT_IDConfiguration value read at startup.Optional
DEFAULT_APP_IDConfiguration value read at startup.Optional
SUPABASE_URLEndpoint or connection string the server talks to.Yes
SUPABASE_KEYCredential the server authenticates with.Yes
OPENAI_API_KEYCredential the server authenticates with.Yes
ORG_IDConfiguration value read at startup.Optional

Example prompts to try

  • Use Mem0 MCP to Inputs.
  • Use Mem0 MCP to Behavior.
  • Use Mem0 MCP to Requires.

Frequently asked questions

It connects Mem0 MCP to MCP-compatible AI assistants such as Claude and Cursor, exposing 4 tools (Inputs, Behavior, Requires, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Mem0 MCP directly.