ClaudeCodeMod

All shelves / MCP servers

Mem0

mem0ai/mem0-mcp · 651 stars · Python · Apache-2.0

MCP server This project has been archived

Install

In your shell
pip install mem0-mcp-server

These repos do not share one command. When an entry shows a command, it was copied as published. Check the repo's README before you run it.

Open the repo

Files

README.md

[!CAUTION] ## This project has been archived mem0-mcp-server is no longer actively maintained and this repository is now a public archive. Thank you to the 640+ stargazers, 140+ forkers, and every contributor who helped shape this project. Your support and feedback meant the world to us. Looking for Mem0 MCP? We now offer an official cloud-hosted MCP server. Check out the docs to get started. Quick install across all major clients: ``bash npx mcp-add \ --name mem0-mcp \ --type http \ --url "https://mcp.mem0.ai/mcp" \ --clients "claude,claude code,cursor,windsurf,vscode,opencode" ``

Mem0 MCP Server

mem0-mcp-server wraps the official Mem0 Memory API as a Model Context Protocol (MCP) server so any MCP-compatible client (Claude Desktop, Cursor, custom agents) can add, search, update, and delete long-term memories.

Tools

The server exposes the following tools to your LLM:

All responses are JSON strings returned directly from the Mem0 API.

Usage Options

There are three ways to use the Mem0 MCP Server:

  1. Python Package - Install and run locally using uvx with any MCP client
  2. Docker - Containerized deployment that creates an /mcp HTTP endpoint
  3. Smithery - Remote hosted service for managed deployments

Quick Start

Installation

uv pip install mem0-mcp-server

Or with pip:

pip install mem0-mcp-server

Client Configuration

Add this configuration to your MCP client:

{
  "mcpServers": {
    "mem0": {
      "command": "uvx",
      "args": ["mem0-mcp-server"],
      "env": {
        "MEM0_API_KEY": "m0-...",
        "MEM0_DEFAULT_USER_ID": "your-handle"
      }
    }
  }
}

Test with the Python Agent

To test the server immediately, use the included Pydantic AI agent:

# Install the package
pip install mem0-mcp-server
# Or with uv
uv pip install mem0-mcp-server

# Set your API keys
export MEM0_API_KEY="m0-..."
export OPENAI_API_KEY="sk-openai-..."

# Clone and test with the agent
git clone https://github.com/mem0ai/mem0-mcp.git
cd mem0-mcp-server
python example/pydantic_ai_repl.py

Using different server configurations:

# Use with Docker container
export MEM0_MCP_CONFIG_PATH=example/docker-config.json
export MEM0_MCP_CONFIG_SERVER=mem0-docker
python example/pydantic_ai_repl.py

# Use with Smithery remote server
export MEM0_MCP_CONFIG_PATH=example/config-smithery.json
export MEM0_MCP_CONFIG_SERVER=mem0-memory-mcp
python example/pydantic_ai_repl.py

What You Can Do

The Mem0 MCP server enables powerful memory capabilities for your AI applications:

  • Remember that I'm allergic to peanuts and shellfish - Add new health information to memory
  • Store these trial parameters: 200 participants, double-blind, placebo-controlled study - Save research data
  • What do you know about my dietary preferences? - Search and retrieve all food-related memories
  • Update my project status: the mobile app is now 80% complete - Modify existing memory with new info
  • Delete all memories from 2023, I need a fresh start - Bulk remove outdated memories
  • Show me everything I've saved about the Phoenix project - List all memories for a specific topic

Configuration

Environment Variables

  • MEM0_API_KEY (required) – Mem0 platform API key.
  • MEM0_DEFAULT_USER_ID (optional) – default user_id injected into filters and write requests (defaults to mem0-mcp).
  • MEM0_ENABLE_GRAPH_DEFAULT (optional) – Enable graph memories by default (defaults to false).
  • MEM0_MCP_AGENT_MODEL (optional) – default LLM for the bundled agent example (defaults to openai:gpt-4o-mini).

Advanced Setup

Docker Deployment

To run with Docker:

  1. Build the image:
   docker build -t mem0-mcp-server .
  1. Run the container:
   docker run --rm -d \
     --name mem0-mcp \
     -e MEM0_API_KEY=m0-... \
     -p 8080:8081 \
     mem0-mcp-server
  1. Monitor the container:
   # View logs
   docker logs -f mem0-mcp

   # Check status
   docker ps

Running with Smithery Remote Server

To connect to a Smithery-hosted server:

  1. Install the MCP server (Smithery dependencies are now bundled):
   pip install mem0-mcp-server
  1. Configure MCP client with Smithery:
   {
     "mcpServers": {
       "mem0-memory-mcp": {
         "command": "npx",
         "args": [
           "-y",
           "@smithery/cli@latest",
           "run",
           "@mem0ai/mem0-memory-mcp",
           "--key",
           "your-smithery-key",
           "--profile",
           "your-profile-name"
         ],
         "env": {
           "MEM0_API_KEY": "m0-..."
         }
       }
     }
   }

Development Setup

Clone and run from source:

git clone https://github.com/mem0ai/mem0-mcp.git
cd mem0-mcp-server
pip install -e ".[dev]"

# Run locally
mem0-mcp-server

# Or with uv
uv sync
uv run mem0-mcp-server

License

Apache License 2.0

Facts

Kind
MCP server
Repo
mem0ai/mem0-mcp
Group
Uncategorized
Stars
651
License
Apache-2.0
Language
Python
Last push
2026-03-24
Forks
147

More on this shelf

  1. 1Everythingmodelcontextprotocol/serversThis MCP server attempts to exercise all the features of the MCP protocol. It is not intended to be a useful server, but rather a test server for builders of MCP clients. It implements prompts, tools, resources, sampling, and more to showcase MCP capabilities.85.8k
  2. 2Fetchmodelcontextprotocol/serversA Model Context Protocol server that provides web content fetching capabilities. This server enables LLMs to retrieve and process content from web pages, converting HTML to markdown for easier consumption.85.8k
  3. 3Gitmodelcontextprotocol/serversA Model Context Protocol server for Git repository interaction and automation. This server provides tools to read, search, and manipulate Git repositories via Large Language Models.85.8k
  4. 4Memorymodelcontextprotocol/serversA basic implementation of persistent memory using a local knowledge graph. This lets Claude remember information about the user across chats.85.8k
  5. 5Sequential Thinkingmodelcontextprotocol/serversAn MCP server implementation that provides a tool for dynamic and reflective problem-solving through a structured thinking process.85.8k
  6. 6Timemodelcontextprotocol/serversA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.85.8k