MCPcopy Index your code
hub / github.com/apify/apify-mcp-server

github.com/apify/apify-mcp-server @v0.11.5

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.11.5 ↗ · + Follow
679 symbols 2,225 edges 238 files 102 documented · 15% updated todayv0.11.5 · 2026-07-02★ 1,692106 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Apify MCP Server mcp.apify.com

<a href="https://www.npmjs.com/package/@apify/actors-mcp-server" rel="nofollow"><img src="https://img.shields.io/npm/v/@apify/actors-mcp-server.svg" alt="NPM latest version" data-canonical-src="https://img.shields.io/npm/v/@apify/actors-mcp-server.svg" style="max-width: 100%;"></a>
<a href="https://www.npmjs.com/package/@apify/actors-mcp-server" rel="nofollow"><img src="https://img.shields.io/npm/dm/@apify/actors-mcp-server.svg" alt="Downloads" data-canonical-src="https://img.shields.io/npm/dm/@apify/actors-mcp-server.svg" style="max-width: 100%;"></a>
<a href="https://github.com/apify/actors-mcp-server/actions/workflows/check.yaml"><img src="https://github.com/apify/actors-mcp-server/actions/workflows/check.yaml/badge.svg?branch=master" alt="Build Status" style="max-width: 100%;"></a>
<a href="https://smithery.ai/server/@apify/mcp"><img src="https://smithery.ai/badge/@apify/mcp" alt="smithery badge"></a>

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 via x402 and Skyfire, allowing AI agents to pay for Actor runs without an API token.

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: - Use Facebook Posts Scraper to extract data from Facebook posts from multiple pages/profiles. - Use Google Maps Email Extractor to extract contact details from Google Maps. - Use Google Search Results Scraper to scrape Google Search Engine Results Pages (SERPs). - Use Instagram Scraper to scrape Instagram posts, profiles, places, photos, and comments. - Use RAG Web Browser to search the web, scrape the top N URLs, and return their content.

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 either x402 or Skyfire.

  • x402 pays with USDC on Base and does not require a separate platform account. It is fully supported by mcpc (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.

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.
  3. x402: mcpc automatically signs a $1.00 USDC transaction.
  4. Skyfire: The agent creates a PAY token (minimum $5.00) using Skyfire's create-pay-token tool.
  5. Execution: The agent calls the Actor tool.
  6. x402: Handled automatically by mcpc using the prepaid balance.
  7. Skyfire: The agent explicitly passes the PAY token in the skyfire-pay-id input property.
  8. Resolution: The tool returns the Actor results. Unused funds stay available for later runs.
  9. x402: After 60 minutes of inactivity, the server refunds any unused balance to the wallet on Base.
  10. Skyfire: Skyfire returns unused funds when the token expires.

💸 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 so you can fund it with USDC on Base (https://base.org)
mcpc x402 info

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 one Actor, apify/rag-web-browser, 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.

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, add-actor, an Actor tool, or get-actor-run is present (which is true in the default configuration).

Tool name Category Description Enabled by default
search-actors actors Search for Actors in Apify Store.
fetch-actor-details actors Retrieve detailed information about a specific Actor, including its input schema, README (summary when available, full otherwise), pricing, and Actor output schema.
call-actor actors Call an Actor and get its run results. Use fetch-actor-details first to get the Actor's input schema.
get-actor-run

Extension points exported contracts — how you extend this code

ToolOutput (Interface)
* Shape from get-actor-run / get-actor-run-widget. * storages mirrors ActorRunStorageIds: alias-map where "default" is
src/web/src/pages/ActorRun/ActorRun.tsx
Window (Interface)
(no doc)
src/web/src/types.ts
WidgetLayoutProps (Interface)
(no doc)
src/web/src/components/layout/WidgetLayout.tsx
IconProps (Interface)
(no doc)
src/web/src/components/ui/Icons.tsx
ButtonProps (Interface)
(no doc)
src/web/src/components/ui/Button.tsx

Core symbols most depended-on inside this repo

stubToolCallContext
called by 95
tests/unit/helpers/tool_context.ts
callTool
called by 82
evals/workflows/mcp_client.ts
close
called by 67
src/mcp/server.ts
get
called by 60
src/utils/ttl_lru.ts
buildMCPResponse
called by 43
src/utils/mcp.ts
getToolNames
called by 41
tests/integration/suite.ts
actorNameToToolName
called by 36
src/tools/actor_tool_naming.ts
compileSchema
called by 28
src/utils/ajv.ts

Shape

Function 558
Method 78
Class 22
Interface 21

Languages

TypeScript100%

Modules by API surface

src/mcp/server.ts42 symbols
src/tools/actors/actor_run_response.ts30 symbols
src/utils/pricing_info.ts26 symbols
src/web/src/pages/ActorRun/ActorRun.tsx18 symbols
src/payments/x402.ts16 symbols
src/tools/actor_input_schema.ts15 symbols
tests/integration/suite.ts13 symbols
src/web/src/utils/formatting.ts13 symbols
src/tools/actors/call_actor.ts13 symbols
src/web/src/utils/init-widget.tsx11 symbols
src/errors.ts11 symbols
src/utils/tools.ts10 symbols

For agents

$ claude mcp add apify-mcp-server \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact