ScraperAPI MCP server
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
The ScraperAPI MCP server enables LLM clients to retrieve and process web scraping requests using the ScraperAPI services.
This is the self-hosted (local) server. A hosted (remote) version is also available.
Table of Contents
- Features
- Architecture
- Installation
- Available tools
- Configuration
- Settings
- Client Setup
- Development
Features
- Full implementation of the Model Context Protocol specification
- Seamless integration with ScraperAPI for web scraping
- Simple setup with Python or Docker
Architecture
Installation
The ScraperAPI MCP Server is designed to run as a local server on your machine, your LLM client will launch it automatically when configured.
Prerequisites
- Python 3.11+
- Docker (optional)
Using Python
Install the package:
Add this to your client configuration file:
Using Docker
Add this to your client configuration file:
> [!TIP]
>
> If your command is not working (for example, you see a package not found error when trying to start the server), double-check the path you are using. To find the correct path, activate your virtual environment first, then run:
>
Available tools
API
scrape — Scrape any web page or image, bypassing anti-bot protection
Retrieve the content of a web page, or download an image, from a URL.
| Parameter | Type | Description | Required |
|-----------|------|-------------|----------|
| url | string | Target URL to scrape | Yes |
| render | boolean | Enable JavaScript rendering for dynamic pages (default: false) | No |
| country_code | string | ISO 2-letter country code for geo-targeting | No |
| premium | boolean | Use premium residential/mobile proxies (default: false) | No |
| ultra_premium | boolean | Advanced anti-bot bypass; incompatible with premium (default: false) | No |
| device_type | string | mobile or desktop user agent | No |
| output_format | string | markdown (default), text, csv, or json | No |
| autoparse | boolean | Auto-parse supported sites into structured data (default: false) | No |
Returns: the scraped content as a string, or image data for image URLs.
SDEs
Structured Data Endpoints (SDEs) return pre-parsed JSON (or CSV) instead of raw HTML. Every SDE tool also accepts output_format (json by default, or csv), tld, and country_code, shown in each tool's table.
Google
google_search — Parsed Google Search (SERP) results
| Parameter | Type | Description | Required |
|-----------|------|-------------|----------|
| query | string | Search query, as typed into Google | Yes |
| num | integer | Number of results to return on the page | No |
| start | integer | Zero-based result offset for pagination | No |
| hl | string | Interface/host language code (e.g. en, es) | No |
| gl | string | Country edition to search (2-letter code) | No |
| uule | string | Google uule geolocation string (advanced) | No |
| date_range_start | string | Start of a custom date range, MM/DD/YYYY | No |
| date_range_end | string | End of a custom date range, MM/DD/YYYY | No |
| time_period | string | Recent window: 1H, 1D, 1W, 1M, or 1Y | No |
| include_html | boolean | Include raw HTML alongside parsed data (default: false) | No |
| tbs | string | Raw Google tbs filter parameter (advanced) | No |
| output_format | string | json (default) or csv | No |
| tld | string | Top-level domain (e.g. com, co.uk) | No |
| country_code | string | ISO 2-letter country code for geo-targeting | No |
google_news — Parsed Google News results
| Parameter | Type | Description | Required |
|-----------|------|-------------|----------|
| query | string | Search query | Yes |
| num | integer | Number of results to return on the page | No |
| start | integer | Zero-based result offset for pagination | No |
| hl | string | Interface/host language code | No |
| gl | string | Country edition to search (2-letter code) | No |
| uule | string | Google uule geolocation string (advanced) | No |
| date_range_start | string | Start of a custom date range, MM/DD/YYYY | No |
| date_range_end | string | End of a custom date range, MM/DD/YYYY | No |
| time_period | string | Recent window: 1H, 1D, 1W, 1M, or 1Y | No |
| output_format | string | json (default) or csv | No |
| tld | string | Top-level domain (e.g. com, co.uk) | No |
| country_code | string | ISO 2-letter country code for geo-targeting | No |
google_jobs — Parsed Google Jobs listings
| Parameter | Type | Description | Required |
|-----------|------|-------------|----------|
| query | string | Search query | Yes |
| num | integer | Number of results to return on the page | No |