Mem0 MCP
A memory system using mem0 for AI applications. Enables long-term memory for AI agents as a drop-in MCP server.
Install / Use
npx skills add pinkpixel-dev/mem0-mcpInstalls into whichever agent you are using.
Quality Score
Category
Development & EngineeringSupported Platforms
README

@pinkpixel/mem0-mcp MCP Server ✨
A Model Context Protocol (MCP) server that integrates with Mem0.ai to provide persistent memory capabilities for LLMs. It allows AI agents to store and retrieve information across sessions.
This server uses the mem0ai Node.js SDK for its core functionality.
Features 🧠
Modernized & Advanced Tools (v0.8.0)
add_memory: Stores a memory from text content or structured message arrays.- Inputs:
content(string) ormessages(array of role/content objects),userId(string),runId/sessionId(string),agentId(string),appId(string),metadata(object),infer(boolean),customInstructions(string),waitForCompletion(boolean, default: true),timeoutMs(number, default: 15000) - Behavior: Cloud V3 additions are asynchronous. By default, this tool polls the background queue until completed. Pass
waitForCompletion: falseto get theeventIdimmediately.
- Inputs:
search_memories: Searches memories using semantic and BM25 hybrid filters.- Inputs:
query(string),userId(string),runId/sessionId(string),agentId(string),appId(string),filters(object),threshold(number),topK(number),rerank(boolean),referenceDate(string) - Behavior: Automatically nests scope variables inside the V3
filtersblock to prevent API validation errors.
- Inputs:
search_memory: Backward-compatible alias forsearch_memories.list_memories: Paginated listing of memory records scoped by identifiers.- Inputs:
userId(string),runId/sessionId(string),agentId(string),appId(string),filters(object),page(number),pageSize(number)
- Inputs:
get_memory: Retrieves a single memory record by its ID.- Inputs:
memoryId(string)
- Inputs:
update_memory: Modifies the text or metadata of an existing memory.- Inputs:
memoryId(string),text(string),metadata(object)
- Inputs:
delete_memory: Deletes a specific memory record by ID.- Inputs:
memoryId(string)
- Inputs:
get_memory_history: Retrieves the audit trail of memory revisions (cloud only).- Inputs:
memoryId(string)
- Inputs:
get_memory_capabilities: Exposes the feature matrix and support flags of the active backend storage mode.- Inputs: None
batch_update_memories: Performs bulk updates of text contents for multiple memories (cloud only).- Inputs:
updates(array of{ memoryId: string, text: string }objects)
- Inputs:
batch_delete_memories: Performs bulk deletions of multiple memories.- Inputs:
memoryIds(array of strings),confirm(boolean, must betrueto execute)
- Inputs:
rate_memory: Submits quality feedback evaluation for a memory record (cloud only).- Inputs:
memoryId(string),feedback(string:positive,negative,very_negative),reason(string, optional)
- Inputs:
get_memory_event: Manually retrieves details of a specific background event job (cloud only).- Inputs:
eventId(string)
- Inputs:
list_memory_events: Lists history logs of background memory processing events (cloud only).- Inputs:
page(number),pageSize(number)
- Inputs:
create_memory_export: Initiates an asynchronous memory export query job (cloud only).- Inputs:
schema(object),filters(object, optional),exportInstructions(string, optional)
- Inputs:
get_memory_export: Retrieves status and download metadata of a memory export job (cloud only).- Inputs:
exportId(string)
- Inputs:
Prerequisites 🔑
This server supports three storage modes:
-
Cloud Storage Mode ☁️ (Recommended for production)
- Requires a Mem0 API key (provided as
MEM0_API_KEYenvironment variable) - Memories are persistently stored on Mem0's cloud servers
- No local database needed
- Full feature support with advanced filtering and search
- Requires a Mem0 API key (provided as
-
Supabase Storage Mode 🗄️ (Recommended for self-hosting)
- Requires Supabase credentials (
SUPABASE_URLandSUPABASE_KEYenvironment variables) - Requires OpenAI API key (
OPENAI_API_KEYenvironment variable) for embeddings - Memories are persistently stored in your Supabase database
- Free tier available, self-hostable option
- Requires initial database setup (SQL migrations provided below)
- Requires Supabase credentials (
-
Local Storage Mode 💾 (Development/testing only)
- Requires an OpenAI API key (provided as
OPENAI_API_KEYenvironment variable) - Memories are stored in an in-memory vector database (non-persistent by default)
- Data is lost when the server restarts unless configured for persistent storage
- Requires an OpenAI API key (provided as
Installation & Configuration ⚙️
You can run this server in three main ways:
Installing via Smithery
To install Mem0 Memory Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @pinkpixel-dev/mem0-mcp-server --client claude
1. Global Installation (Recommended for frequent use)
Install the package globally and use the mem0-mcp command:
npm install -g @pinkpixel/mem0-mcp
After global installation, you can run the server directly:
mem0-mcp
Configure your MCP client to use the global command:
Cloud Storage Configuration (Global Install)
{
"mcpServers": {
"mem0-mcp": {
"command": "mem0-mcp",
"args": [],
"env": {
"MEM0_API_KEY": "YOUR_MEM0_API_KEY_HERE",
"DEFAULT_USER_ID": "user123",
"DEFAULT_AGENT_ID": "your-agent-id",
"DEFAULT_APP_ID": "your-app-id"
}
}
}
}
Supabase Storage Configuration (Global Install)
{
"mcpServers": {
"mem0-mcp": {
"command": "mem0-mcp",
"args": [],
"env": {
"SUPABASE_URL": "YOUR_SUPABASE_PROJECT_URL",
"SUPABASE_KEY": "YOUR_SUPABASE_ANON_KEY",
"OPENAI_API_KEY": "YOUR_OPENAI_API_KEY_HERE",
"DEFAULT_USER_ID": "user123",
"DEFAULT_AGENT_ID": "your-agent-id",
"DEFAULT_APP_ID": "your-app-id"
}
}
}
}
Local Storage Configuration (Global Install)
{
"mcpServers": {
"mem0-mcp": {
"command": "mem0-mcp",
"args": [],
"env": {
"OPENAI_API_KEY": "YOUR_OPENAI_API_KEY_HERE",
"DEFAULT_USER_ID": "user123"
}
}
}
}
2. Using npx (Recommended for occasional use)
Configure your MCP client (e.g., Claude Desktop, Cursor, Cline, Roo Code, etc.) to run the server using npx:
Cloud Storage Configuration (npx)
{
"mcpServers": {
"mem0-mcp": {
"command": "npx",
"args": [
"-y",
"@pinkpixel/mem0-mcp"
],
"env": {
"MEM0_API_KEY": "YOUR_MEM0_API_KEY_HERE",
"DEFAULT_USER_ID": "user123",
"DEFAULT_AGENT_ID": "your-agent-id",
"DEFAULT_APP_ID": "your-app-id"
}
}
}
}
Supabase Storage Configuration (npx)
{
"mcpServers": {
"mem0-mcp": {
"command": "npx",
"args": [
"-y",
"@pinkpixel/mem0-mcp"
],
"env": {
"SUPABASE_URL": "YOUR_SUPABASE_PROJECT_URL",
"SUPABASE_KEY": "YOUR_SUPABASE_ANON_KEY",
"OPENAI_API_KEY": "YOUR_OPENAI_API_KEY_HERE",
"DEFAULT_USER_ID": "user123",
"DEFAULT_AGENT_ID": "your-agent-id",
"DEFAULT_APP_ID": "your-app-id"
}
}
}
}
Local Storage Configuration (npx)
{
"mcpServers": {
"mem0-mcp": {
"command": "npx",
"args": [
"-y",
"@pinkpixel/mem0-mcp"
],
"env": {
"OPENAI_API_KEY": "YOUR_OPENAI_API_KEY_HERE",
"DEFAULT_USER_ID": "user123"
}
}
}
}
3. Running from Cloned Repository
Note: This method requires you to git clone the repository first.
Clone the repository, install dependencies, and build the server:
git clone https://github.com/pinkpixel-dev/mem0-mcp
cd mem0-mcp
npm install
npm run build
Then, configure your MCP client to run the built script directly using node:
Cloud Storage Configuration (Cloned Repository)
{
"mcpServers": {
"mem0-mcp": {
"command": "node",
"args": [
"/absolute/path/to/mem0-mcp/build/index.js"
],
"env": {
"MEM0_API_KEY": "YOUR_MEM0_API_KEY_HERE",
"DEFAULT_USER_ID": "user123",
"DEFAULT_AGENT_ID": "your-agent-id",
"DEFAULT_APP_ID": "your-app-id"
}
}
}
}
Supabase Storage Configuration (Cloned Repository)
{
"mcpServers": {
"mem0-mcp": {
"command": "node",
"args": [
"/absolute/path/to/mem0-mcp/build/index.js"
],
"env": {
"SUPABASE_URL": "YOUR_SUPABASE_PROJECT_URL",
"SUPABASE_KEY": "YOUR_SUPABASE_ANON_KEY",
"OPENAI_API_KEY": "YOUR_OPENAI_API_KEY_HERE"
Related Skills
node-connect
385.6kDiagnose OpenClaw Android, iOS, or macOS node pairing, QR/setup code, route, auth, and connection failures.
notion
385.6kNotion CLI/API for pages, Markdown content, data sources, files, comments, search, Workers, and raw API calls.
browser-automation
385.6kUse when controlling web pages with the OpenClaw browser tool, especially multi-step flows, login checks, tab management, or recovery from stale refs/timeouts.
Hook Development
140.7kThis skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse,…