{"id":51466920,"url":"https://github.com/andresmorales07/mem0-mcp","last_synced_at":"2026-07-06T12:30:29.358Z","repository":{"id":369503941,"uuid":"1290122630","full_name":"andresmorales07/mem0-mcp","owner":"andresmorales07","description":"MCP server wrapping a self-hosted mem0 REST API for Claude Desktop/Code","archived":false,"fork":false,"pushed_at":"2026-07-05T16:23:05.000Z","size":53,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-05T17:14:44.852Z","etag":null,"topics":["claude","claude-desktop","mcp","mcp-server","mem0","model-context-protocol"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andresmorales07.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-07-05T15:51:18.000Z","updated_at":"2026-07-05T16:21:59.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/andresmorales07/mem0-mcp","commit_stats":null,"previous_names":["andresmorales07/mem0-mcp"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/andresmorales07/mem0-mcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andresmorales07%2Fmem0-mcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andresmorales07%2Fmem0-mcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andresmorales07%2Fmem0-mcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andresmorales07%2Fmem0-mcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andresmorales07","download_url":"https://codeload.github.com/andresmorales07/mem0-mcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andresmorales07%2Fmem0-mcp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35191767,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-06T02:00:07.184Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["claude","claude-desktop","mcp","mcp-server","mem0","model-context-protocol"],"created_at":"2026-07-06T12:30:20.749Z","updated_at":"2026-07-06T12:30:29.298Z","avatar_url":"https://github.com/andresmorales07.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mem0-mcp\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n\nA small MCP server that wraps a self-hosted [mem0](https://mem0.ai) REST API\n(see `../server-compose-files/ai-containers`) as tools for Claude Desktop /\nClaude Code. Mem0's own official MCP integrations (`mcp.mem0.ai`, the archived\n`mem0-mcp-server` package) only target Mem0's cloud API — different auth\nscheme (`Authorization: Token ...` vs. this server's `X-API-Key`) and\ndifferent routes — so they don't work against a self-hosted instance. This\nwraps the self-hosted REST API directly instead.\n\n## Tools\n\n| Tool | mem0 endpoint |\n|---|---|\n| `add_memory` | `POST /memories` |\n| `search_memories` | `POST /search` |\n| `list_memories` | `GET /memories` |\n| `get_memory` | `GET /memories/{id}` |\n| `update_memory` | `PUT /memories/{id}` |\n| `delete_memory` | `DELETE /memories/{id}` |\n\nBulk operations (`delete_all_memories`, `/reset`) are intentionally not\nexposed — keeps the blast radius of an LLM-driven tool call small. Use `curl`\ndirectly against the API for those.\n\n## Setup\n\nRequires an API key from the mem0 dashboard (`/setup` on first run, or the\nAPI Keys page after) and the URL your machine can reach the mem0 API at.\n\nAdd to Claude Desktop's config\n(`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS).\nTwo ways to run it, depending on whether you've cloned the repo:\n\n**Without cloning**, straight from GitHub — same `uvx --from git+...` pattern\nother MCP servers use to run from a repo without publishing to PyPI first:\n\n```bash\nuvx --from git+https://github.com/andresmorales07/mem0-mcp mem0-mcp\n```\n\n```json\n{\n  \"mcpServers\": {\n    \"mem0\": {\n      \"command\": \"uvx\",\n      \"args\": [\"--from\", \"git+https://github.com/andresmorales07/mem0-mcp\", \"mem0-mcp\"],\n      \"env\": {\n        \"MEM0_API_URL\": \"http://your-mem0-host:8888\",\n        \"MEM0_API_KEY\": \"m0sk_...\",\n        \"MEM0_DEFAULT_USER_ID\": \"your-user-id\",\n        \"MEM0_DEFAULT_AGENT_ID\": \"claude-desktop\"\n      }\n    }\n  }\n}\n```\n\nPrefer to pin to a released version instead of tracking `main`? Append a ref,\ne.g. `git+https://github.com/andresmorales07/mem0-mcp@v0.1.0`.\n\n**From a local clone:**\n\n```json\n{\n  \"mcpServers\": {\n    \"mem0\": {\n      \"command\": \"uv\",\n      \"args\": [\"run\", \"--directory\", \"/path/to/mem0-mcp\", \"mem0-mcp\"],\n      \"env\": {\n        \"MEM0_API_URL\": \"http://your-mem0-host:8888\",\n        \"MEM0_API_KEY\": \"m0sk_...\",\n        \"MEM0_DEFAULT_USER_ID\": \"your-user-id\",\n        \"MEM0_DEFAULT_AGENT_ID\": \"claude-desktop\"\n      }\n    }\n  }\n}\n```\n\nUse the full path to `uv`/`uvx` (e.g. `which uv`) if Claude Desktop can't find\nthem on its own `PATH`.\n\nBoth default env vars are optional, and they behave differently:\n\n- `MEM0_DEFAULT_USER_ID` is a last-resort fallback — only used when a tool\n  call supplies no `user_id`, `agent_id`, or `run_id` at all. Applies to both\n  reads and writes.\n- `MEM0_DEFAULT_AGENT_ID` is merged in **only on `add_memory`** (unless that\n  call passes its own `agent_id`), tagging every memory this server writes\n  with which client created it — useful if you ever point another tool (n8n,\n  a different agent) at the same mem0 instance and want to tell them apart\n  later.\n\n  It's deliberately **not** applied to `search_memories`/`list_memories`. MCP\n  tool calls can't distinguish \"no agent_id given\" from \"search across all\n  agents,\" so auto-tagging reads would silently and permanently scope every\n  query to just this one agent — making it impossible to ever ask \"show me\n  everything anyone has learned about me\" again. Reads default to whatever\n  `user_id`/`agent_id`/`run_id` the model explicitly passes (plus the\n  `MEM0_DEFAULT_USER_ID` fallback above); pass `agent_id` explicitly on a read\n  if you want to narrow it to one agent's memories.\n\nRestart Claude Desktop after editing the config. Claude will prompt for\npermission the first time it calls one of these tools.\n\n## Manual test\n\n```bash\nMEM0_API_URL=http://your-mem0-host:8888 MEM0_API_KEY=m0sk_... uv run python -c \"\nfrom mem0_mcp.server import list_memories\nprint(list_memories(user_id='alice'))\n\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandresmorales07%2Fmem0-mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandresmorales07%2Fmem0-mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandresmorales07%2Fmem0-mcp/lists"}