Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Mem0 MCP connector

OAuth 2.1/DCRAIDatabases

Connect to Mem0 MCP. Store, search, and retrieve persistent memory for AI agents and applications using semantic search.

Mem0 MCP connector

  1. Terminal window
    npm install @scalekit-sdk/node

    Full SDK reference: Node.js | Python

  2. Add your Scalekit credentials to your .env file. 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>
  3. 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.actions
    const connector = 'mem0mcp'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { 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 call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'mem0mcp_get_event_status',
    toolInput: { event_id: 'YOUR_EVENT_ID' },
    })
    console.log(result)

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

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.

NameTypeRequiredDescription
textstringrequiredPlain sentence summarizing what to store.
agent_idstringoptionalOptional agent identifier.
app_idstringoptionalOptional app identifier.
messagesstringoptionalStructured conversation history with `role`/`content`. Use when you have multiple turns.
metadatastringoptionalAttach arbitrary metadata JSON to the memory.
run_idstringoptionalOptional run identifier.
sourcestringoptionalEvent source tag (defaults to MCP if omitted).
user_idstringoptionalOverride 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.

NameTypeRequiredDescription
agent_idstringoptionalOptional agent scope to delete.
app_idstringoptionalOptional app scope to delete.
run_idstringoptionalOptional run scope to delete.
sourcestringoptionalEvent source tag (defaults to MCP if omitted).
user_idstringoptionalUser 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.

NameTypeRequiredDescription
agent_idstringoptionalDelete this agent and its memories.
app_idstringoptionalDelete this app and its memories.
run_idstringoptionalDelete this run and its memories.
user_idstringoptionalDelete 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.

NameTypeRequiredDescription
memory_idstringrequiredExact 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.

NameTypeRequiredDescription
event_idstringrequiredUUID 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.

NameTypeRequiredDescription
filtersstringoptionalStructured filters; user_id injected automatically.
pagestringoptional1-indexed page number when paginating.
page_sizestringoptionalNumber of memories per page (default 10).
sourcestringoptionalEvent source tag (defaults to MCP if omitted).
mem0mcp_get_memory#Fetch a single memory by ID.1 param

Fetch a single memory by ID.

NameTypeRequiredDescription
memory_idstringrequiredExact 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.

NameTypeRequiredDescription
event_typestringoptionalFilter by type: ADD, SEARCH, UPDATE, DELETE, GET_ALL, DELETE_ALL.
pagestringoptional1-indexed page number.
page_sizestringoptionalEvents 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.

NameTypeRequiredDescription
querystringrequiredNatural language description of what to find.
filtersstringoptionalAdditional filter clauses (user_id injected automatically).
sourcestringoptionalEvent source tag (defaults to MCP if omitted).
top_kstringoptionalNumber 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.

NameTypeRequiredDescription
memory_idstringrequiredExact memory_id to overwrite.
textstringrequiredReplacement text for the memory.
sourcestringoptionalEvent source tag (defaults to MCP if omitted).