mem0 Memory System
A flexible memory system for AI applications that supports multiple LLM providers and can be used either as an MCP server or as a direct library integration, enabling autonomous memory management without explicit commands.
What is mem0 Memory System?
mem0 Memory System is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to flexible memory system for ai applications that supports multiple llm providers and can be used either as an mcp server or as a direct library integration, enabling autonomous memory management withou...
A flexible memory system for AI applications that supports multiple LLM providers and can be used either as an MCP server or as a direct library integration, enabling autonomous memory management without explicit commands.
This server falls under the Knowledge & Memory category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- A flexible memory system for AI applications that supports m
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx mem0-memory-systemConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use mem0 Memory System
The mem0 MCP Server (pinkpixel-dev/mem0-mcp) is a flexible, persistent memory layer for AI assistants that supports multiple storage backends — Mem0 cloud, Supabase, and local storage — and multiple LLM providers. It exposes three tools (add_memory, search_memory, delete_memory) that allow AI assistants to autonomously store and retrieve information across sessions without requiring explicit user commands, enabling contextually aware AI agents that remember preferences, past interactions, and project-specific knowledge.
Prerequisites
- Node.js 18 or later (for npx or global npm install)
- A storage backend — choose one: Mem0 cloud account (mem0.ai) for hosted storage, Supabase project for self-hosted vector storage, or local storage (no external account needed)
- For Mem0 cloud storage: a MEM0_API_KEY from mem0.ai
- For Supabase or local storage: an OpenAI API key (OPENAI_API_KEY) to generate embeddings
- An MCP client such as Claude Desktop, Cursor, or Cline
Choose your storage backend and get credentials
Decide which storage backend to use. For the simplest setup, create a free account at mem0.ai and copy your API key. For Supabase, create a project and note your project URL and anon key. Local storage requires only an OpenAI API key for embeddings.
Configure your MCP client for Mem0 cloud storage
Add the mem0-mcp server to your MCP client config using npx. Set MEM0_API_KEY and configure the default user/agent/app IDs to scope memories correctly.
{
"mcpServers": {
"mem0-mcp": {
"command": "npx",
"args": ["-y", "@pinkpixel/mem0-mcp"],
"env": {
"MEM0_API_KEY": "your_mem0_api_key",
"DEFAULT_USER_ID": "user123",
"DEFAULT_AGENT_ID": "assistant",
"DEFAULT_APP_ID": "my-project"
},
"alwaysAllow": ["add_memory", "search_memory", "delete_memory"]
}
}
}Or configure for Supabase storage
To use Supabase as the vector store, provide your Supabase URL, anon key, and an OpenAI API key for generating embeddings.
{
"mcpServers": {
"mem0-mcp": {
"command": "npx",
"args": ["-y", "@pinkpixel/mem0-mcp"],
"env": {
"SUPABASE_URL": "https://your-project.supabase.co",
"SUPABASE_KEY": "your_supabase_anon_key",
"OPENAI_API_KEY": "sk-...",
"DEFAULT_USER_ID": "user123"
}
}
}
}Restart your MCP client
Restart Claude Desktop or your chosen MCP client to load the mem0 server. The add_memory, search_memory, and delete_memory tools will be available to the AI.
Test memory storage
Ask your AI assistant to remember a piece of information and then query it back in a follow-up message to confirm persistence.
mem0 Memory System Examples
Client configuration
Claude Desktop configuration using the Mem0 cloud backend with npx.
{
"mcpServers": {
"mem0-mcp": {
"command": "npx",
"args": ["-y", "@pinkpixel/mem0-mcp"],
"env": {
"MEM0_API_KEY": "your_mem0_api_key",
"DEFAULT_USER_ID": "user123",
"DEFAULT_AGENT_ID": "assistant",
"DEFAULT_APP_ID": "my-project"
},
"alwaysAllow": ["add_memory", "search_memory", "delete_memory"]
}
}
}Prompts to try
The AI assistant can autonomously manage memories, or you can explicitly direct it to remember and recall information.
- "Remember that my preferred code style is 2-space indentation with single quotes in JavaScript"
- "What do you remember about my project preferences?"
- "Search your memory for anything I told you about my database setup"
- "Forget the memory about my old API endpoint"
- "Store that my name is Alice and I work on the payments team"Troubleshooting mem0 Memory System
Memories are not persisting between sessions
Ensure DEFAULT_USER_ID is set consistently in the env block. Memories are scoped by userId; if the ID changes between sessions, previous memories will not be found. Verify MEM0_API_KEY or your storage credentials are correct.
Package not found: @pinkpixel/mem0-mcp
The package name is @pinkpixel/mem0-mcp (not mem0-memory-system or @pinkpixel-dev/mem0-mcp). Use the exact npx command: npx -y @pinkpixel/mem0-mcp. Alternatively install via Smithery: npx -y @smithery/cli install @pinkpixel-dev/mem0-mcp-server --client claude.
Embedding errors when using Supabase or local storage
Both Supabase and local storage modes require an OpenAI API key to generate memory embeddings. Set OPENAI_API_KEY in the env block. Confirm the key is valid and has access to the text-embedding models.
Frequently Asked Questions about mem0 Memory System
What is mem0 Memory System?
mem0 Memory System is a Model Context Protocol (MCP) server that flexible memory system for ai applications that supports multiple llm providers and can be used either as an mcp server or as a direct library integration, enabling autonomous memory management without explicit commands. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install mem0 Memory System?
Follow the installation instructions on the mem0 Memory System GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with mem0 Memory System?
mem0 Memory System works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is mem0 Memory System free to use?
Yes, mem0 Memory System is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.
mem0 Memory System Alternatives — Similar Knowledge & Memory Servers
Looking for alternatives to mem0 Memory System? Here are other popular knowledge & memory servers you can use with Claude, Cursor, and VS Code.
MemPalace
★ 52.6kA local AI memory system that stores all conversations verbatim and organizes them into navigable structures. It provides 19 MCP tools for AI assistants to search and retrieve past decisions, debugging sessions, and architecture debates automatically
Kratos
★ 25.7k🏛️ Memory System for AI Coding Tools - Never explain your codebase again. MCP server with perfect project isolation, 95.8% context accuracy, and the Four Pillars Framework.
Context Mode
★ 15.4kAn MCP server that preserves LLM context by intercepting large data outputs and returning only concise summaries or relevant sections. It enables efficient sandboxed code execution, file processing, and documentation indexing across multiple programm
Memu
★ 13.7kMemory for 24/7 proactive agents like OpenClaw.
MemOS
★ 9.3kMemOS (Memory Operating System) is a memory management operating system designed for AI applications. Its goal is: to enable your AI system to have long-term memory like a human, not only remembering what users have said but also actively invoking, u
Everos
★ 5.4kBuild, evaluate, and integrate long-term memory for self-evolving agents.
Browse More Knowledge & Memory MCP Servers
Explore all knowledge & memory servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up mem0 Memory System in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use mem0 Memory System?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.