Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to the Mem0 MCP server

Vendor MCP
Open markdown

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 app
Scalekit's or your own

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    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. Create the Mem0 MCP connection

    In AgentKit > Connections, create a Mem0 MCP connection. The name you give it is the connection_name your code passes. See Configure connections.

    Scalekit credentials are available for Mem0 MCP server, so you don't need to register an OAuth app.

  4. 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.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)
    const rl = createInterface({ input: process.stdin, output: process.stdout })
    await rl.question('Press Enter after authorizing...')
    rl.close()
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'mem0mcp_get_memories',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user signs in once. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • mem0mcp_get_event_statusCheck the status of a specific memory operation event by its ID.Read-only

    Get 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-only

    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.

    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-only

    Get 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-only

    List 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-only

    List 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-only

    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.

    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.Write

    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.

    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.Write

    Update 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).