Built by Metorial, the integration platform for agentic AI.

Learn More

apify/actors-mcp-server

Apify Actors MCP Server

    Server Summary

    • Interact with Apify Actors

    • Perform web scraping tasks

    • Automate data extraction

    • Schedule and run tasks

mcp.apify.com






The Apify Model Context Protocol (MCP) Server at mcp.apify.com instantly connects AI applications and agents to thousands of ready‑built tools. It allows your AI assistant to use any Apify Actor for web scraping, data extraction, and automation tasks in real time.

πŸš€ Try the hosted Apify MCP Server!

For the easiest setup and most powerful features, including the ability to find and use any Actor from Apify Store, connect your AI assistant to our hosted server:

https://mcp.apify.com

It supports OAuth, so you can connect from clients like Claude.ai or Visual Studio Code with just the URL.

Actors-MCP-server

Table of Contents

🌐 Introducing the 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 5,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 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 (recommended) for streamable transport
  • https://mcp.apify.com/sse for legacy SSE 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 and examples

To interact with the Apify MCP server, you can use various MCP clients, such as:

With MCP server integrated, you can ask your AI assistant things like:

  • "Search the web and summarize recent trends in AI Agents."
  • "Find the top 10 Italian restaurants in San Francisco."
  • "Find and analyze the Instagram profile of The Rock."
  • "Provide a step-by-step guide on using the Model Context Protocol, including source URLs."
  • "What Apify Actors can I use?"

Supported Clients Matrix

The following table outlines the tested MCP clients and their level of support for key features.

ClientDynamic Tool DiscoveryNotes
Claude.ai (web)βœ… Full
Claude Desktop🟑 PartialTools may need to be reloaded manually in the client.
VS Code (Genie)βœ… Full
LibreChat❓ Untested
Apify Tester MCP Clientβœ… FullDesigned for testing Apify MCP servers.

This matrix is a work in progress. If you have tested other clients, please consider contributing to this documentation.

πŸͺ„ 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. Just sign in with your Apify account and start experimenting with web scraping, data extraction, and automation tools!

πŸ› οΈ Tools, resources, and prompts

The MCP server provides a set of tools for interacting with Apify Actors. Since the 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 gives an AI agent the ability to find new tools (Actors) as needed and incorporate them. Here are some special MCP operations and how the Apify MCP Server supports them:

  • Actor discovery and management: Search for Actors, view their details, and dynamically add or remove them as available 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.

Note: Helper tool categories marked with (*) are not enabled by default in the MCP server and must be explicitly enabled using the tools argument (either the --tools command line argument for the stdio server or the ?tools URL query parameter for the remote MCP server). The tools argument is a comma-separated list of categories with the following possible values:

  • docs: Search and fetch Apify documentation tools.
  • runs: Get Actor run lists, run details, and logs from a specific Actor run.
  • storage: Access datasets, key-value stores, and their records.
  • preview: Experimental tools in preview mode.

For example, to enable all tools, use npx @apify/actors-mcp-server --tools docs,runs,storage,preview or https://mcp.apify.com/?tools=docs,runs,storage,preview.

Prompts

The server provides a set of predefined example prompts to help you get started interacting with Apify through MCP. For example, there is a GetLatestNewsOnTopic prompt that allows you to easily retrieve the latest news on a specific topic using the RAG Web Browser Actor.

Resources

The server does not yet provide any resources.

Debugging the NPM package

To debug the server, use the MCP Inspector tool:

export APIFY_TOKEN="your-apify-token"
npx @modelcontextprotocol/inspector npx -y @apify/actors-mcp-server

βš™οΈ Development

Prerequisites

Create an environment file, .env, with the following content:

APIFY_TOKEN="your-apify-token"

Build the actor-mcp-server package:

npm run build

Start HTTP streamable MCP server

Run using Apify CLI:

export APIFY_TOKEN="your-apify-token"
export APIFY_META_ORIGIN=STANDBY
apify run -p

Once the server is running, you can use the MCP Inspector to debug the server exposed at http://localhost:3001.

Start standard input/output (stdio) MCP server

You can launch the MCP Inspector with this command:

export APIFY_TOKEN="your-apify-token"
npx @modelcontextprotocol/inspector node ./dist/stdio.js

Upon launching, the Inspector will display a URL that you can open in your browser to begin debugging.

πŸ› Troubleshooting (local MCP server)

  • Make sure you have node installed by running node -v.
  • Make sure the APIFY_TOKEN environment variable is set.
  • Always use the latest version of the MCP server by using @apify/actors-mcp-server@latest.

πŸ’‘ Limitations

The Actor input schema is processed to be compatible with most MCP clients while adhering to JSON Schema standards. The processing includes:

  • Descriptions are truncated to 500 characters (as defined in MAX_DESCRIPTION_LENGTH).
  • Enum fields are truncated to a maximum combined length of 200 characters for all elements (as defined in ACTOR_ENUM_MAX_LENGTH).
  • Required fields are explicitly marked with a REQUIRED prefix in their descriptions for compatibility with frameworks that may not handle the JSON schema properly.
  • Nested properties are built for special cases like proxy configuration and request list sources to ensure the correct input structure.
  • Array item types are inferred when not explicitly defined in the schema, using a priority order: explicit type in items > prefill type > default value type > editor type.
  • Enum values and examples are added to property descriptions to ensure visibility, even if the client doesn't fully support the JSON schema.
  • Rental Actors are only available for use with the hosted MCP server at https://mcp.apify.com. When running the server locally via stdio, you can only access Actors that are already added to your local toolset. To dynamically search for and use any Actor from the Apify Storeβ€”including rental Actorsβ€”connect to the hosted endpoint.

🀝 Contributing

We welcome contributions to improve the Apify MCP Server! Here's how you can help:

  • πŸ› Report issues: Find a bug or have a feature request? Open an issue.
  • πŸ”§ Submit pull requests: Fork the repo and submit pull requests with enhancements or fixes.
  • πŸ“š Documentation: Improvements to docs and examples are always welcome.
  • πŸ’‘ Share use cases: Contribute examples to help other users.

For major changes, please open an issue first to discuss your proposal and ensure it aligns with the project's goals.

πŸ“š Learn more