Persistent memory for Claude Code via mem0. Fully implicit — no manual commands. Stores preferences, architecture facts and known issues across projects using Qdrant (vector) + optional Neo4j (graph).
Persistent memory for Claude Code via mem0. Fully implicit — no manual commands.
Stores personal preferences, project architecture facts, and known issues across projects using Qdrant (vector) and optional Neo4j (graph).
# Add marketplace (one-time)
/plugin marketplace add wuffig-coding-solutions/agent-plugins
# Install plugin
/plugin install mem0@agent-plugins
# Set credentials (hooks)
export MEM0_API_KEY=your-key
export MEM0_USER_ID=your-username
Restart Claude Code. Done.
| Hook | When | Action |
|---|---|---|
SessionStart | Session begins | Load user prefs + project context |
UserPromptSubmit | Every prompt | Search mem0, inject relevant memories |
Stop | Every response | Extract + save new facts |
PostCompact | After /compact | Re-inject project context |
SubagentStart | Subagent spawned | Inject task-relevant context |
SubagentStop | Subagent done | Save subagent findings |
Notification | Claude waiting | Desktop notification |
user_id: "your-username" → global preferences, cross-project patterns
agent_id: "project-name" → project stack, architecture, debug insights
agent_id is auto-detected from the current directory name. Override:
export MEM0_AGENT_ID=my-project
cd scripts && docker compose up -d
Starts Qdrant on localhost:6333 and Neo4j on localhost:7687.
With Neo4j configured, mem0 automatically uses graph memory (Mem0ᵍ).
| Variable | Default | Description |
|---|---|---|
MEM0_API_KEY | required | From app.mem0.ai or self-hosted |
MEM0_USER_ID | user | Your user identifier |
MEM0_AGENT_ID | auto (dir name) | Project identifier |
MEM0_TOP_K | 5 | Max memories per search |
MEM0_USER_THRESHOLD | 0.35 | Min score, user scope |
MEM0_AGENT_THRESHOLD | 0.25 | Min score, project scope |
MEM0_MAX_MESSAGES | 20 | Max messages saved per session |
NEO4J_URI | — | Enable graph memory |
NEO4J_USER | neo4j | Neo4j username |
NEO4J_PASSWORD | — | Neo4j password |
The plugin connects to the mem0 gateway via Streamable HTTP with OAuth2.
Claude Code handles authentication automatically on first connect — no
tokens to manage. Claude can proactively call search_memory,
add_memories, and list_memories in addition to the automatic hooks.
Run /mem0:audit to review memory quality and get improvement suggestions
for the extraction prompt.
External network access
Connects to servers outside your machine
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
npx claudepluginhub wuffig-coding-solutions/mem0-pluginAutomatically maintains a structured knowledge base in docs/ and keeps CLAUDE.md in sync. Claude is briefed at session start via a routing table injected by the SessionStart hook.
Permanent coding companion for Claude Code — survives any update. MCP-based terminal pet with ASCII art, stats, reactions, and personality.
Upstash Context7 MCP server for up-to-date documentation lookup. Pull version-specific documentation and code examples directly from source repositories into your LLM context.
Intelligent prompt optimization: injects the right context at the right moment so Claude lands a better first output. Clarifies vague prompts with research-based questions, plus targeted nudges for approach selection, plan readability, workflow routing, background execution, subagent routing, output readability, user-decision questions, and plan-mode assessment