Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Mem0 MCP connector

OAuth 2.1/DCR AIDatabases

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.

Name Type Required Description
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.

Name Type Required Description
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.

Name Type Required Description
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.

Name Type Required Description
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.

Name Type Required Description
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.

Name Type Required Description
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.

Name Type Required Description
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.

Name Type Required Description
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.

Name Type Required Description
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.

Name Type Required Description
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).