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 16 tools.

Tools
16
What they doRead · write · destructive
8 · 5 · 38 read5 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 the format "username/name", e.g., "apify/rag-web-browser".
    outputobject
    Specify which information to include in the response to save tokens.
  • apifymcp_fetch_actor_mcp_tool_listList an Actor's MCP tools with each tool's name, description, input schema, annotations, and metadata, as the server reports them.Read-only

    Fetch Actor Mcp Tool List

    List an Actor's MCP tools with each tool's name, description, input schema, annotations, and metadata, as the server reports them. call-actor-mcp-tool calls one of them by name. Each call asks the server again; nothing is cached. It connects with your Apify API token. Connecting can start a Server Actor run in your account, kept until its idle timeout; a multi-tenant Server Actor charges per event. USAGE: - Use when the user asks which MCP tools an Actor provides, or before calling one of them. USAGE EXAMPLES: - user_input: What tools does username/name provide?

    Inputs

    actorstringrequired
    The MCP server Actor: its ID, or its name in the "username/name" form.
  • 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, name (resolved against your own datasets), or full name as username~name.
    cleanboolean
    If true, returns only non-empty items and skips hidden fields (starting with #). Shortcut for skipHidden=true and skipEmpty=true.
    descboolean
    If true, results are returned in reverse order (newest to oldest).
    fieldsstring
    Comma-separated list of fields to include in results. Fields in output are sorted as specified. Use dot notation for nested objects (e.g. "metadata.url"); the server auto-flattens parent prefixes and returns flat keys, unless the parent itself is listed (e.g. "metadata,metadata.url" returns metadata whole). A dotted path to or through an array (e.g. "results.url") returns nothing: select its top-level field (e.g. "results") for every element. Items that have none of the requested fields come back as {}, or are dropped when clean=true.
    flattenstring
    Comma-separated list of fields to flatten (e.g. flatten="metadata" turns {"metadata":{"url":"x"}} into {"metadata.url":"x"}). Normally derived automatically from dot-notation in `fields`; specify only as a diagnostic override.
    limitinteger
    Maximum number of items to return. Default is 20.
    offsetnumber
    Number of items to skip at the start. 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, name (resolved against your own key-value stores), or full name as username~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 used to search pre-built solutions (Actors) in the Apify Store. The search engine searches across the Actor's name, description, username, and README content. Pass empty string ("") whenever the user has NOT named a specific platform (Instagram, Amazon, Google Maps) or a specific data type (posts, products, weather, news). Empty keywords return Actors in the Apify Store's default sort order, which is popularity in practice (most-used Actors first). Do NOT use ranking words ("top", "best", "popular") or bare task words ("scraper", "crawler", "extractor") as keyword values — they are not Actor names and produce noisy matches against README content. Otherwise, follow these rules: - Use 1-3 simple keyword terms maximum (e.g., "Instagram posts", "Twitter", "Amazon products") - Actors are named using platform or service name together with the type of data or task they perform - The most effective keywords are specific platform names (Instagram, Twitter, TikTok) and specific data types (posts, products, profiles, weather, news, reviews, comments) - If a user asks about "fetching Instagram posts", use "Instagram posts" as keywords - The goal is to find Actors that specifically handle the platform and data type the user mentioned Examples: ✅ "Instagram posts", "Twitter", "Amazon products", "TikTok comments" ✅ "" (empty) — returns the most popular Actors store-wide ❌ "Instagram posts profiles comments hashtags reels stories followers..." (too long) ❌ "top popular actors", "best scrapers", "trending" — ranking words aren't Actor keywords; pass "" instead ❌ "scraper", "extractor", "web crawler" — bare task words aren't Actor keywords; pass "" insteaddefault
    limitinteger
    The maximum number of Actors to return (max = 10, default = 5).default 5
    offsetinteger
    The number of elements to skip from the start (default = 0). Has no effect when keywords are set: every offset returns the first results.default 0
    useCasestring
    Optional. One plain sentence on what the user wants to achieve with the Actor, for example "compare competitor prices" (max 1024 characters). Never include personal information (names, emails, phone numbers, addresses, account details), URLs, secrets, API tokens or credentials. Respect the user's privacy: when unsure, leave it out.
  • 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 to find relevant documentation pages. Use only keywords, do not use full sentences or questions. For example, "standby actor" will return documentation pages that contain the words "standby" and "actor".
    docSourcestring
    Documentation source to search. Defaults to "apify". • "apify" - Apify • "crawlee-js" - Crawlee (JavaScript) • "crawlee-py" - Crawlee (Python)one of apifycrawlee-jscrawlee-pydefault apify
    limitnumber
    Maximum number of search results to return. Defaults to 5. Maximum is 20. You can increase this limit if you need more results, but keep in mind that the search results are limited to the most relevant pages.default 5
    offsetnumber
    Offset for the search results. Defaults to 0. Use this to paginate through the search results. For example, if you want to get the next 5 results, set the offset to 5 and limit to 5.default 0

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);