repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
public Clawd ADK gateway launch mirror
stars
latest
clone command
git clone gitlawb://did:key:z6Mkq5mY...iFZ5/my-project-publ...git clone gitlawb://did:key:z6Mkq5mY.../my-project-publ...2fa351d6docs: add automaton and perps launch sources16d ago| #1 | --- |
| #2 | title: "Mem0 MCP" |
| #3 | description: "Connect any AI client to Mem0 using Model Context Protocol in minutes" |
| #4 | icon: "puzzle-piece" |
| #5 | estimatedTime: "~5 minutes" |
| #6 | --- |
| #7 | |
| #8 | <Info> |
| #9 | **Prerequisites** |
| #10 | - Mem0 Platform account ([Sign up here](https://app.mem0.ai)) |
| #11 | - API key ([Get one from dashboard](https://app.mem0.ai/settings/api-keys)) |
| #12 | - Python 3.10+, Docker, or Node.js 14+ |
| #13 | - An MCP-compatible client (Claude Desktop, Cursor, or custom agent) |
| #14 | </Info> |
| #15 | |
| #16 | ## What is Mem0 MCP? |
| #17 | |
| #18 | Mem0 MCP Server exposes Mem0's memory capabilities as MCP tools, letting AI agents decide when to save, search, or update information. |
| #19 | |
| #20 | ## Deployment Options |
| #21 | |
| #22 | Choose from three deployment methods: |
| #23 | |
| #24 | 1. **Python Package (Recommended)** - Install locally with `uvx` for instant setup |
| #25 | 2. **Docker Container** - Isolated deployment with HTTP endpoint |
| #26 | 3. **Smithery** - Remote hosted service for managed deployments |
| #27 | |
| #28 | ## Available Tools |
| #29 | |
| #30 | The MCP server exposes these memory tools to your AI client: |
| #31 | |
| #32 | | Tool | Description | |
| #33 | |------|-------------| |
| #34 | | `add_memory` | Save text or conversation history for a user/agent | |
| #35 | | `search_memories` | Semantic search across existing memories with filters | |
| #36 | | `get_memories` | List memories with structured filters and pagination | |
| #37 | | `get_memory` | Retrieve one memory by its `memory_id` | |
| #38 | | `update_memory` | Overwrite a memory's text after confirming the ID | |
| #39 | | `delete_memory` | Delete a single memory by `memory_id` | |
| #40 | | `delete_all_memories` | Bulk delete all memories in scope | |
| #41 | | `delete_entities` | Delete a user/agent/app/run entity and its memories | |
| #42 | | `list_entities` | Enumerate users/agents/apps/runs stored in Mem0 | |
| #43 | |
| #44 | --- |
| #45 | |
| #46 | ## Quickstart with Python (UVX) |
| #47 | |
| #48 | <Steps> |
| #49 | <Step title="Install the MCP Server"> |
| #50 | ```bash |
| #51 | uv pip install mem0-mcp-server |
| #52 | ``` |
| #53 | </Step> |
| #54 | |
| #55 | <Step title="Configure your MCP client"> |
| #56 | Add this to your MCP client (e.g., Claude Desktop): |
| #57 | |
| #58 | ```json |
| #59 | { |
| #60 | "mcpServers": { |
| #61 | "mem0": { |
| #62 | "command": "uvx", |
| #63 | "args": ["mem0-mcp-server"], |
| #64 | "env": { |
| #65 | "MEM0_API_KEY": "m0-...", |
| #66 | "MEM0_DEFAULT_USER_ID": "your-handle" |
| #67 | } |
| #68 | } |
| #69 | } |
| #70 | } |
| #71 | ``` |
| #72 | |
| #73 | Set your environment variables: |
| #74 | |
| #75 | ```bash |
| #76 | export MEM0_API_KEY="m0-..." |
| #77 | export MEM0_DEFAULT_USER_ID="your-handle" |
| #78 | ``` |
| #79 | </Step> |
| #80 | |
| #81 | <Step title="Test with the Python agent"> |
| #82 | ```bash |
| #83 | # Clone the mem0-mcp repository |
| #84 | git clone https://github.com/mem0ai/mem0-mcp.git |
| #85 | cd mem0-mcp |
| #86 | |
| #87 | # Set your API keys |
| #88 | export MEM0_API_KEY="m0-..." |
| #89 | export OPENAI_API_KEY="sk-openai-..." |
| #90 | |
| #91 | # Run the interactive agent |
| #92 | python example/pydantic_ai_repl.py |
| #93 | ``` |
| #94 | |
| #95 | **Sample Interactions:** |
| #96 | |
| #97 | ``` |
| #98 | User: Remember that I love tiramisu |
| #99 | Agent: Got it! I've saved that you love tiramisu. |
| #100 | |
| #101 | User: What do you know about my food preferences? |
| #102 | Agent: Based on your memories, you love tiramisu. |
| #103 | |
| #104 | User: Update my project: the mobile app is now 80% complete |
| #105 | Agent: Updated your project status successfully. |
| #106 | ``` |
| #107 | </Step> |
| #108 | |
| #109 | <Step title="Verify the setup"> |
| #110 | Your AI client can now: |
| #111 | - Automatically save information with `add_memory` |
| #112 | - Search memories with `search_memories` |
| #113 | - Update memories with `update_memory` |
| #114 | - Delete memories with `delete_memory` |
| #115 | |
| #116 | <Info icon="check"> |
| #117 | If you get "Connection failed", ensure your API key is valid and the server is running. |
| #118 | </Info> |
| #119 | </Step> |
| #120 | </Steps> |
| #121 | |
| #122 | --- |
| #123 | |
| #124 | ## Quickstart with Docker |
| #125 | |
| #126 | <Steps> |
| #127 | <Step title="Build the Docker image"> |
| #128 | ```bash |
| #129 | docker build -t mem0-mcp-server https://github.com/mem0ai/mem0-mcp.git |
| #130 | ``` |
| #131 | </Step> |
| #132 | |
| #133 | <Step title="Run the container"> |
| #134 | ```bash |
| #135 | docker run --rm -d \ |
| #136 | --name mem0-mcp \ |
| #137 | -e MEM0_API_KEY="m0-..." \ |
| #138 | -p 8080:8081 \ |
| #139 | mem0-mcp-server |
| #140 | ``` |
| #141 | </Step> |
| #142 | |
| #143 | <Step title="Configure your client for HTTP"> |
| #144 | For clients that connect via HTTP (instead of stdio): |
| #145 | |
| #146 | ```json |
| #147 | { |
| #148 | "mcpServers": { |
| #149 | "mem0-docker": { |
| #150 | "command": "curl", |
| #151 | "args": ["-X", "POST", "http://localhost:8080/mcp", "--data-binary", "@-"], |
| #152 | "env": { |
| #153 | "MEM0_API_KEY": "m0-..." |
| #154 | } |
| #155 | } |
| #156 | } |
| #157 | } |
| #158 | ``` |
| #159 | </Step> |
| #160 | |
| #161 | <Step title="Verify the setup"> |
| #162 | ```bash |
| #163 | # Check container logs |
| #164 | docker logs mem0-mcp |
| #165 | |
| #166 | # Test HTTP endpoint |
| #167 | curl http://localhost:8080/health |
| #168 | ``` |
| #169 | |
| #170 | <Info icon="check"> |
| #171 | The container should start successfully and respond to HTTP requests. If port 8080 is occupied, change it with `-p 8081:8081`. |
| #172 | </Info> |
| #173 | </Step> |
| #174 | </Steps> |
| #175 | |
| #176 | --- |
| #177 | |
| #178 | ## Quickstart with Smithery (Hosted) |
| #179 | |
| #180 | For the simplest integration, use Smithery's hosted Mem0 MCP server - no installation required. |
| #181 | |
| #182 | **Example: One-click setup in Cursor** |
| #183 | |
| #184 | 1. Visit [smithery.ai/server/@mem0ai/mem0-memory-mcp](https://smithery.ai/server/@mem0ai/mem0-memory-mcp) and select Cursor as your client |
| #185 | |
| #186 |  |
| #187 | |
| #188 | 2. Open Cursor → Settings → MCP |
| #189 | 3. Click `mem0-mcp` → Initiate authorization |
| #190 | 4. Configure Smithery with your environment: |
| #191 | - `MEM0_API_KEY`: Your Mem0 API key |
| #192 | - `MEM0_DEFAULT_USER_ID`: Your user ID |
| #193 | - `MEM0_ENABLE_GRAPH_DEFAULT`: Optional, set to `true` for graph memories |
| #194 | 5. Return to Cursor settings and wait for tools to load |
| #195 | 6. Start chatting with Cursor and begin storing preferences |
| #196 | |
| #197 | **For other clients:** |
| #198 | Visit [smithery.ai/server/@mem0ai/mem0-memory-mcp](https://smithery.ai/server/@mem0ai/mem0-memory-mcp) to connect any MCP-compatible client with your Mem0 credentials. |
| #199 | |
| #200 | --- |
| #201 | |
| #202 | ## Quick Recovery |
| #203 | |
| #204 | - **"uvx command not found"** → Install with `pip install uv` or use `pip install mem0-mcp-server` instead. Make sure your Python environment has `uv` installed (or system-wide). |
| #205 | - **"Connection refused"** → Check that the server is running and the correct port is configured |
| #206 | - **"Invalid API key"** → Get a new key from [Mem0 Dashboard](https://app.mem0.ai/settings/api-keys) |
| #207 | - **"Permission denied"** → Ensure Docker has access to bind ports (try with `sudo` on Linux) |
| #208 | |
| #209 | --- |
| #210 | |
| #211 | ## Next Steps |
| #212 | |
| #213 | <CardGroup cols={2}> |
| #214 | <Card |
| #215 | title="MCP Integration Feature" |
| #216 | description="Learn about MCP configuration options and advanced patterns" |
| #217 | icon="plug" |
| #218 | href="/platform/features/mcp-integration" |
| #219 | /> |
| #220 | <Card |
| #221 | title="Gemini 3 with Mem0 MCP" |
| #222 | description="See how to integrate Gemini 3 with Mem0 MCP server" |
| #223 | icon="book-open" |
| #224 | href="/cookbooks/frameworks/gemini-3-with-mem0-mcp" |
| #225 | /> |
| #226 | </CardGroup> |
| #227 | |
| #228 | ## Additional Resources |
| #229 | |
| #230 | - **[Mem0 MCP Repository](https://github.com/mem0ai/mem0-mcp)** - Source code and examples |
| #231 | - **[Platform Quickstart](/platform/quickstart)** - Direct API integration guide |
| #232 | - **[MCP Specification](https://modelcontextprotocol.io)** - Learn about MCP protocol |