Apify Actors
Visit ProjectUse 3,000+ pre-built cloud tools to extract data from websites, e-commerce, social media, search engines, maps, and more.
Visit ProjectCategory
Tags
What is Apify MCP Server?
The Apify MCP Server is an implementation of the Model Context Protocol (MCP) designed to enable interaction with Apify Actors, which are pre-built cloud tools for data extraction from websites, e-commerce, social media, search engines, maps, and more. The server facilitates the use of over 3,000 Apify Actors as tools for AI agents and assistants.
How to use Apify MCP Server?
The Apify MCP Server can be used in two primary ways: as an HTTP server via Server-Sent Events (SSE) or as a local server via standard input/output (stdio).
For HTTP Server (SSE):
- Start the Server: Send an HTTP GET request with your Apify API token to initiate the server in Standby mode. The server URL can be found here.
- Interact with SSE: Use Server-Sent Events to send messages to and receive responses from the server. For example, you can use the Tester MCP Client to interact with the server.
For Local Server (stdio):
- Install Prerequisites: Ensure you have Node.js (v18 or higher) and an Apify API token.
- Configure Client: Set up an MCP client like Claude Desktop or VS Code to use the Apify MCP Server. Add the server configuration to the client settings.
- Start the Server: Run the server locally using the command
npx -y @apify/actors-mcp-server
. - Interact with the Server: Use the configured client to interact with the server. You can ask the AI agent to perform tasks like web scraping, data extraction, and more using the Apify Actors.
Key Features of Apify MCP Server
- Pre-built Integration: Supports over 3,000 Apify Actors for various data extraction tasks.
- MCP Compatibility: Complies with the Model Context Protocol (MCP) for seamless integration with AI agents and clients.
- Multiple Usage Modes: Can be used as an HTTP server (SSE) or a local server (stdio).
- Dynamic Actor Management: Allows AI agents to discover and use Apify Actors dynamically.
- Extended Functionality: Provides access to Apify's datasets, key-value stores, and other resources.
Use Cases of Apify MCP Server
- Web Scraping: Use Actors like Google Search Results Scraper to scrape Google Search Engine Results Pages (SERPs).
- Social Media Data Extraction: Use Instagram Scraper to extract posts, profiles, and comments from Instagram.
- E-commerce Data Extraction: Use Amazon Scraper to extract product data such as reviews, prices, and product details.
- AI Agent Integration: Integrate Apify Actors with AI agents to perform tasks like researching trends, analyzing data, and generating reports.
- Custom Workflows: Create custom workflows using Apify Actors for specific data extraction and processing tasks.
FAQ from Apify MCP Server
-
What is the Model Context Protocol (MCP)?
The Model Context Protocol (MCP) is an open protocol that enables secure, controlled interactions between AI applications, AI agents, and local or remote resources. It allows AI agents to connect to external tools and data sources, such as Apify Actors, for performing specific tasks.
-
How can I configure Claude Desktop to work with the Apify MCP Server?
To configure Claude Desktop, enable Developer Mode, edit the configuration file (
claude_desktop_config.json
), and add the server configuration. Restart Claude Desktop and use the 🔌 icon to confirm the connection. You can ask the AI agent to perform tasks using Apify Actors. -
What are the limitations of the Apify MCP Server?
The Actor input schema is processed to be compatible with most MCP clients while adhering to JSON Schema standards. Memory for each Actor is limited to 4GB. Free users have an 8GB limit, with 128MB allocated for running the Apify MCP Server.
-
Can I use Apify MCP Server with other MCP clients?
Yes, you can use Apify MCP Server with various MCP clients such as VS Code, LibreChat, and more. See the MCP Clients page for a list of compatible clients.
Apify Model Context Protocol (MCP) Server
Implementation of an MCP server for all Apify Actors. This server enables interaction with one or more Apify Actors that can be defined in the MCP Server configuration.
The server can be used in two ways:
- 🇦 MCP Server Actor – HTTP server accessible via Server-Sent Events (SSE), see guide
- ⾕ MCP Server Stdio – Local server available via standard input/output (stdio), see guide
You can also interact with the MCP server using a chat-like UI with 💬 Tester MCP Client
🎯 What does Apify MCP server do?
The MCP Server Actor 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 Google Maps contact details
- 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
MCP Clients
To interact with the Apify MCP server, you can use MCP clients such as:
- Claude Desktop (only Stdio support)
- Visual Studio Code (Stdio and SSE support)
- LibreChat (Stdio and SSE support, yet without Authorization header)
- Apify Tester MCP Client (SSE support with Authorization headers)
- Other clients at https://modelcontextprotocol.io/clients
- More clients at https://glama.ai/mcp/clients
When you have Actors integrated with the MCP server, you can ask:
- "Search the web and summarize recent trends about AI Agents"
- "Find the top 10 best 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 with source URLs"
- "What Apify Actors can I use?"
The following image shows how the Apify MCP server interacts with the Apify platform and AI clients:
With the MCP Tester client you can load Actors dynamically but this is not yet supported by other MCP clients. We also plan to add more features, see Roadmap for more details.
🔄 What is the Model Context Protocol?
The Model Context Protocol (MCP) allows AI applications (and AI agents), such as Claude Desktop, to connect to external tools and data sources. MCP is an open protocol that enables secure, controlled interactions between AI applications, AI Agents, and local or remote resources.
For more information, see the Model Context Protocol website or the blog post What is MCP and why does it matter?.
🤖 How is MCP Server related to AI Agents?
The Apify MCP Server exposes Apify's Actors through the MCP protocol, allowing AI Agents or frameworks that implement the MCP protocol to access all Apify Actors as tools for data extraction, web searching, and other tasks.
To learn more about AI Agents, explore our blog post: What are AI Agents? and browse Apify's curated AI Agent collection. Interested in building and monetizing your own AI agent on Apify? Check out our step-by-step guide for creating, publishing, and monetizing AI agents on the Apify platform.
🧱 Components
Tools
Actors
Any Apify Actor can be used as a tool. By default, the server is pre-configured with the Actors specified below, but this can be overridden by providing Actor input.
'apify/rag-web-browser'
The MCP server loads the Actor input schema and creates MCP tools corresponding to the Actors. See this example of input schema for the RAG Web Browser.
The tool name must always be the full Actor name, such as apify/rag-web-browser
.
The arguments for an MCP tool represent the input parameters of the Actor.
For example, for the apify/rag-web-browser
Actor, the arguments are:
{
"query": "restaurants in San Francisco",
"maxResults": 3
}
You don't need to specify the input parameters or which Actor to call; everything is managed by an LLM. 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 powerful features of MCP with Apify is dynamic actor tooling – the ability for an AI agent to find new tools (Actors) as needed and incorporate them. Here are some special MCP operations and how Apify MCP Server supports them:
- Actor discovery and management: Search for Actors (
search-actors
), view details (get-actor-details
), and dynamically add or remove tools (add-actor
,remove-actor
). - Actor execution and monitoring: Start Actor runs, fetch run results (
get-actor-run
), logs (get-actor-log
), and abort runs (abort-actor-run
). - Dataset access: List datasets, retrieve dataset info and items (
get-dataset
,get-dataset-list
,get-dataset-items
). - Key-value store access: List key-value stores, view keys, and retrieve records (
get-key-value-store-list
,get-key-value-store
,get-key-value-store-keys
,get-key-value-store-record
). - Built-in help tool: A static helper (
apify-actor-help-tool
) that returns usage info for the Apify MCP Server.
Prompt & Resources
The server does not provide any resources and prompts. We plan to add Apify's dataset and key-value store as resources in the future.
⚙️ Usage
The Apify MCP Server can be used in two ways: as an Apify Actor running on the Apify platform or as a local server running on your machine.
🇦 MCP Server Actor
Standby web server
The Actor runs in Standby mode with an HTTP web server that receives and processes requests.
To start the server with default Actors, send an HTTP GET request with your Apify API token to the following URL:
https://actors-mcp-server.apify.actor?token= ``` It is also possible to start the MCP server with a different set of Actors. To do this, create a [task](https://docs.apify.com/platform/actors/running/tasks) and specify the list of Actors you want to use. Then, run the task in Standby mode with the selected Actors: ```shell https://USERNAME--actors-mcp-server-task.apify.actor?token= ``` You can find a list of all available Actors in the [Apify Store](https://apify.com/store). #### 💬 Interact with the MCP Server over SSE Once the server is running, you can interact with Server-Sent Events (SSE) to send messages to the server and receive responses. The easiest way is to use [Tester MCP Client](https://apify.com/jiri.spilka/tester-mcp-client) on Apify. [Claude Desktop](https://claude.ai/download) currently lacks SSE support, but you can use it with Stdio transport; see [MCP Server at a local host](#-mcp-server-at-a-local-host) for more details. Note: The free version of Claude Desktop may experience intermittent connection issues with the server. In the client settings, you need to provide server configuration: ```json { "mcpServers": { "apify": { "type": "sse", "url": "https://actors-mcp-server.apify.actor/sse", "env": { "APIFY_TOKEN": "your-apify-token" } } } } ``` ## ⾕ MCP Server at a local host You can run the Apify MCP Server on your local machine by configuring it with Claude Desktop or any other [MCP client](https://modelcontextprotocol.io/clients). You can also use [Smithery](https://smithery.ai/server/@apify/actors-mcp-server) to install the server automatically. ### Prerequisites - MacOS or Windows - The latest version of Claude Desktop must be installed (or another MCP client) - [Node.js](https://nodejs.org/en) (v18 or higher) - [Apify API Token](https://docs.apify.com/platform/integrations/api#api-token) (`APIFY_TOKEN`) Make sure you have the `node` and `npx` installed properly: ```bash node -v npx -v ``` If not, follow this guide to install Node.js: [Downloading and installing Node.js and npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm). #### Claude Desktop To configure Claude Desktop to work with the MCP server, follow these steps. For a detailed guide, refer to the [Claude Desktop Users Guide](https://modelcontextprotocol.io/quickstart/user) or watch the [video tutorial](https://youtu.be/gf5WXeqydUU?t=440). 1. Download Claude for desktop - Available for Windows and macOS. - For Linux users, you can build a Debian package using this [unofficial build script](https://github.com/aaddrick/claude-desktop-debian). 2. Open the Claude Desktop app and enable **Developer Mode** from the top-left menu bar. 3. Once enabled, open **Settings** (also from the top-left menu bar) and navigate to the **Developer Option**, where you'll find the **Edit Config** button. 4. Open the configuration file and edit the following file: - On macOS: `~/Library/Application\ Support/Claude/claude_desktop_config.json` - On Windows: `%APPDATA%/Claude/claude_desktop_config.json` - On Linux: `~/.config/Claude/claude_desktop_config.json` ```json { "mcpServers": { "actors-mcp-server": { "command": "npx", "args": ["-y", "@apify/actors-mcp-server"], "env": { "APIFY_TOKEN": "your-apify-token" } } } } ``` Alternatively, you can use the `actors` argument to select one or more Apify Actors: ```json { "mcpServers": { "actors-mcp-server": { "command": "npx", "args": [ "-y", "@apify/actors-mcp-server", "--actors", "lukaskrivka/google-maps-with-contact-details,apify/instagram-scraper" ], "env": { "APIFY_TOKEN": "your-apify-token" } } } } ``` 5. Restart Claude Desktop - Fully quit Claude Desktop (ensure it's not just minimized or closed). - Restart Claude Desktop. - Look for the 🔌 icon to confirm that the Actors MCP server is connected. 6. Open the Claude Desktop chat and ask "What Apify Actors can I use?"  7. Examples You can ask Claude to perform tasks, such as: ```text Find and analyze recent research papers about LLMs. Find the top 10 best Italian restaurants in San Francisco. Find and analyze the Instagram profile of The Rock. ``` To understand how to set up and run the MCP server on Claude, you can watch this short video tutorial ▷ on YouTube: [Apify MCP Server Tutorial: Integrate 5,000+ Apify Actors and Agents Into Claude](https://www.youtube.com/watch?v=UOkJm9pTgMw) #### VS Code For one-click installation, click one of the install buttons below: [](https://insiders.vscode.dev/redirect/mcp/install?name=actors-mcp-server&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40apify%2Factors-mcp-server%22%5D%2C%22env%22%3A%7B%22APIFY_TOKEN%22%3A%22%24%7Binput%3Aapify_token%7D%22%7D%7D&inputs=%5B%7B%22type%22%3A%22promptString%22%2C%22id%22%3A%22apify_token%22%2C%22description%22%3A%22Apify+API+Token%22%2C%22password%22%3Atrue%7D%5D) [](https://insiders.vscode.dev/redirect/mcp/install?name=actors-mcp-server&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40apify%2Factors-mcp-server%22%5D%2C%22env%22%3A%7B%22APIFY_TOKEN%22%3A%22%24%7Binput%3Aapify_token%7D%22%7D%7D&inputs=%5B%7B%22type%22%3A%22promptString%22%2C%22id%22%3A%22apify_token%22%2C%22description%22%3A%22Apify+API+Token%22%2C%22password%22%3Atrue%7D%5D&quality=insiders) ##### Manual installation You can manually install the Apify MCP Server in VS Code. First, click one of the install buttons at the top of this section for a one-click installation. Alternatively, add the following JSON block to your User Settings (JSON) file in VS Code. You can do this by pressing `Ctrl + Shift + P` and typing `Preferences: Open User Settings (JSON)`. ```json { "mcp": { "inputs": [ { "type": "promptString", "id": "apify_token", "description": "Apify API Token", "password": true } ], "servers": { "actors-mcp-server": { "command": "npx", "args": ["-y", "@apify/actors-mcp-server"], "env": { "APIFY_TOKEN": "${input:apify_token}" } } } } } ``` Optionally, you can add it to a file called `.vscode/mcp.json` in your workspace - just omit the top-level `mcp {}` key. This will allow you to share the configuration with others. If you want to specify which Actors to load, you can add the `--actors` argument: ```json { "servers": { "actors-mcp-server": { "command": "npx", "args": [ "-y", "@apify/actors-mcp-server", "--actors", "lukaskrivka/google-maps-with-contact-details,apify/instagram-scraper" ], "env": { "APIFY_TOKEN": "${input:apify_token}" } } } } ``` #### VS Code For one-click installation, click one of the install buttons below: [](https://insiders.vscode.dev/redirect/mcp/install?name=actors-mcp-server&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40apify%2Factors-mcp-server%22%5D%2C%22env%22%3A%7B%22APIFY_TOKEN%22%3A%22%24%7Binput%3Aapify_token%7D%22%7D%7D&inputs=%5B%7B%22type%22%3A%22promptString%22%2C%22id%22%3A%22apify_token%22%2C%22description%22%3A%22Apify+API+Token%22%2C%22password%22%3Atrue%7D%5D) [](https://insiders.vscode.dev/redirect/mcp/install?name=actors-mcp-server&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40apify%2Factors-mcp-server%22%5D%2C%22env%22%3A%7B%22APIFY_TOKEN%22%3A%22%24%7Binput%3Aapify_token%7D%22%7D%7D&inputs=%5B%7B%22type%22%3A%22promptString%22%2C%22id%22%3A%22apify_token%22%2C%22description%22%3A%22Apify+API+Token%22%2C%22password%22%3Atrue%7D%5D&quality=insiders) ##### Manual installation You can manually install the Apify MCP Server in VS Code. First, click one of the install buttons at the top of this section for a one-click installation. Alternatively, add the following JSON block to your User Settings (JSON) file in VS Code. You can do this by pressing `Ctrl + Shift + P` and typing `Preferences: Open User Settings (JSON)`. ```json { "mcp": { "inputs": [ { "type": "promptString", "id": "apify_token", "description": "Apify API Token", "password": true } ], "servers": { "actors-mcp-server": { "command": "npx", "args": ["-y", "@apify/actors-mcp-server"], "env": { "APIFY_TOKEN": "${input:apify_token}" } } } } } ``` Optionally, you can add it to a file called `.vscode/mcp.json` in your workspace - just omit the top-level `mcp {}` key. This will allow you to share the configuration with others. If you want to specify which Actors to load, you can add the `--actors` argument: ```json { "servers": { "actors-mcp-server": { "command": "npx", "args": [ "-y", "@apify/actors-mcp-server", "--actors", "lukaskrivka/google-maps-with-contact-details,apify/instagram-scraper" ], "env": { "APIFY_TOKEN": "${input:apify_token}" } } } } ``` #### Debugging NPM package @apify/actors-mcp-server with @modelcontextprotocol/inspector To debug the server, use the [MCP Inspector](https://github.com/modelcontextprotocol/inspector) tool: ```shell export APIFY_TOKEN=your-apify-token npx @modelcontextprotocol/inspector npx -y @apify/actors-mcp-server ``` # 👷🏼 Development ## Prerequisites - [Node.js](https://nodejs.org/en) (v18 or higher) - Python 3.9 or higher Create an environment file `.env` with the following content: ```text APIFY_TOKEN=your-apify-token ``` Build the actor-mcp-server package: ```bash npm run build ``` ## Local client (SSE) To test the server with the SSE transport, you can use the script `examples/clientSse.ts`: Currently, the Node.js client does not support establishing a connection to a remote server with custom headers. You need to change the URL to your local server URL in the script. ```bash node dist/examples/clientSse.js ``` ## Debugging Since MCP servers operate over standard input/output (stdio), debugging can be challenging. For the best debugging experience, use the [MCP Inspector](https://github.com/modelcontextprotocol/inspector). You can launch the MCP Inspector via [`npm`](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) with this command: ```bash export APIFY_TOKEN=your-apify-token npx @modelcontextprotocol/inspector node ./dist/stdio.js ``` Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging. ## ⓘ Limitations and feedback The Actor input schema is processed to be compatible with most MCP clients while adhering to [JSON Schema](https://json-schema.org/) 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 JSON schema properly. - **Nested properties** are built for special cases like proxy configuration and request list sources to ensure 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 JSON schema. Memory for each Actor is limited to 4GB. Free users have an 8GB limit, 128MB needs to be allocated for running `Actors-MCP-Server`. If you need other features or have any feedback, [submit an issue](https://console.apify.com/actors/1lSvMAaRcadrM1Vgv/issues) in Apify Console to let us know. # 🚀 Roadmap (March 2025) - Add Apify's dataset and key-value store as resources. - Add tools such as Actor logs and Actor runs for debugging. # 🐛 Troubleshooting - Make sure you have the `node` installed by running `node -v` - Make sure you have the `APIFY_TOKEN` environment variable set - Always use the latest version of the MCP server by setting `@apify/actors-mcp-server@latest` # 📚 Learn more - [Model Context Protocol](https://modelcontextprotocol.org/) - [What are AI Agents?](https://blog.apify.com/what-are-ai-agents/) - [What is MCP and why does it matter?](https://blog.apify.com/what-is-model-context-protocol/) - [How to use MCP with Apify Actors](https://blog.apify.com/how-to-use-mcp/) - [Tester MCP Client](https://apify.com/jiri.spilka/tester-mcp-client) - [AI agent workflow: building an agent to query Apify datasets](https://blog.apify.com/ai-agent-workflow/) - [MCP Client development guide](https://github.com/cyanheads/model-context-protocol-resources/blob/main/guides/mcp-client-development-guide.md) - [How to build and monetize an AI agent on Apify](https://blog.apify.com/how-to-build-an-ai-agent/)