feat: add Mem0 plugin for Claude Code and Cursor#4518
Conversation
Add plugin structure for the Claude Code marketplace with MCP server configuration (mem0-mcp-server via uvx) and the mem0 integration skill.
- Add version, repository, and license to plugin.json - Remove optional MEM0_DEFAULT_USER_ID from .mcp.json env
Users can now install the mem0 plugin directly from the repo: /plugin marketplace add mem0ai/mem0 /plugin install mem0@mem0
Pre-stable release versioning for plugin, marketplace, and skill.
|
|
Switch from launching a local mem0-mcp-server process via uvx to connecting directly to the hosted MCP at mcp.mem0.ai.
Add 5 lifecycle hooks that integrate with the Mem0 MCP server: - SessionStart: bootstraps mem0 context on startup/resume/compact - PreToolUse: blocks writes to MEMORY.md, redirects to mem0 MCP - PreCompact: prompts session summary + direct API transcript capture - Stop: prompts learnings persistence + background transcript capture - TaskCompleted: prompts extraction of task learnings Also fix .mcp.json to use standard mcpServers wrapper with type: http.
Search mem0 for relevant memories on every user message and inject them as context before Claude processes the prompt. Skips short prompts (< 20 chars) and uses a 3s timeout to minimize latency.
Remove stale uv/uvx prerequisite, fix MCP server description to reflect remote HTTP setup, add step-by-step API key instructions with verification, add post-install verification section, and replace fictional skill install methods with plugin reference.
Restructure README into numbered steps so it's obvious that MEM0_API_KEY setup is a prerequisite for both Claude Code and Cursor plugin installation. Also add Cursor plugin files, logo, and update marketplace source path.
|
Hi @gabrielstein-mem0, thank you so much for the PR. Wondering why do we need two separate skills. We already have skills in our main repo, can we not improve that and reuse it? |
|
Also, can you please sign the CLA @gabrielstein-mem0 ? |
These skills are specifically packaged within the plugin so that new users who don't have the skills already installed, get them immediately. This is especially useful when we are live in the official claude and cursor marketplace and will have more non-technical people installing the plugin via these tools. Unfortunately we have no choice but to duplicate. |
Can we instead add a bash script or something that will download this from our repo? Since the repo is public? |
|
I think for now we can merge it as it is. The plugins have to ship with the skills bundled, for them to be indexed correctly. I think we can look into adding another script into the build process where we copy the skills from root directory, but this shouldn't be a blocker for now. (Pasting here from slack discussion) |
Summary
Adds an official Mem0 plugin for Claude Code and Cursor, giving both tools persistent memory via the Mem0 MCP server.
What's included
.claude-plugin/plugin.json,.cursor-plugin/plugin.json, and MCP config (.mcp.json) connecting to the remote Mem0 MCP server atmcp.mem0.ai(no local dependencies).claude-plugin/marketplace.jsonat the repo root for self-hosted plugin distribution (/plugin marketplace add mem0ai/mem0)skills/mem0/with SKILL.md, 7 reference docs (quickstart, SDK guide, API reference, architecture, features, integration patterns, use cases), a live doc search script, and Apache-2.0 LICENSEdocs/openapi.jsonandpyproject.tomlto usesupport@mem0.aiPlugin directory structure
Test plan
/plugin marketplace add mem0ai/mem0and/plugin install mem0@mem0-pluginsin Claude Codeadd_memory,search_memories, etc.) connect and respondmem0aipackage runtime code