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. The server exposes the following tools to your LLM: All responses are JSON strings returned directly from the Mem0 API. There are three ways to use the Mem0 MCP Server: 1. Python Pack
Add this skill
npx mdskills install mem0ai/mem0-mcpWell-documented memory API wrapper with comprehensive tooling and multiple deployment options
1# Mem0 MCP Server23[](https://pypi.org/project/mem0-mcp-server/) [](LICENSE) [](https://smithery.ai/server/@mem0ai/mem0-memory-mcp)45`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.67## Tools89The server exposes the following tools to your LLM:1011| Tool | Description |12| --------------------- | --------------------------------------------------------------------------------- |13| `add_memory` | Save text or conversation history (or explicit message objects) for a user/agent. |14| `search_memories` | Semantic search across existing memories (filters + limit supported). |15| `get_memories` | List memories with structured filters and pagination. |16| `get_memory` | Retrieve one memory by its `memory_id`. |17| `update_memory` | Overwrite a memory's text once the user confirms the `memory_id`. |18| `delete_memory` | Delete a single memory by `memory_id`. |19| `delete_all_memories` | Bulk delete all memories in the confirmed scope (user/agent/app/run). |20| `delete_entities` | Delete a user/agent/app/run entity (and its memories). |21| `list_entities` | Enumerate users/agents/apps/runs stored in Mem0. |2223All responses are JSON strings returned directly from the Mem0 API.2425## Usage Options2627There are three ways to use the Mem0 MCP Server:28291. **Python Package** - Install and run locally using `uvx` with any MCP client302. **Docker** - Containerized deployment that creates an `/mcp` HTTP endpoint313. **Smithery** - Remote hosted service for managed deployments3233## Quick Start3435### Installation3637```bash38uv pip install mem0-mcp-server39```4041Or with pip:4243```bash44pip install mem0-mcp-server45```4647### Client Configuration4849Add this configuration to your MCP client:5051```json52{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```6566### Test with the Python Agent6768<details>69<summary><strong>Click to expand: Test with the Python Agent</strong></summary>7071To test the server immediately, use the included Pydantic AI agent:7273```bash74# Install the package75pip install mem0-mcp-server76# Or with uv77uv pip install mem0-mcp-server7879# Set your API keys80export MEM0_API_KEY="m0-..."81export OPENAI_API_KEY="sk-openai-..."8283# Clone and test with the agent84git clone https://github.com/mem0ai/mem0-mcp.git85cd mem0-mcp-server86python example/pydantic_ai_repl.py87```8889**Using different server configurations:**9091```bash92# Use with Docker container93export MEM0_MCP_CONFIG_PATH=example/docker-config.json94export MEM0_MCP_CONFIG_SERVER=mem0-docker95python example/pydantic_ai_repl.py9697# Use with Smithery remote server98export MEM0_MCP_CONFIG_PATH=example/config-smithery.json99export MEM0_MCP_CONFIG_SERVER=mem0-memory-mcp100python example/pydantic_ai_repl.py101```102103</details>104105## What You Can Do106107The Mem0 MCP server enables powerful memory capabilities for your AI applications:108109- Remember that I'm allergic to peanuts and shellfish - Add new health information to memory110- Store these trial parameters: 200 participants, double-blind, placebo-controlled study - Save research data111- What do you know about my dietary preferences? - Search and retrieve all food-related memories112- Update my project status: the mobile app is now 80% complete - Modify existing memory with new info113- Delete all memories from 2023, I need a fresh start - Bulk remove outdated memories114- Show me everything I've saved about the Phoenix project - List all memories for a specific topic115116## Configuration117118### Environment Variables119120- `MEM0_API_KEY` (required) – Mem0 platform API key.121- `MEM0_DEFAULT_USER_ID` (optional) – default `user_id` injected into filters and write requests (defaults to `mem0-mcp`).122- `MEM0_ENABLE_GRAPH_DEFAULT` (optional) – Enable graph memories by default (defaults to `false`).123- `MEM0_MCP_AGENT_MODEL` (optional) – default LLM for the bundled agent example (defaults to `openai:gpt-4o-mini`).124125## Advanced Setup126127<details>128<summary><strong>Click to expand: Docker, Smithery, and Development</strong></summary>129130### Docker Deployment131132To run with Docker:1331341. Build the image:135136 ```bash137 docker build -t mem0-mcp-server .138 ```1391402. Run the container:141142 ```bash143 docker run --rm -d \144 --name mem0-mcp \145 -e MEM0_API_KEY=m0-... \146 -p 8080:8081 \147 mem0-mcp-server148 ```1491503. Monitor the container:151152 ```bash153 # View logs154 docker logs -f mem0-mcp155156 # Check status157 docker ps158 ```159160### Running with Smithery Remote Server161162To connect to a Smithery-hosted server:1631641. Install the MCP server (Smithery dependencies are now bundled):165166 ```bash167 pip install mem0-mcp-server168 ```1691702. Configure MCP client with Smithery:171 ```json172 {173 "mcpServers": {174 "mem0-memory-mcp": {175 "command": "npx",176 "args": [177 "-y",178 "@smithery/cli@latest",179 "run",180 "@mem0ai/mem0-memory-mcp",181 "--key",182 "your-smithery-key",183 "--profile",184 "your-profile-name"185 ],186 "env": {187 "MEM0_API_KEY": "m0-..."188 }189 }190 }191 }192 ```193194### Development Setup195196Clone and run from source:197198```bash199git clone https://github.com/mem0ai/mem0-mcp.git200cd mem0-mcp-server201pip install -e ".[dev]"202203# Run locally204mem0-mcp-server205206# Or with uv207uv sync208uv run mem0-mcp-server209```210211</details>212213## License214215[Apache License 2.0](https://github.com/mem0ai/mem0-mcp/blob/main/LICENSE)216
Full transparency — inspect the skill content before installing.