The Mem0 MCP connector routes your AI agent's tool calls to Mem0's own MCP server through Scalekit. Each user signs in to Mem0 once, and Scalekit stores and refreshes their tokens, so your agent never handles credentials. It comes with 11 tools.
- Tools
- 11
- What they doRead · write · destructive
- 6 · 2 · 36 read2 write3 destructive
- Users sign in with
- OAuth
- OAuth app
- Scalekit's or your own
Setup
Install the SDK
Terminal window npm install @scalekit-sdk/node dotenvTerminal window pip install scalekit-sdk-python python-dotenvSet 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>Create the Mem0 MCP connection
In AgentKit > Connections, create a Mem0 MCP connection. The name you give it is the
connection_nameyour code passes. See Configure connections.Scalekit credentials are available for Mem0 MCP server, so you don't need to register an OAuth app.
Authorize a user and make your first call
quickstart.mts import { ScalekitClient } from '@scalekit-sdk/node'import 'dotenv/config'import { createInterface } from 'node:readline/promises'const scalekit = new ScalekitClient(process.env.SCALEKIT_ENVIRONMENT_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)const rl = createInterface({ input: process.stdin, output: process.stdout })await rl.question('Press Enter after authorizing...')rl.close()// Make your first callconst result = await actions.executeTool({connector,identifier,toolName: 'mem0mcp_get_memories',toolInput: {},})console.log(result)Terminal window npx tsx quickstart.mtsquickstart.py import osfrom scalekit import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENVIRONMENT_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={},tool_name="mem0mcp_get_memories",connection_name=connection_name,identifier=identifier,)print(result)Terminal window python quickstart.pyEach user signs in once. See Authorize a user for the full flow and statuses.
Tools
Pass the exact name toexecute_toolmem0mcp_get_event_statusCheck the status of a specific memory operation event by its ID.Read-onlyGet Event Status
Check the status of a specific memory operation event by its ID.
Inputs
event_idstringrequired- UUID of the event to check.
mem0mcp_get_memoriesPage through memories using filters instead of search.Read-onlyGet 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.
Inputs
filtersstring- Structured filters; user_id injected automatically.
pagestring- 1-indexed page number when paginating.
page_sizestring- Number of memories per page (default 10).
sourcestring- Event source tag (defaults to MCP if omitted).
mem0mcp_get_memoryFetch a single memory by ID.Read-onlyGet Memory
Fetch a single memory by ID.
Inputs
memory_idstringrequired- Exact memory_id to fetch.
mem0mcp_list_entitiesList which users/agents/apps/runs currently hold memories.Read-onlyList Entities
List which users/agents/apps/runs currently hold memories.
Inputs
This tool takes no inputs.
mem0mcp_list_eventsList memory operation events with optional filters and pagination.Read-onlyList Events
List memory operation events with optional filters and pagination.
Inputs
event_typestring- Filter by type: ADD, SEARCH, UPDATE, DELETE, GET_ALL, DELETE_ALL.
pagestring- 1-indexed page number.
page_sizestring- Events per page (default 50, max 100).
mem0mcp_search_memoriesRun a semantic search over existing memories.Read-onlySearch 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.
Inputs
querystringrequired- Natural language description of what to find.
filtersstring- Additional filter clauses (user_id injected automatically).
sourcestring- Event source tag (defaults to MCP if omitted).
top_kstring- Number of results to return (1-1000, default 10).
mem0mcp_add_memoryStore a new preference, fact, or conversation snippet.WriteAdd 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.
Inputs
textstringrequired- Plain sentence summarizing what to store.
agent_idstring- Optional agent identifier.
app_idstring- Optional app identifier.
messagesstring- Structured conversation history with `role`/`content`. Use when you have multiple turns.
metadatastring- Attach arbitrary metadata JSON to the memory.
run_idstring- Optional run identifier.
sourcestring- Event source tag (defaults to MCP if omitted).
user_idstring- Override the default user scope for this write.
mem0mcp_update_memoryOverwrite an existing memory's text.WriteUpdate Memory
Overwrite an existing memory's text.
- Idempotent
Inputs
memory_idstringrequired- Exact memory_id to overwrite.
textstringrequired- Replacement text for the memory.
sourcestring- Event source tag (defaults to MCP if omitted).
mem0mcp_delete_all_memoriesDelete every memory in the given user/agent/app/run but keep the entity.DestructiveDelete All Memories
Delete every memory in the given user/agent/app/run but keep the entity.
- Idempotent
Inputs
agent_idstring- Optional agent scope to delete.
app_idstring- Optional app scope to delete.
run_idstring- Optional run scope to delete.
sourcestring- Event source tag (defaults to MCP if omitted).
user_idstring- User scope to delete; defaults to server user.
mem0mcp_delete_entitiesRemove an entity and cascade-delete its memories.DestructiveDelete Entities
Remove an entity and cascade-delete its memories.
- Idempotent
Inputs
agent_idstring- Delete this agent and its memories.
app_idstring- Delete this app and its memories.
run_idstring- Delete this run and its memories.
user_idstring- Delete this user and its memories.
mem0mcp_delete_memoryDelete one memory after the user confirms its memory_id.DestructiveDelete Memory
Delete one memory after the user confirms its memory_id.
- Idempotent
Inputs
memory_idstringrequired- Exact memory_id to delete.
No tools match.