Skip to content
Back to search

mem0-mcp

> [!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,…

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/mem0ai--mem0-mcp/badge.svg)](/listings/mem0ai--mem0-mcp)

HTML

<a href="/listings/mem0ai--mem0-mcp"><img src="/api/listings/mem0ai--mem0-mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

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

<details> <summary><strong>Click to expand: Test with the Python Agent</strong></summary>

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

</details>

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 233 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. > [!CAUTION]
  2. > ## This project has been archived
  3. >
  4. > **mem0-mcp-server** is no longer actively maintained and this repository is now a public archive.
  5. >
  6. > 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.
  7. >
  8. > **Looking for Mem0 MCP?** We now offer an official cloud-hosted MCP server. Check out the [docs](https://docs.mem0.ai/platform/mem0-mcp) to get started.
  9. >
  10. > **Quick install across all major clients:**
  11. > ```bash
  12. > npx mcp-add \
  13. > --name mem0-mcp \
  14. > --type http \
  15. > --url "https://mcp.mem0.ai/mcp" \
  16. > --clients "claude,claude code,cursor,windsurf,vscode,opencode"
  17. > ```
  18. # Mem0 MCP Server
  19. [![PyPI version](https://img.shields.io/pypi/v/mem0-mcp-server.svg)](https://pypi.org/project/mem0-mcp-server/) [![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE) [![smithery badge](https://smithery.ai/badge/@mem0ai/mem0-memory-mcp)](https://smithery.ai/server/@mem0ai/mem0-memory-mcp)
  20. `mem0-mcp-server` wraps the official [Mem0](https://mem0.ai) 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.
  21. ## Tools
  22. The server exposes the following tools to your LLM:
  23. | Tool | Description |
  24. | --------------------- | --------------------------------------------------------------------------------- |
  25. | `add_memory` | Save text or conversation history (or explicit message objects) for a user/agent. |
  26. | `search_memories` | Semantic search across existing memories (filters + limit supported). |
  27. | `get_memories` | List memories with structured filters and pagination. |
  28. | `get_memory` | Retrieve one memory by its `memory_id`. |
  29. | `update_memory` | Overwrite a memory's text once the user confirms the `memory_id`. |
  30. | `delete_memory` | Delete a single memory by `memory_id`. |
  31. | `delete_all_memories` | Bulk delete all memories in the confirmed scope (user/agent/app/run). |
  32. | `delete_entities` | Delete a user/agent/app/run entity (and its memories). |
  33. | `list_entities` | Enumerate users/agents/apps/runs stored in Mem0. |
  34. All responses are JSON strings returned directly from the Mem0 API.
  35. ## Usage Options
  36. There are three ways to use the Mem0 MCP Server:
  37. 1. **Python Package** - Install and run locally using `uvx` with any MCP client
  38. 2. **Docker** - Containerized deployment that creates an `/mcp` HTTP endpoint
  39. 3. **Smithery** - Remote hosted service for managed deployments
  40. ## Quick Start
  41. ### Installation
  42. ```bash
  43. uv pip install mem0-mcp-server
  44. ```
  45. Or with pip:
  46. ```bash
  47. pip install mem0-mcp-server
  48. ```
  49. ### Client Configuration
  50. Add this configuration to your MCP client:
  51. ```json
  52. {
  53. "mcpServers": {
  54. "mem0": {
  55. "command": "uvx",
  56. "args": ["mem0-mcp-server"],
  57. "env": {
  58. "MEM0_API_KEY": "m0-...",
  59. "MEM0_DEFAULT_USER_ID": "your-handle"
  60. }
  61. }
  62. }
  63. }
  64. ```
  65. ### Test with the Python Agent
  66. <details>
  67. <summary><strong>Click to expand: Test with the Python Agent</strong></summary>
  68. To test the server immediately, use the included Pydantic AI agent:
  69. ```bash
  70. # Install the package
  71. pip install mem0-mcp-server
  72. # Or with uv
  73. uv pip install mem0-mcp-server
  74. # Set your API keys
  75. export MEM0_API_KEY="m0-..."
  76. export OPENAI_API_KEY="sk-openai-..."
  77. # Clone and test with the agent
  78. git clone https://github.com/mem0ai/mem0-mcp.git
  79. cd mem0-mcp-server
  80. python example/pydantic_ai_repl.py
  81. ```
  82. **Using different server configurations:**
  83. ```bash
  84. # Use with Docker container
  85. export MEM0_MCP_CONFIG_PATH=example/docker-config.json
  86. export MEM0_MCP_CONFIG_SERVER=mem0-docker
  87. python example/pydantic_ai_repl.py
  88. # Use with Smithery remote server
  89. export MEM0_MCP_CONFIG_PATH=example/config-smithery.json
  90. export MEM0_MCP_CONFIG_SERVER=mem0-memory-mcp
  91. python example/pydantic_ai_repl.py
  92. ```
  93. </details>
  94. ## What You Can Do
  95. The Mem0 MCP server enables powerful memory capabilities for your AI applications:
  96. - Remember that I'm allergic to peanuts and shellfish - Add new health information to memory
  97. - Store these trial parameters: 200 participants, double-blind, placebo-controlled study - Save research data
  98. - What do you know about my dietary preferences? - Search and retrieve all food-related memories
  99. - Update my project status: the mobile app is now 80% complete - Modify existing memory with new info
  100. - Delete all memories from 2023, I need a fresh start - Bulk remove outdated memories
  101. - Show me everything I've saved about the Phoenix project - List all memories for a specific topic
  102. ## Configuration
  103. ### Environment Variables
  104. - `MEM0_API_KEY` (required) – Mem0 platform API key.
  105. - `MEM0_DEFAULT_USER_ID` (optional) – default `user_id` injected into filters and write requests (defaults to `mem0-mcp`).
  106. - `MEM0_ENABLE_GRAPH_DEFAULT` (optional) – Enable graph memories by default (defaults to `false`).
  107. - `MEM0_MCP_AGENT_MODEL` (optional) – default LLM for the bundled agent example (defaults to `openai:gpt-4o-mini`).
  108. ## Advanced Setup
  109. <details>
  110. <summary><strong>Click to expand: Docker, Smithery, and Development</strong></summary>
  111. ### Docker Deployment
  112. To run with Docker:
  113. 1. Build the image:
  114. ```bash
  115. docker build -t mem0-mcp-server .
  116. ```
  117. 2. Run the container:
  118. ```bash
  119. docker run --rm -d \
  120. --name mem0-mcp \
  121. -e MEM0_API_KEY=m0-... \
  122. -p 8080:8081 \
  123. mem0-mcp-server
  124. ```
  125. 3. Monitor the container:
  126. ```bash
  127. # View logs
  128. docker logs -f mem0-mcp
  129. # Check status
  130. docker ps
  131. ```
  132. ### Running with Smithery Remote Server
  133. To connect to a Smithery-hosted server:
  134. 1. Install the MCP server (Smithery dependencies are now bundled):
  135. ```bash
  136. pip install mem0-mcp-server
  137. ```
  138. 2. Configure MCP client with Smithery:
  139. ```json
  140. {
  141. "mcpServers": {
  142. "mem0-memory-mcp": {
  143. "command": "npx",
  144. "args": [
  145. "-y",
  146. "@smithery/cli@latest",
  147. "run",
  148. "@mem0ai/mem0-memory-mcp",
  149. "--key",
  150. "your-smithery-key",
  151. "--profile",
  152. "your-profile-name"
  153. ],
  154. "env": {
  155. "MEM0_API_KEY": "m0-..."
  156. }
  157. }
  158. }
  159. }
  160. ```
  161. ### Development Setup
  162. Clone and run from source:
  163. ```bash
  164. git clone https://github.com/mem0ai/mem0-mcp.git
  165. cd mem0-mcp-server
  166. pip install -e ".[dev]"
  167. # Run locally
  168. mem0-mcp-server
  169. # Or with uv
  170. uv sync
  171. uv run mem0-mcp-server
  172. ```
  173. </details>
  174. ## License
  175. [Apache License 2.0](https://github.com/mem0ai/mem0-mcp/blob/main/LICENSE)

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.