Mem0 MCP connector
OAuth 2.1/DCR AIDatabasesConnect to Mem0 MCP. Store, search, and retrieve persistent memory for AI agents and applications using semantic search.
Mem0 MCP connector
-
Install the SDK
Section titled “Install the SDK”Terminal window npm install @scalekit-sdk/nodeTerminal window pip install scalekit -
Set your credentials
Section titled “Set your credentials”Add your Scalekit credentials to your
.envfile. Find values in app.scalekit.com > Developers > API Credentials..env SCALEKIT_ENVIRONMENT_URL=<your-environment-url>SCALEKIT_CLIENT_ID=<your-client-id>SCALEKIT_CLIENT_SECRET=<your-client-secret> -
Authorize and make your first call
Section titled “Authorize and make your first call”quickstart.ts import { ScalekitClient } from '@scalekit-sdk/node'import 'dotenv/config'const scalekit = new ScalekitClient(process.env.SCALEKIT_ENV_URL,process.env.SCALEKIT_CLIENT_ID,process.env.SCALEKIT_CLIENT_SECRET,)const actions = scalekit.actionsconst connector = 'mem0mcp'const identifier = 'user_123'// Generate an authorization link for the userconst { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })console.log('Authorize Mem0 MCP:', link)process.stdout.write('Press Enter after authorizing...')await new Promise(r => process.stdin.once('data', r))// Make your first callconst result = await actions.executeTool({connector,identifier,toolName: 'mem0mcp_get_event_status',toolInput: { event_id: 'YOUR_EVENT_ID' },})console.log(result)quickstart.py import osfrom scalekit.client import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENV_URL"),client_id=os.getenv("SCALEKIT_CLIENT_ID"),client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),)actions = scalekit_client.actionsconnection_name = "mem0mcp"identifier = "user_123"# Generate an authorization link for the userlink_response = actions.get_authorization_link(connection_name=connection_name,identifier=identifier,)print("Authorize Mem0 MCP:", link_response.link)input("Press Enter after authorizing...")# Make your first callresult = actions.execute_tool(tool_input={"event_id":"YOUR_EVENT_ID"},tool_name="mem0mcp_get_event_status",connection_name=connection_name,identifier=identifier,)print(result)
What you can do
Section titled “What you can do”Connect this agent connector to let your agent:
- Update memory — Overwrite an existing memory’s text
- Search memories — Run a semantic search over existing memories
- List events, entities — List memory operation events with optional filters and pagination
- Get memory, memories, event status — Fetch a single memory by ID
- Delete memory, entities, all memories — Delete one memory after the user confirms its memory_id
- Memory add — Store a new preference, fact, or conversation snippet
Tool list
Section titled “Tool list”Use the exact tool names from the Tool list below when you call execute_tool. If you’re not sure which name to use, list the tools available for the current user first.
mem0mcp_add_memory
#
Store a new preference, fact, or conversation snippet. Requires at least one: user_id, agent_id, or run_id. Returns an event_id for async polling via get_event_status. 8 params
Store a new preference, fact, or conversation snippet. Requires at least one: user_id, agent_id, or run_id. Returns an event_id for async polling via get_event_status.
text string required Plain sentence summarizing what to store. agent_id string optional Optional agent identifier. app_id string optional Optional app identifier. messages string optional Structured conversation history with `role`/`content`. Use when you have multiple turns. metadata string optional Attach arbitrary metadata JSON to the memory. run_id string optional Optional run identifier. source string optional Event source tag (defaults to MCP if omitted). user_id string optional Override the default user scope for this write. mem0mcp_delete_all_memories
#
Delete every memory in the given user/agent/app/run but keep the entity. 5 params
Delete every memory in the given user/agent/app/run but keep the entity.
agent_id string optional Optional agent scope to delete. app_id string optional Optional app scope to delete. run_id string optional Optional run scope to delete. source string optional Event source tag (defaults to MCP if omitted). user_id string optional User scope to delete; defaults to server user. mem0mcp_delete_entities
#
Remove an entity and cascade-delete its memories. 4 params
Remove an entity and cascade-delete its memories.
agent_id string optional Delete this agent and its memories. app_id string optional Delete this app and its memories. run_id string optional Delete this run and its memories. user_id string optional Delete this user and its memories. mem0mcp_delete_memory
#
Delete one memory after the user confirms its memory_id. 1 param
Delete one memory after the user confirms its memory_id.
memory_id string required Exact memory_id to delete. mem0mcp_get_event_status
#
Check the status of a specific memory operation event by its ID. 1 param
Check the status of a specific memory operation event by its ID.
event_id string required UUID of the event to check. mem0mcp_get_memories
#
Page through memories using filters instead of search. Use filters to list specific memories. Common filter patterns: single user: {"AND": [{"user_id": "john"}]}, agent memories: {"AND": [{"agent_id": "agent_name"}]}. user_id is automatically added to filters if not provided. 4 params
Page through memories using filters instead of search. Use filters to list specific memories. Common filter patterns: single user: {"AND": [{"user_id": "john"}]}, agent memories: {"AND": [{"agent_id": "agent_name"}]}. user_id is automatically added to filters if not provided.
filters string optional Structured filters; user_id injected automatically. page string optional 1-indexed page number when paginating. page_size string optional Number of memories per page (default 10). source string optional Event source tag (defaults to MCP if omitted). mem0mcp_get_memory
#
Fetch a single memory by ID. 1 param
Fetch a single memory by ID.
memory_id string required Exact memory_id to fetch. mem0mcp_list_entities
#
List which users/agents/apps/runs currently hold memories. 0 params
List which users/agents/apps/runs currently hold memories.
mem0mcp_list_events
#
List memory operation events with optional filters and pagination. 3 params
List memory operation events with optional filters and pagination.
event_type string optional Filter by type: ADD, SEARCH, UPDATE, DELETE, GET_ALL, DELETE_ALL. page string optional 1-indexed page number. page_size string optional Events per page (default 50, max 100). mem0mcp_search_memories
#
Run a semantic search over existing memories. Use filters to narrow results. Common filter patterns: single user: {"AND": [{"user_id": "john"}]}, agent memories: {"AND": [{"agent_id": "agent_name"}]}. user_id is automatically added to filters if not provided. 4 params
Run a semantic search over existing memories. Use filters to narrow results. Common filter patterns: single user: {"AND": [{"user_id": "john"}]}, agent memories: {"AND": [{"agent_id": "agent_name"}]}. user_id is automatically added to filters if not provided.
query string required Natural language description of what to find. filters string optional Additional filter clauses (user_id injected automatically). source string optional Event source tag (defaults to MCP if omitted). top_k string optional Number of results to return (1-1000, default 10). mem0mcp_update_memory
#
Overwrite an existing memory's text. 3 params
Overwrite an existing memory's text.
memory_id string required Exact memory_id to overwrite. text string required Replacement text for the memory. source string optional Event source tag (defaults to MCP if omitted).