Apify MCP
Apify MCP Server enables AI agents to extract data from websites using ready-made scrapers and automation tools. Connect via OAuth at https://mcp.apify.com for seamless access to thousands of Apify Actors.
How to Install and Use Apify MCP
Apify MCP (Model Context Protocol) server is a helpful tool to connect your AI agents with thousands of web scrapers and automation tools from the Apify Store. It allows you to extract data from social media, maps, search engines, e-commerce sites, and more. Here’s a simple guide on how to install and start using Apify MCP with practical examples.
Step 1: Prepare Your Environment
Before installing, you need to have Node.js installed on your computer. Node.js version 18 or higher is required. You can check if it is installed by running:
node -v
If this command shows a version number, you are ready. If not, download and install Node.js from nodejs.org.
You also need an Apify API token. Create an .env file in your project folder and add your token like this:
APIFY_TOKEN="your-apify-token"
Replace "your-apify-token" with your actual token from your Apify account.
Step 2: Install Apify MCP Server
Now, you can install and run the Apify MCP server using the command line. To run the server locally with the standard input/output mode, use the following command:
npx @apify/actors-mcp-server
This command will start the server and use the API token from your .env file automatically.
If you want to run the HTTP streamable MCP server for more features, run:
export APIFY_TOKEN="your-apify-token"
export APIFY_META_ORIGIN=STANDBY
apify run -p
Make sure to replace "your-apify-token" with your real token.
Step 3: Use the Hosted Apify MCP Server
If you prefer not to run the server locally, you can use the hosted Apify MCP server at:
https://mcp.apify.com
You just need to connect your MCP client like Claude.ai or Visual Studio Code using this URL. The server supports OAuth, so you can simply login and start using many preconfigured tools.
For example, to load the default tools, use:
https://mcp.apify.com?tools=actors,docs,apify/rag-web-browser
You can customize the tools you want by changing the URL parameters.
Step 4: Run with Specific Tools
You can control which tools are loaded by the server. For example, if you want to use only one specific scraping Actor from the Apify Store, run the server like this:
npx @apify/actors-mcp-server --tools apify/rag-web-browser
Or, configure the hosted server URL:
https://mcp.apify.com?tools=apify/rag-web-browser
This loads only the rag-web-browser actor tool and nothing else.
Step 5: Opt-Out of Telemetry (Optional)
By default, Apify MCP collects anonymous data to improve the service. If you want to turn this off, just add a flag when running locally:
npx @apify/actors-mcp-server --telemetry-enabled=false
Or, use this URL for the hosted server:
https://mcp.apify.com?telemetry-enabled=false
Summary Example Commands
-
Run local server with default tools:
npx @apify/actors-mcp-server -
Run local server with only one tool:
npx @apify/actors-mcp-server --tools apify/rag-web-browser -
Use hosted server with default tools:
https://mcp.apify.com?tools=actors,docs,apify/rag-web-browser -
Disable telemetry locally:
npx @apify/actors-mcp-server --telemetry-enabled=false
Now, your AI assistant can easily use powerful Apify Actors for web scraping, data extraction, and automation through the Apify MCP server. Enjoy exploring thousands of ready-made scrapers with simple setup!