Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to the Apify MCP server

Vendor MCP
Open markdown

The Apify MCP connector routes your AI agent's tool calls to Apify's own MCP server through Scalekit. Each user connects their own Apify access token once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 11 tools.

Tools
11
What they doRead · write · destructive
7 · 1 · 37 read1 write3 destructive
Users sign in with

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 Apify MCP connection

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

    Console steps with screenshots

    Register your Apify API token with Scalekit so it can authenticate and proxy Actor requests on behalf of your users. Apify MCP uses API token authentication.

    1. Get an Apify API token

      • Go to console.apify.com and sign in or create a free account.

      • In the left sidebar, click your avatar → Settings → API & Integrations → API tokens.

      • Click + Create new token. Give it a name (e.g., Agent Auth) and click Create token.

      • Copy the token immediately — it will not be shown again.

    2. Create a connection in Scalekit

      • In Scalekit dashboard, go to AgentKit > Connections. Find Apify MCP and click Create.

      • Note the Connection name — you will use this as connection_name in your code (e.g., apifymcp).

    3. Add a connected account

      Connected accounts link a specific user identifier in your system to an Apify API token. Add one in the dashboard to test. In production, each user adds their own through the authorization link: they enter their credentials on the page it opens.

      In the dashboard, to test

      • Open the connection you created and click the Connected Accounts tab → Add account.

      • Fill in:

        • Your User’s ID — a unique identifier for this user in your system (e.g., user_123)
        • Apify Token — the token you copied in step 1
      • Click Save.

      From your backend, if your app already has the credentials

      For example, when users enter them on a settings page in your app:

      import { ConnectorStatus } from '@scalekit-sdk/node'
      const authorizationDetails = {
      details: {
      case: 'staticAuth',
      value: { details: { token: 'apify_api_...' } },
      },
      };
      let { connectedAccount } = await scalekit.actions.upsertConnectedAccount({
      connectionName: 'apifymcp',
      identifier: 'user_123', // your user's unique ID
      authorizationDetails,
      });
      // Make sure the account is ACTIVE before the first tool call.
      if (connectedAccount?.status !== ConnectorStatus.ACTIVE) {
      ({ connectedAccount } = await scalekit.actions.upsertConnectedAccount({
      connectionName: 'apifymcp',
      identifier: 'user_123',
      authorizationDetails,
      }));
      }
  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 = 'apifymcp'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Apify 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: 'apifymcp_search_actors',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their Apify MCP server credentials there. If your app already has a user's credentials, add the account from your backend instead, as the console steps above show. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • apifymcp_fetch_actor_detailsGet detailed information about an Actor by its ID or full name (format: 'username/name', e.g.Read-only

    Fetch Actor Details

    Get detailed information about an Actor by its ID or full name (format: 'username/name', e.g. 'apify/rag-web-browser'). WARNING: Omitting the 'output' parameter returns ALL fields including the full README, which can be extremely token-heavy. Always pass 'output' with only the fields you need. To get the input schema before calling an Actor, use: {"inputSchema": true}. When to use: - You need an Actor's input schema before calling it — use output: {"inputSchema": true} - User wants details about a specific Actor (pricing, description, README) - You need to list MCP tools provided by an MCP server Actor — use output: {"mcpTools": true} When NOT to use: - You already have the input schema and are ready to run — use apifymcp_call_actor directly

    Inputs

    actorstringrequired
    Actor ID or full name in 'username/name' format (e.g. 'apify/rag-web-browser')
    outputobject
    JSON object with boolean flags to control which fields are returned. Always specify this to avoid a large token-heavy response. Set only the fields you need to true. Available fields: description, inputSchema, mcpTools, metadata, outputSchema, pricing, rating, readme, stats. All default to true if omitted (very large response) except mcpTools. Example: {"inputSchema": true}
  • apifymcp_fetch_apify_docsFetch the full content of an Apify or Crawlee documentation page by its URL.Read-only

    Fetch Apify Docs

    Fetch the full content of an Apify or Crawlee documentation page by its URL. Use this after finding a relevant page with apifymcp_search_apify_docs. When to use: - You have a documentation URL and need the complete page content - User asks for detailed documentation on a specific Apify or Crawlee page When NOT to use: - You don't have a URL yet — use apifymcp_search_apify_docs first

    Inputs

    urlstringrequired
    Full URL of the Apify or Crawlee documentation page (e.g. 'https://docs.apify.com/platform/actors')
  • apifymcp_get_actor_runGet detailed information about a specific Actor run by runId.Read-only

    Get Actor Run

    Get detailed information about a specific Actor run by runId. Returns run metadata (status, timestamps), performance stats, and resource IDs (datasetId, keyValueStoreId, requestQueueId). When to use: - You have a runId from apifymcp_call_actor (async mode) and want to check its status - User asks about details of a specific run started outside the current conversation When NOT to use: - The run was just started via apifymcp_call_actor in sync mode — results are already in the response - You want the output data — use apifymcp_get_actor_output with the datasetId

    Inputs

    runIdstringrequired
    The ID of the Actor run
    waitSecsinteger
    Maximum seconds to wait for the run to reach a terminal state (SUCCEEDED, FAILED, ABORTED, TIMED-OUT). 0 returns immediately with the current status. Cap: 45. Default: 30.default 30
  • apifymcp_get_dataset_itemsRetrieve items from a dataset with pagination, field selection, and sorting.Read-only

    Get Dataset Items

    Retrieve items from a dataset with pagination, field selection, and sorting. Use clean=true to skip empty items and hidden fields. Supports dot notation for nested field selection.

    Inputs

    datasetIdstringrequired
    Dataset ID or username~dataset-name.
    cleanboolean
    If true, returns only non-empty items and skips hidden fields (those starting with #).
    descboolean
    If true, returns results in reverse order (newest to oldest).
    fieldsstring
    Comma-separated list of fields to include. Supports dot notation for nested fields, e.g. metadata.url.
    flattenstring
    Comma-separated fields to flatten into dot-notation keys. Usually inferred automatically from dot notation in fields.
    limitinteger
    Maximum number of items to return. Defaults to 20.
    offsetnumber
    Number of items to skip for pagination. Default is 0.
    omitstring
    Comma-separated list of fields to exclude from results.
  • apifymcp_get_key_value_store_recordRetrieve a record (JSON, text, or binary) from a key-value store by its key.Read-only

    Get Key Value Store Record

    Retrieve a record (JSON, text, or binary) from a key-value store by its key.

    Inputs

    keyValueStoreIdstringrequired
    Key-value store ID or username~store-name.
    recordKeystringrequired
    Key of the record to retrieve.
  • apifymcp_search_actorsSearch the Apify Store to FIND and DISCOVER what scraping tools/Actors exist for specific platforms or use cases.Read-only

    Search Actors

    Search the Apify Store to FIND and DISCOVER what scraping tools/Actors exist for specific platforms or use cases. This tool provides INFORMATION about available Actors — it does NOT retrieve actual data or run any scraping tasks. When to use: - Find what scraping tools exist for a platform (e.g. 'What tools can scrape Instagram?') - Discover available Actors for a use case (e.g. 'Find an Actor for Amazon products') - Browse existing solutions before calling an Actor When NOT to use: - User wants immediate data retrieval — use apifymcp_rag_web_browser instead - You already know the Actor ID — use apifymcp_fetch_actor_details or apifymcp_call_actor directly Always do at least two searches: first with broad keywords, then with more specific terms if needed.

    Inputs

    keywordsstring
    Space-separated keywords to search Actors in the Apify Store. Use 1-3 simple terms (e.g. 'Instagram posts', 'Amazon products'). Avoid generic terms like 'scraper' or 'crawler'. Omitting keywords or passing an empty string returns popular/general Actors — always provide keywords for relevant results.default
    limitinteger
    Maximum number of Actors to return (1-10, default: 5)default 5
    offsetinteger
    Number of results to skip for pagination (default: 0)default 0
  • apifymcp_search_apify_docsSearch Apify and Crawlee documentation using full-text search.Read-only

    Search Apify Docs

    Search Apify and Crawlee documentation using full-text search. Use keywords only, not full sentences. Select the documentation source explicitly via docSource. Sources: - 'apify': Platform docs, SDKs (JS, Python), CLI, REST API, Academy, Actor development - 'crawlee-js': Crawlee JavaScript web scraping library - 'crawlee-py': Crawlee Python web scraping library When to use: - User asks how to use Apify APIs, SDK, or platform features - You need to look up Apify or Crawlee documentation When NOT to use: - You already have a documentation URL — use apifymcp_fetch_apify_docs directly

    Inputs

    querystringrequired
    Algolia full-text search query using keywords only (e.g. 'standby actor', 'proxy configuration'). Do not use full sentences.
    docSourcestring
    Documentation source to search. Options: 'apify' (default), 'crawlee-js', 'crawlee-py'one of apifycrawlee-jscrawlee-pydefault apify
    limitnumber
    Maximum number of results to return (1-20, default: 5)default 5
    offsetnumber
    Offset for pagination (default: 0)default 0
  • apifymcp_report_problemReport a problem with Apify's MCP tools or Actors to the Apify team.Write

    Report a Problem

    Report a problem with Apify's MCP tools or Actors to the Apify team. Call it when a tool or Actor is missing, errors, times out, or returns a confusing, wrong, or empty result, or when you cannot complete the user's request with the available tools. Put what you were doing and what went wrong in `message`. Do NOT include personal data, credentials, secrets, or verbatim private conversation content — describe the issue in your own words.

    Inputs

    messagestringrequired
    What happened: the problem you hit. Required. Keep it to a few sentences (max 2000 characters).
    actorIdstring
    Optional. The Actor this problem is about, e.g. apify/rag-web-browser.
    actorRunIdstring
    Optional. The Actor run this problem is about.
    relatedToolsarray
    Optional. Names of the MCP tools involved in this problem (up to 20).

Workflows

Tool calling
  • Use apifymcp_search_actors to discover Actors for a specific platform or use case before deciding which to run.
  • Use apifymcp_fetch_actor_details to retrieve an Actor’s input schema before calling it — always pass output: { inputSchema: true } to keep the response concise.
  • Use apifymcp_call_actor to run an Actor synchronously, or with async: true for long-running tasks.
  • Use apifymcp_get_actor_run to poll the status of an async run, and apifymcp_get_dataset_items to read results from the run’s dataset once complete.
  • Use apifymcp_rag_web_browser when you need real-time web content for LLM grounding — it returns clean Markdown from the top search result pages.
const toolResponse = await actions.executeTool({
connector: 'apifymcp',
identifier: 'user_123',
toolName: 'apifymcp_fetch_actor_details',
toolInput: {
actor: 'apify/web-scraper',
},
});
console.log('Actor details:', toolResponse.data);