Sandbox
@apify/apify-mcp-server

MCP server for Apify Actors and data access

Apify MCP Server connects an MCP client to Apify Actors, documentation, datasets, key-value stores, and task management. It discovers tools dynamically, loads Actor input schemas, and exposes them as MCP tools so the agent can call the right scraper or utility without manual wiring.

6,667 stars259 forksTypeScriptUpdated 6d ago
Apify MCP Server Tutorial: Integrate 5,000+ Apify Actors and Agents Into Claude
Apify16k views • 1 year ago

Videos about this repo

Who it's for

Builders who want their agent to search the web, scrape sites, and read Apify results through MCP.

What it delivers

You can give your agent access to thousands of Apify scrapers and your Apify storage from one MCP connection.

What it does

Search and call Actors

Find Actors in Apify Store, inspect their details, and run them as MCP tools.

Auto-load Actor tools

Loads Actor input schemas and turns selected Actors like `apify/rag-web-browser` and `apify/web-fetch` into callable tools.

Read runs and storage

Fetch run details, logs, dataset items, dataset schemas, and key-value store records on demand.

Search Apify docs

Lets the agent search and fetch Apify documentation pages for context while working.

Task management

Create, update, publish, and unpublish saved Actor tasks.

Hosted and local access

Works through `https://mcp.apify.com` or locally with `npx @apify/actors-mcp-server` over stdio.

Payments for runs

Supports AGI, direct x402, and Skyfire payment flows for paid Actor runs.

How to get it

  1. 1Create or import a wallet
    # Create a new wallet
    mcpc x402 init
    
    # Import an existing wallet
    mcpc x402 import <private-key>
    
    # Show the wallet address and a funding QR code, so you can fund it with USDC on Base (https://base.org)
    mcpc x402
  2. 2Connect to the server with x402 enabled
    mcpc connect "mcp.apify.com?payment=x402" @apify --x402
  3. 3You can now call a paid tool
    mcpc @apify tools-call call-actor actor:="apify/rag-web-browser" input:='{"query": "latest AI news"}'

README

Apify MCP ServerApify MCP Server
mcp.apify.com

NPM latest version Downloads Build Status smithery badge

The Apify Model Context Protocol (MCP) server at mcp.apify.com enables your AI agents to extract data from social media, search engines, maps, e-commerce sites, and any other website using thousands of ready-made scrapers, crawlers, and automation tools from Apify Store. It supports OAuth, allowing you to connect from clients like Claude.ai or Visual Studio Code using just the URL.

🚀 Use the hosted Apify MCP Server!

For the best experience, connect your AI assistant to our hosted server at https://mcp.apify.com. The hosted server supports the latest features - including output schema inference for structured Actor results - that are not available when running locally via stdio.

⚠️ Legacy SSE transport removed. The https://mcp.apify.com/sse endpoint has been removed in favor of Streamable HTTP. Migrate your client to https://mcp.apify.com — drop the /sse suffix from your configuration.

💰 The server also supports agentic payments: buy a token from AGI to run any Actor, or pay per-request via direct x402 (Pay Per Event Actors only) or Skyfire.

Apify MCP Server is compatible with Claude Code, Claude.ai, Cursor, VS Code and any client that adheres to the Model Context Protocol. Check out the MCP clients section for more details or visit the MCP configuration page.

Apify-MCP-server

Table of Contents

🌐 Introducing Apify MCP Server

The Apify MCP Server allows an AI assistant to use any Apify Actor as a tool to perform a specific task. For example, it can:

Video tutorial: Integrate 8,000+ Apify Actors and Agents with Claude

Apify MCP Server Tutorial: Integrate 5,000+ Apify Actors and Agents with Claude

🚀 Quickstart

You can use the Apify MCP Server in two ways:

HTTPS Endpoint (mcp.apify.com): Connect from your MCP client via OAuth or by including the Authorization: Bearer <APIFY_TOKEN> header in your requests. This is the recommended method for most use cases. Because it supports OAuth, you can connect from clients like Claude.ai or Visual Studio Code using just the URL: https://mcp.apify.com.

  • https://mcp.apify.com streamable transport

Standard Input/Output (stdio): Ideal for local integrations and command-line tools like the Claude for Desktop client.

  • Set the MCP client server command to npx @apify/actors-mcp-server and the APIFY_TOKEN environment variable to your Apify API token.
  • See npx @apify/actors-mcp-server --help for more options.

You can find detailed instructions for setting up the MCP server in the Apify documentation.

🤖 MCP clients

Apify MCP Server is compatible with any MCP client that adheres to the Model Context Protocol, but the level of support for dynamic tool discovery and other features may vary between clients.

To interact with the Apify MCP Server, you can use clients such as Claude Desktop, Visual Studio Code, or Apify Tester MCP Client.

Visit mcp.apify.com to configure the server for your preferred client.

Apify-MCP-configuration-clients

Tested clients

🪄 Try Apify MCP instantly

Want to try Apify MCP without any setup?

Check out Apify Tester MCP Client

This interactive, chat-like interface provides an easy way to explore the capabilities of Apify MCP without any local setup. Sign in with your Apify account and start experimenting with web scraping, data extraction, and automation tools!

Or use the MCP bundle file (formerly known as Anthropic Desktop extension file, or DXT) for one-click installation: Apify MCP Server MCPB file

💰 Agentic payments

You can pay for Actor runs without an Apify API token using AGI, direct x402, or Skyfire.

  • AGI (agi.apify.com) mints a prepaid Apify API token in exchange for an x402 or MPP payment. Use the token like a normal API token against mcp.apify.com and api.apify.com — works for any Actor, not just Pay Per Event ones. Recommended for new integrations; see AGI (recommended) below.
  • Direct x402 pays with USDC on Base per request and does not require a separate platform account. It is fully supported by mcpc (brew install apify/tap/mcpc or npm install -g @apify/mcpc). We use mcpc because it is one of the few MCP clients that supports the latest features and the x402 protocol natively.
  • Skyfire pays with PAY tokens and requires a Skyfire account with a funded wallet. It does not require a special MCP client; the entire payment flow is handled directly through the MCP tool call parameters.

ℹ️ Scope: Both direct x402 and Skyfire are limited to Pay Per Event Actors, don't support Standby Actors, and settle per run instead of minting a token.

How agentic payments work

Actor run costs vary, so both payment methods use a prepaid balance model. The payment flow happens in four steps:

  1. Discovery: The agent discovers Actors with search-actors or fetch-actor-details. Those calls are free.
  2. Prepayment: Before running a paid Actor tool, the agent funds a prepaid balance.
    • Direct x402: mcpc automatically signs a $1.00 USDC transaction.
    • Skyfire: The agent creates a PAY token (minimum $5.00) using Skyfire's create-pay-token tool.
  3. Execution: The agent calls the Actor tool.
    • Direct x402: Handled automatically by mcpc using the prepaid balance.
    • Skyfire: The agent explicitly passes the PAY token in the skyfire-pay-id input property.
  4. Resolution: The tool returns the Actor results. Unused funds stay available for later runs.
    • Direct x402: After 60 minutes of inactivity, the server refunds any unused balance to the wallet on Base.
    • Skyfire: Skyfire returns unused funds when the token expires.

🪙 AGI (recommended)

AGI (Apify Agent General Interface) is the recommended way for autonomous agents to pay for Apify usage without an account. Pay once via x402 or MPP, receive a prepaid, spend-capped Apify API token, and use it directly against mcp.apify.com and api.apify.com (Authorization: Bearer <token>) — for any Actor.

Full protocol, supported payment methods, and current terms (minimum amount, token lifetime, refund policy) are documented at agi.apify.com/AGENTS.md — treat it as the single source of truth.

💸 Direct x402

The x402 protocol enables direct, machine-to-machine payments. Your MCP client can use it to pay for Actor runs with USDC on the Base blockchain, completely bypassing the need for an Apify API token.

Prerequisites

  • A wallet with USDC on Base mainnet.

Setup

Create or import a wallet:

# Create a new wallet
mcpc x402 init

# Import an existing wallet
mcpc x402 import <private-key>

# Show the wallet address and a funding QR code, so you can fund it with USDC on Base (https://base.org)
mcpc x402

Connect to the server with x402 enabled:

mcpc connect "mcp.apify.com?payment=x402" @apify --x402

You can now call a paid tool:

mcpc @apify tools-call call-actor actor:="apify/rag-web-browser" input:='{"query": "latest AI news"}'

🔥 Skyfire

Skyfire provides managed payment infrastructure for AI agents. Instead of authenticating with an Apify API token, your agent passes a Skyfire payment token to cover the cost of each tool call using PAY tokens.

Prerequisites

  • A Skyfire account with a funded wallet.
  • An MCP client that supports multiple servers, such as Claude Desktop, OpenCode, or VS Code.

Setup

Configure the Skyfire MCP server and the Apify MCP Server in your client. Add payment=skyfire to the Apify server URL:

{
  "mcpServers": {
    "skyfire": {
      "url": "https://api.skyfire.xyz/mcp/sse",
      "headers": {
        "skyfire-api-key": "<YOUR_SKYFIRE_API_KEY>"
      }
    },
    "apify": {
      "url": "https://mcp.apify.com?payment=skyfire"
    }
  }
}

See the Skyfire integration documentation for setup details. The Agentic Payments with Skyfire post provides additional background.

🛠️ Tools, resources, and prompts

The MCP server provides a set of tools for interacting with Apify Actors. Since Apify Store is large and growing rapidly, the MCP server provides a way to dynamically discover and use new Actors.

Actors

Any Apify Actor can be used as a tool. By default, the server is pre-configured with two Actors, apify/rag-web-browser and apify/web-fetch, and several helper tools. The MCP server loads an Actor's input schema and creates a corresponding MCP tool. This allows the AI agent to know exactly what arguments to pass to the Actor and what to expect in return.

For example, for the apify/rag-web-browser Actor, the input parameters are:

{
  "query": "restaurants in San Francisco",
  "maxResults": 3
}

You don't need to manually specify which Actor to call or its input parameters; the LLM handles this automatically. When a tool is called, the arguments are automatically passed to the Actor by the LLM. You can refer to the specific Actor's documentation for a list of available arguments.

Helper tools

One of the most powerful features of using MCP with Apify is dynamic tool discovery. It allows an AI agent to find new tools (Actors) as needed and incorporate them. Here are some special MCP operations and how the Apify MCP Server supports them:

  • Apify Actors: Search for Actors, view their details, and use them as tools for the AI.
  • Apify documentation: Search the Apify documentation and fetch specific documents to provide context to the AI.
  • Actor runs: Get lists of your Actor runs, inspect their details, and retrieve logs.
  • Apify storage: Access data from your datasets and key-value stores.
  • Actor tasks: Create, inspect, and update your saved Actor tasks, and publish or unpublish their public landing pages.

Overview of available tools

Here is an overview list of all the tools provided by the Apify MCP Server.

Legend for the Enabled by default column:

  • ✅ — in the default tool set.
  • ⚡ — auto-injected when call-actor, an Actor tool, or get-actor-run is present (which is true in the default configuration).
  • ✅¹ — served by default, but only when telemetry is enabled and the client is not withheld: Anthropic surfaces (Claude.ai / Claude Desktop / Claude Code) or local-agent-mode-apify. To disable, pass an explicit tools= list that omits it.
Tool nameCategoryDescriptionEnabled by default
search-actorsactorsSearch for Actors in Apify Store.
fetch-actor-detailsactorsRetrieve detailed information about a specific Actor, including its input schema, README (summary when available, full otherwise), pricing, and Actor output schema.
call-actoractorsCall an Actor and get its run results. Use fetch-actor-details first to get the Actor's input schema.
get-actor-runrunsGet detailed information about a specific Actor run.
get-dataset-itemsstorageRetrieve items from a dataset with support for filtering and pagination.
get-key-value-store-recordstorageGet the value associated with a specific key in a key-value store.
abort-actor-runrunsAbort a running Actor run, optionally gracefully.
search-apify-docsdocsSearch the Apify documentation for relevant pages.
fetch-apify-docsdocsFetch the full content of an Apify documentation page by its URL.
apify--rag-web-browserActor (see tool configuration)An Actor tool to browse the web.
apify--web-fetchActor (see tool configuration)An Actor tool to fetch a URL and return its content.
report-problemdevReport a problem with an Apify tool or Actor to the Apify team.✅¹
get-actor-run-listrunsGet a list of an Actor's runs, filterable by status.
get-actor-logrunsRetrieve the logs for a specific Actor run.
get-datasetstorageGet metadata about a specific dataset.
get-dataset-schemastorageGenerate a JSON schema from dataset items.
get-key-value-storestorageGet metadata about a specific key-value store.
get-key-value-store-keysstorageList the keys within a specific key-value store.
get-dataset-liststorageList all available datasets for the user.
get-key-value-store-liststorageList all available key-value stores for the user.
create-actor-tasktasksCreate a saved Actor task (a named, reusable Actor configuration).
get-actor-tasktasksGet a saved Actor task, its publication state and public display configuration.
update-actor-tasktasksUpdate a task's input, run options, or public display configuration.
publish-actor-tasktasksPublish a task on its public landing page.
unpublish-actor-tasktasksUnpublish a task from its public landing page.

Note:

When call-actor, an Actor tool, or get-actor-run is present, the server auto-injects get-actor-run, get-dataset-items, get-key-value-store-record, and abort-actor-run.

When you call an Actor — through call-actor or directly via an Actor tool (e.g., apify--rag-web-browser) — the response contains run metadata, storage IDs, and a summary + nextStep, but no dataset items. To fetch items, follow nextStep and call get-dataset-items (auto-injected), passing the datasetId returned from the call.

Tool annotations

All tools include metadata annotations to help MCP clients and LLMs understand tool behavior:

  • title: Short display name for the tool (e.g., "Search Actors", "Call Actor", "apify/rag-web-browser")
  • readOnlyHint: true for tools that only read data without modifying state (e.g., get-dataset, fetch-actor-details)
  • openWorldHint: true for tools that access external resources outside the Apify platform (e.g., call-actor executes external Actors). Tools that interact only with the Apify platform (like search-actors or fetch-apify-docs) do not have this hint.

Tools configuration

The tools configuration parameter is used to specify loaded tools – either categories or specific tools directly, and Apify Actors. For example, tools=storage,runs loads two categories; tools=call-actor loads just one tool.

When no query parameters are provided, the MCP server loads the following tools by default:

  • actors
  • docs
  • apify/rag-web-browser
  • apify/web-fetch

If the tools parameter is specified, only the listed tools or categories will be enabled – no default tools will be included.

report-problem is served by default (subject to the gating in the footnote above) but lives in the dev category, so an explicit tools=dev selects it too. To disable it, pass an explicit tools= list that omits it (e.g. tools=actors,docs).

Easy configuration:

Use the UI configurator to configure your server, then copy the configuration to your client.

Configuring the hosted server:

The hosted server can be configured using query parameters in the URL. For example, to load the default tools, use:

https://mcp.apify.com?tools=actors,docs,apify/rag-web-browser,apify/web-fetch

For minimal configuration, if you want to use only a single Actor tool - without any discovery or generic calling tools, the server can be configured as follows:

https://mcp.apify.com?tools=apify/my-actor

This setup exposes only the specified Actor (apify/my-actor) as a tool. No other tools will be available.

Configuring the CLI:

The CLI can be configured using command-line flags. For example, to load the same tools as in the hosted server configuration, use:

npx @apify/actors-mcp-server --tools actors,docs,apify/rag-web-browser,apify/web-fetch

The minimal configuration is similar to the hosted server configuration:

npx @apify/actors-mcp-server --tools apify/my-actor

As above, this exposes only the specified Actor (apify/my-actor) as a tool. No other tools will be available.

⚠️ Important recommendation

The default tools configuration may change in future versions. When no tools parameter is specified, the server currently loads default tools, but this behavior is subject to change.

For production use and stable interfaces, always explicitly specify the tools parameter to ensure your configuration remains consistent across updates.

UI mode configuration

The ui parameter enables MCP Apps widget rendering in tool responses. When enabled, tools like search-actors return interactive MCP App responses.

Configuring the hosted server:

Enable UI mode using the ui query parameter:

https://mcp.apify.com?ui=true

You can combine it with other parameters:

https://mcp.apify.com?tools=actors,docs&ui=true

Configuring the CLI:

The CLI can be configured using command-line flags. For example, to enable UI mode:

npx @apify/actors-mcp-server --ui true

You can also set it via the UI_MODE environment variable:

export UI_MODE=true
npx @apify/actors-mcp-server

Backward compatibility

The v2 configuration preserves backward compatibility with v1 usage. Notes:

  • actors param (URL) and --actors flag (CLI) are still supported.
    • Internally they are merged into tools selectors.
    • Examples: ?actors=apify/rag-web-browser?tools=apify/rag-web-browser; --actors apify/rag-web-browser--tools apify/rag-web-browser.
  • enableAddingActors (URL), enable-adding-actors (CLI), and the legacy enableActorAutoLoading alias have been removed. To call Actors dynamically, use tools=call-actor (included by default via the actors category). Any lingering raw value is ignored.
  • Defaults remain compatible: when no tools are specified, the server loads actors, docs, apify/rag-web-browser, and apify/web-fetch.
    • If any tools are specified, the defaults are not added (same as v1 intent for explicit selection).
  • call-actor is now included by default via the actors category (additive change). To exclude it, specify an explicit tools list without actors.
  • tools=add-actor, tools=experimental, and tools=preview are retired: they are ignored and load no tools. Use tools=call-actor (or the default actors category) instead.

Existing URLs and commands using ?actors=... or --actors continue to work unchanged.

Prompts

The server advertises the prompts capability, but no prompts are currently registered — prompts/list returns an empty list.

Resources

Your Apify data is not enumerated in resources/list — reads are on demand: pass any Apify API GET URL (https://api.apify.com/v2/...) to `resources/re

Files in the repo

Repository payload39 top-level entries
  • .claude
  • .github
  • .shepherd
  • .vscode
  • docs
  • evals
  • res
  • scripts
  • src
  • tests
  • .dockerignore
  • .editorconfig
  • .env.example
  • .git-blame-ignore-revs
  • .gitignore
  • .mcp.json
  • .npmignore
  • .nvmrc
  • .oxfmtrc.json
  • .sentryclirc
  • AGENTS.md
  • CHANGELOG.md
  • CLAUDE.md
  • CONTRIBUTING.md
  • DEVELOPMENT.md
  • Dockerfile
  • glama.json
  • LICENSE.md
  • manifest.json
  • oxlint.config.ts
  • package.json
  • pnpm-lock.yaml
  • pnpm-workspace.yaml
  • README.md
  • RELEASE.md
  • SECURITY.md
  • server.json
  • tsconfig.json
  • vitest.config.ts

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More connectors

Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface

86k

High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph — average repo in milliseconds. 158 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.

43k

Universal provider proxy for OpenAI Codex & Claude Code — use any LLM (Claude, Gemini, Grok, DeepSeek, Ollama…) with Codex CLI, App, SDK, and Claude Code

14k
okf-memory/
okf-agent-memory

Git-native persistent memory for AI coding agents. Implements Google OKF v0.2 with sub-300µs in-memory BM25 search, embedded MCP server, and progressive disclosure. Slashes token bloat by 80% with zero external databases or dependencies. Built in pure Go.

547
tirth8205/
code-review-graph

Local-first code intelligence graph for MCP and CLI. Builds a persistent map of your codebase so AI coding tools read only what matters, with benchmarked context reductions on reviews and large-repo workflows.

31k
2akouwu/
reverify

Stop your AI from making things up — it proposes, deterministic tools decide, every claim checked against ground truth with evidence. Grounded facts and context survive resets. Reverse engineering is the proving ground. MCP server + CLI.

1.1k