MCP server for Apify web scraping platform
## Apify MCP Server: Web Scraping and Automation Platform The **Apify MCP Server** integrates the web scraping platform into Google Antigravity, enabling developers to run actors, manage datasets, and automate web data extraction at scale. ### Why Apify MCP? - **Actor ecosystem** - 1000+ ready-to-use scrapers - **Scalable crawling** - Distributed web crawling - **Dataset management** - Store and export scraped data - **Proxy rotation** - Built-in proxy infrastructure - **Scheduling** - Automated actor runs ### Key Features #### 1. Actor Execution ```python # Run actor run = await mcp.call("apify", "run_actor", { "actor_id": "apify/web-scraper", "input": { "startUrls": [{"url": "https://example.com"}] } }) print(f"Run ID: {run[\"id\"]}") # Wait for completion result = await mcp.call("apify", "wait_for_run", { "run_id": run["id"] }) ``` #### 2. Dataset Access ```python # Get dataset items items = await mcp.call("apify", "get_dataset", { "dataset_id": run["defaultDatasetId"], "limit": 100 }) for item in items: print(f"Title: {item[\"title\"]}") # Export dataset export = await mcp.call("apify", "export_dataset", { "dataset_id": run["defaultDatasetId"], "format": "json" }) ``` #### 3. Key-Value Store ```python # Store data await mcp.call("apify", "set_value", { "store_id": "default", "key": "last_run_timestamp", "value": "2024-01-15T10:00:00Z" }) # Get data value = await mcp.call("apify", "get_value", { "store_id": "default", "key": "last_run_timestamp" }) ``` #### 4. Task Scheduling ```python # Create scheduled task task = await mcp.call("apify", "create_task", { "actor_id": "apify/web-scraper", "name": "Daily Scrape", "options": {"cron": "0 9 * * *"} }) # List task runs runs = await mcp.call("apify", "list_task_runs", { "task_id": task["id"] }) ``` ### Configuration ```json { "mcpServers": { "apify": { "command": "npx", "args": ["-y", "@anthropic/mcp-apify"], "env": { "APIFY_TOKEN": "your-api-token" } } } } ``` ### Use Cases **Data Extraction**: Scrape data from any website. **Price Monitoring**: Track competitor prices. **Lead Generation**: Extract business contact data. **Content Aggregation**: Collect content from sources. The Apify MCP Server enables scalable web scraping.
{
"mcpServers": {
"apify": {
"mcpServers": {
"apify": {
"env": {
"APIFY_TOKEN": "YOUR_APIFY_TOKEN"
},
"args": [
"-y",
"@apify/mcp-server"
],
"command": "npx"
}
}
}
}
}