MCP Server
Connect AI clients to MrScraper through seven tools for fetching, extraction, Google search, account status, saved scraper reruns, and stored results.
MrScraper MCP connects Model Context Protocol clients to the MrScraper web-data service. It exposes seven tools:
fetch
Fetch page HTML using Web Unblocker with browser rendering and proxy routing.
scrape
Extract structured fields, listing records, or site maps with AI agents.
serp
Query Google SERP for structured search engine results and page discovery.
status
Check subscription status, quota usage, rate limits, and token metrics.
rerun
Execute new runs for saved AI or manual scraper configurations.
results
Browse, filter, paginate, and search stored MrScraper result collections.
result
Retrieve full output data and metadata for a single stored result by ID.
Use the hosted Streamable HTTP endpoint for a managed connection, or run the published MCP package locally through Streamable HTTP or stdio.
Capabilities
Web Unblocker
Fetch a known URL with browser rendering, proxy-country routing, selector waiting, resource controls, and retry limits.
AI Extraction
Extract page fields, repeated listing records, or a site URL map with agent-specific inputs.
Google SERP
Search Google from a query or a complete Google search URL and select JSON or HTML output.
Account Status
Read subscription, quota, token usage, rate limits, and optional domain request outcomes.
Saved Scrapers
Rerun saved AI or manual scraper configurations for one URL or a bulk URL list.
Stored Results
Browse, filter, paginate, and retrieve stored MrScraper results.
Managed Endpoint
Connect to the hosted MCP endpoint through Streamable HTTP with OAuth 2.1 browser sign-in.
Structured Tool Results
Receive a consistent response envelope in MCP structured content.
Requirements
- A MrScraper account
- An MCP client with Streamable HTTP support
- An API key only when the client cannot use OAuth 2.1 or when running the server locally
Quick start with the hosted server
Add the hosted endpoint
Configure a Streamable HTTP server named mrscraper with no credential:
{
"mcpServers": {
"mrscraper": {
"type": "http",
"url": "https://mcp.mrscraper.com/mcp"
}
}
}Use this exact URL, including the /mcp path.
Sign in
Connect or reload the MCP server. Your client follows the OAuth 2.1 challenge, opens MrScraper in your browser, and asks you to approve access.
Reload and verify
Reload the client or start a new session, then inspect its MCP tool list.
The connection should expose fetch, scrape, serp, status,
rerun, results, and result.
Copyable AI setup prompt
Connect MrScraper MCP to this agent. Detect the current MCP client and use its native Streamable HTTP setup to add a server named mrscraper at exactly https://mcp.mrscraper.com/mcp with no static credential. Complete the OAuth 2.1 browser sign-in; if it does not start automatically, use the client's MCP login or authenticate command. Only if the client does not support OAuth, fall back to a MrScraper API key from https://app.mrscraper.com/api-tokens stored through the client's environment-variable or secret-storage mechanism and sent as Authorization: Bearer <key>. Reload the MCP client when required, then list the tools and confirm that fetch, scrape, serp, status, rerun, results, and result are available.Client configuration
Add the hosted URL without a static Authorization header, then complete
browser sign-in when the client prompts you.
Codex
codex mcp add mrscraper \
--url https://mcp.mrscraper.com/mcpCodex uses OAuth by default for Streamable HTTP servers. If browser sign-in does
not start automatically, run codex mcp login mrscraper.
Claude Code
claude mcp add \
--transport http \
--scope user \
mrscraper https://mcp.mrscraper.com/mcpOpen /mcp inside Claude Code and authenticate, or run
claude mcp login mrscraper from your shell.
Claude and Claude Desktop
Open the custom connector form
In a general Claude chat, select the + button below the input box, then choose Connectors → Add connector → Add custom connector.

Add MrScraper
Enter MrScraper as the name and
https://mcp.mrscraper.com/mcp as the MCP server URL, then select
Continue.

Sign in
Complete the MrScraper OAuth browser flow when Claude prompts you.
Cursor
Open Cursor Settings → Tools & MCP → Add Custom MCP, then add:
{
"mcpServers": {
"mrscraper": {
"type": "http",
"url": "https://mcp.mrscraper.com/mcp"
}
}
}Refresh the MCP server list, then authenticate when prompted.
VS Code
Add the server to your user settings:
{
"mcp": {
"servers": {
"mrscraper": {
"type": "http",
"url": "https://mcp.mrscraper.com/mcp"
}
}
}
}For a workspace configuration, place the server object under servers in
.vscode/mcp.json. Start the server and VS Code opens a browser for OAuth.
Windsurf
Add the following entry to the Windsurf MCP configuration:
{
"mcpServers": {
"mrscraper": {
"serverUrl": "https://mcp.mrscraper.com/mcp"
}
}
}Refresh the MCP server list, then complete OAuth when prompted.
Other MCP clients
Use these connection values:
| Setting | Value |
|---|---|
| Name | mrscraper |
| Transport | Streamable HTTP |
| URL | https://mcp.mrscraper.com/mcp |
| Authentication | OAuth 2.1; do not configure a static header |
API key fallback
If a client cannot complete OAuth, create an API key, store it through the client's secret mechanism, and send it as a bearer token:
{
"mcpServers": {
"mrscraper": {
"type": "http",
"url": "https://mcp.mrscraper.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_MRSCRAPER_API_KEY"
}
}
}
}For Codex, pass the environment-variable name instead of embedding the key:
export MRSCRAPER_API_KEY="YOUR_MRSCRAPER_API_KEY"
codex mcp add mrscraper \
--url https://mcp.mrscraper.com/mcp \
--bearer-token-env-var MRSCRAPER_API_KEYAuthentication
| Connection | Credential source |
|---|---|
| Hosted Streamable HTTP | OAuth 2.1 browser sign-in, or an API key fallback |
| Self-hosted Streamable HTTP | Authorization: Bearer <MrScraper API key> |
| Local stdio | MRSCRAPER_API_KEY, then MRSCRAPER_API_TOKEN |
The hosted server publishes OAuth 2.1 protected-resource metadata and challenges
unauthenticated clients to start browser sign-in. Access tokens are issued for
the exact https://mcp.mrscraper.com/mcp resource and use scrape:read,
scrape:write, and account:read scopes. A tool called without its required
scope returns 403 insufficient_scope.
API keys remain supported for clients without OAuth and carry full account authority. Authentication stays at the transport layer; tools never accept credentials as arguments.
Run the MCP server locally
Node.js 20 or newer is required.
Published package over stdio
{
"mcpServers": {
"mrscraper": {
"command": "npx",
"args": ["-y", "@mrscraper/mcp@latest"],
"env": {
"MRSCRAPER_API_KEY": "YOUR_MRSCRAPER_API_KEY"
}
}
}
}Source checkout over Streamable HTTP
Clone and build
git clone https://github.com/mrscraper-com/mrscraper-mcp.git
cd mrscraper-mcp
npm ci
npm run buildStart HTTP transport
TRANSPORT=http npm startThe default endpoint is http://127.0.0.1:8000/mcp.
Connect the client
{
"mcpServers": {
"mrscraper": {
"type": "http",
"url": "http://127.0.0.1:8000/mcp",
"headers": {
"Authorization": "Bearer YOUR_MRSCRAPER_API_KEY"
}
}
}
}Docker
docker build -f docker/Dockerfile -t mrscraper-mcp .
docker run --rm -p 8000:8000 mrscraper-mcpThe image binds to `0.0.0.0). Apply network controls appropriate for the deployment and keep bearer verification enabled.
Environment variables
| Variable | Default | Purpose |
|---|---|---|
TRANSPORT | stdio | Selects stdio or http. |
HOST | 127.0.0.1 | HTTP bind address; the Docker image uses 0.0.0.0. |
PORT | 8000 | HTTP listen port. |
MRSCRAPER_API_KEY | — | Primary stdio credential. |
MRSCRAPER_API_TOKEN | — | Legacy stdio credential alias. |
MRSCRAPER_HTTP_AUTH | 1 | Enables HTTP bearer verification. |
MRSCRAPER_ALLOWED_ORIGINS | — | Comma-separated browser origins allowed to call the HTTP server. |
MRSCRAPER_API_BASE_URL | MrScraper platform API | Platform endpoint override for development and testing. |
MRSCRAPER_FETCH_BASE_URL | MrScraper Web Unblocker | Fetch endpoint override. |
MRSCRAPER_SYNC_BASE_URL | MrScraper synchronous scraper API | SERP endpoint override. |
MRSCRAPER_LOG_HTTP_PAYLOAD | off | Enables trusted-environment request-body diagnostics. |
MRSCRAPER_LOG_HTTP_PAYLOAD_MAX | 8192 | Maximum diagnostic payload length. |
Security behavior
- HTTP authentication is enabled by default.
- Credential-bearing response headers are filtered from tool output.
- Parsed JSON credential metadata and credentials in generated curl commands are redacted.
- Extracted scraper values remain available in the response's
datafield. - Browser-origin requests are accepted from trusted local origins and exact
values configured through
MRSCRAPER_ALLOWED_ORIGINS. - Tool calls receive the caller's authenticated OAuth token or API key through the MCP transport rather than through tool arguments.
Choosing the right tool
| Starting point | Desired outcome | Tool |
|---|---|---|
| A known URL | Page response from Web Unblocker | fetch |
| A known URL | Defined fields or repeated records | scrape with general or listing |
| A site root | A bounded URL map | scrape with map |
| A topic or keyword | Google result discovery | serp |
| A saved scraper ID | A new scraper run | rerun |
| An account | Usage and quota details | status |
| A result collection | Pagination, filtering, and search | results |
| A result ID | One complete stored result | result |
A discovery workflow commonly uses serp first, followed by fetch for
the page response or scrape for defined output fields. A saved-scraper
workflow commonly uses scrape, then rerun, followed by result.
Common response envelope
API-backed tools return the same envelope through MCP structuredContent and
a formatted JSON text block:
{
"status_code": 200,
"data": {},
"headers": {
"content-type": "application/json"
}
}| Field | Type | Description |
|---|---|---|
status_code | number or null | HTTP status returned by the MrScraper service, or null when the request ends before an HTTP response arrives. |
data | JSON value, string, or null | Parsed JSON or response text supplied by the service. |
headers | object | Response headers with credential-bearing headers filtered out. |
error | string, when present | Request failure summary. |
API failures preserve the envelope in structuredContent and set the MCP
result's isError flag. Input-contract errors are returned as MCP tool
errors. This lets clients inspect status, response data, and safe headers while
also following the standard MCP error signal.
Tool reference
fetch
Use fetch for a known URL when you need the page response from MrScraper
Web Unblocker. Each invocation corresponds to one
request:
GET https://api.mrscraper.com/Basic request
{
"url": "https://example.com/products"
}JavaScript-rendered page
{
"url": "https://example.com/products",
"browser_rendering": true,
"wait_for_selector": ".product-card",
"timeout": 45
}Geo-sensitive page
{
"url": "https://example.com/offers",
"browser_rendering": true,
"geo_code": "ID",
"home_page": true,
"block_resources": true,
"max_retries": 3,
"token_cap": 20
}Parameters
| Parameter | Required | Default | API query field | Description |
|---|---|---|---|---|
url | Yes | — | url | Target page URL. |
browser_rendering | No | false | browserRendering | Loads the page in a browser and executes JavaScript. |
geo_code | No | omitted | geoCode | Selects proxy-country routing. |
wait_for_selector | No | omitted | waitForSelector | Waits for a CSS selector together with browser_rendering: true. |
home_page | No | false | homePage | Visits the site root before loading the target URL. |
block_resources | No | false | blockResources | Applies resource blocking during page loading. |
max_retries | No | 3 | maxRetries | Sets the retry limit; zero is accepted. |
token_cap | No | omitted | tokenCap | Sets the retry token budget. |
timeout | No | 30 | timeout | Sets the page-load deadline in seconds. The MCP server allows an additional 30 seconds for transport. |
The response body is available in the envelope's data field, commonly as
HTML. Start with the basic request, then select browser and loading controls
that match the target page.
scrape
Use scrape when you need defined fields, repeated records, or a site URL
map. It calls:
POST https://api.app.mrscraper.com/api/v1/scrapers-aiAgent modes
| Agent | Designed for | Inputs |
|---|---|---|
general | Defined fields from one page | prompt, schema_prompt, proxy_country |
listing | Repeated records across listing pages | prompt, schema_prompt, proxy_country, max_pages |
map | Bounded URL discovery across a site | max_depth, max_pages, limit, include_patterns, exclude_patterns |
Choose inputs from the selected agent's row. The default agent is general.
General extraction
{
"url": "https://example.com/product",
"agent": "general",
"prompt": "Extract the product name, price, availability, description, and image URLs",
"proxy_country": "US"
}The request body includes url, message, and agent, plus
proxyCountry when supplied.
Listing extraction
{
"url": "https://example.com/products",
"agent": "listing",
"prompt": "Extract every product name, price, availability, and detail URL",
"max_pages": 5
}Listing requests are synchronous. Use max_pages to define the desired page
scope. When it is omitted, the service applies its configured default.
Site map
{
"url": "https://example.com",
"agent": "map",
"max_depth": 2,
"max_pages": 50,
"limit": 1000,
"include_patterns": "/products/",
"exclude_patterns": "/cart/|/checkout/"
}Map requests send url, agent, and the crawl controls supplied in the
tool call. Omitted crawl controls use service defaults.
Best-effort schema guidance
{
"url": "https://example.com/product",
"prompt": "Extract the product",
"schema_prompt": {
"type": "object",
"properties": {
"name": { "type": "string" },
"price": { "type": "number" },
"in_stock": { "type": "boolean" }
},
"required": ["name", "price"]
}
}The MCP server appends schema_prompt to the natural-language instruction as
shape guidance. Validate the returned value in the consuming application when
strict conformance is required.
Parameters
| Parameter | Required | Default | Request mapping | Description |
|---|---|---|---|---|
url | Yes | — | Body url | Target URL for every agent. |
prompt | General/listing | — | Body message | Natural-language extraction instruction. |
schema_prompt | No | omitted | Appended to message | Best-effort JSON Schema shape guidance for general/listing. |
agent | No | general | Body agent | Selects general, listing, or map. |
proxy_country | No | omitted | Body proxyCountry | Proxy country for general/listing. |
max_pages | No | service default | Body maxPages | Page bound for listing/map. |
max_depth | No | service default | Body maxDepth | Link-depth bound for map. |
limit | No | service default | Body limit | URL-result bound for map. |
include_patterns | No | service default | Body includePatterns | URL inclusion expression for map. |
exclude_patterns | No | service default | Body excludePatterns | URL exclusion expression for map. |
Reproduce a scrape with rerun
Every successful scrape creates a saved AI scraper configuration by default.
The response run object contains scraperId. Pass that UUID to rerun as
scraper_id to apply the same saved prompt and agent configuration to the
original URL or another URL:
{
"target": "https://example.com/product-2",
"type": "ai",
"scraper_id": "scraper-uuid"
}This makes the scraper configuration reproducible, but page changes and model behavior can still change the extracted values.
rerun also supports dashboard-built manual workflows and asynchronous bulk
jobs across multiple target URLs. See the full rerun section below
for the available modes and result-tracking workflow.
serp
Use serp when discovery starts from a Google query or Google search URL. It
calls:
POST https://sync.scraper.mrscraper.com/api/google/serp/v2/syncSearch query
{
"query_or_url": "iphone 17",
"region": "id",
"language": "id",
"page": 2,
"format": "json",
"render_js": false
}Google search URL
{
"query_or_url": "https://www.google.com/search?q=iphone+17&gl=us&hl=en&start=20"
}For a Google URL, the server derives:
| URL parameter | Tool request field |
|---|---|
q | query |
gl | region |
hl | language |
start | One-based page using groups of 10 results |
Explicit region, language, and page inputs take priority over the
corresponding URL values.
Parameters
| Parameter | Required | Default | Request mapping | Description |
|---|---|---|---|---|
query_or_url | Yes | — | Body query | Search query or complete Google search URL. |
region | No | URL value or omitted | Body region | Result country code. |
language | No | URL value or omitted | Body language | Result language code. |
page | No | URL value or omitted | Body page | One-based result page. |
format | No | json | Body format | Selects parsed JSON or result-page HTML. |
render_js | No | false | Body renderJs | Waits for JavaScript-rendered SERP features such as AI Overview. |
raw | No | false | Body format=html | Compatibility alias for HTML output. |
client_timeout | No | 120 | Local request deadline | Sets the upstream HTTP timeout in seconds. |
status
Use status for account information and optional domain request outcomes.
Every call reads:
GET https://api.app.mrscraper.com/api/v1/subscription-accountsSupplying domain adds:
GET https://api.app.mrscraper.com/api/v1/analytic/statusesAccount status
{}Domain analytics
{
"domain": "https://www.example.com/products",
"from": "7d",
"to": "now",
"action": "fetch",
"api_token_name": "production"
}The domain input accepts a hostname or a URL. URLs are normalized to their hostname before the analytics request.
Date syntax
| Syntax | Example | Meaning |
|---|---|---|
| Minutes | 30m | 30 minutes before the reference time |
| Hours | 24h | 24 hours before the reference time |
| Days | 7d | 7 days before the reference time |
| Weeks | 2w | 2 weeks before the reference time |
| Current time | now | Current reference time |
| ISO 8601 | 2026-08-18T12:00:00Z | Exact timestamp |
Parameters
| Parameter | Required | Default | Description |
|---|---|---|---|
domain | No | omitted | Adds request-outcome analytics for a hostname or URL. |
from | No | 24h | Analytics range start. |
to | No | now | Analytics range end. |
action | No | empty filter | Filters analytics by exact action. |
api_token_name | No | empty filter | Filters analytics by API-token name. |
Status summary
{
"kind": "mrscraper-cli-status-summary",
"source_endpoints": [
"/subscription-accounts",
"/analytic/statuses"
],
"status_code": 200,
"data": {
"account": {
"subscription_status": "active",
"enterprise": false,
"token_usage": 250,
"token_limit": 1000,
"token_remaining": 750,
"usage_percent": 25,
"rate_limit": 10,
"rate_ttl": 60,
"auto_renew": true,
"ends_at": null,
"user": {
"name": "Ada",
"email": "ada@example.com",
"verified": true
}
},
"analytics": {
"domain": "www.example.com",
"from": "2026-08-11 12:00:00 UTC",
"to": "2026-08-18 12:00:00 UTC"
}
}
}The summary selects account fields, calculates token_remaining and
usage_percent, and records every source endpoint used for the response.
When domain analytics encounter an API failure, the account summary remains in
data.account and the analytics response is available in data.analytics.
rerun
Use rerun with the UUID of an existing scraper. Choose its type and target
count independently:
- Set
typetoaifor an AI scraper created by thescrapetool. - Set
typetomanualfor a step-based workflow created in the MrScraper dashboard. MCP reruns existing manual workflows; it does not create them. - Leave
bulkasfalsefor one URL. Set it totrueto submit the same saved configuration once with a comma- or newline-separated URL list.
Manual reruns can be single or bulk. Bulk reruns can use either an AI or a
manual scraper; bulk describes the number of targets, not the scraper type.
Bulk mode submits one asynchronous backend job instead of repeating the
single-URL tool call locally. Save data.data.bulkResultId from the response
and pass it to result as result_id until the stored result is finished.
The combination of type and bulk selects one endpoint:
| Mode | Endpoint | ID parameter | Target | Crawl controls |
|---|---|---|---|---|
| Single AI | POST /scrapers-ai-rerun | scraper_id | One URL | max_depth, max_pages, limit, include_patterns, exclude_patterns |
| Bulk AI | POST /scrapers-ai-rerun/bulk | id | Comma/newline-separated URLs | Saved scraper configuration |
| Single manual | POST /scrapers-manual-rerun | scraper_id | One URL | Saved scraper configuration |
| Bulk manual | POST /scrapers-manual-rerun/bulk | id | Comma/newline-separated URLs | Saved scraper configuration |
The endpoint paths above use the platform API base:
https://api.app.mrscraper.com/api/v1Single AI rerun
{
"target": "https://example.com/products",
"type": "ai",
"scraper_id": "scraper-uuid",
"max_depth": 2,
"max_pages": 50,
"limit": 1000,
"include_patterns": "/products/",
"exclude_patterns": "/cart/|/checkout/"
}Single manual rerun
{
"target": "https://example.com/product/123",
"type": "manual",
"scraper_id": "scraper-uuid"
}Bulk AI rerun
{
"target": "https://example.com/a,https://example.com/b\nhttps://example.com/c",
"type": "ai",
"bulk": true,
"id": "scraper-uuid"
}The bulk target parser separates URLs on commas and newlines.
Parameters
| Parameter | Required | Default | Description |
|---|---|---|---|
target | Yes | — | One URL, or a comma/newline-separated URL string for bulk mode. |
type | Yes | — | Selects ai or manual. |
bulk | No | false | Selects a bulk endpoint. |
scraper_id | Single mode | — | Saved scraper UUID for one target URL. |
id | Bulk mode | — | Saved scraper UUID for the bulk target list. |
max_depth | Single AI | 2 | Crawl depth. |
max_pages | Single AI | 50 | Page bound. |
limit | Single AI | 1000 | Result bound. |
include_patterns | Single AI | empty string | URL inclusion expression. |
exclude_patterns | Single AI | empty string | URL exclusion expression. |
Manual reruns carry a compliance acknowledgment in the MCP server instructions. MCP clients should present that acknowledgment before executing a manual rerun.
results
Use results to browse stored runs through:
GET https://api.app.mrscraper.com/api/v1/resultsPaginated request
{
"sort_field": "updatedAt",
"sort_order": "desc",
"page_size": 25,
"page": 1
}Filtered request
{
"sort_field": "updatedAt",
"sort_order": "asc",
"page_size": 50,
"page": 1,
"search": "example.com",
"date_range_column": "updatedAt",
"start_at": "2026-08-01T00:00:00Z",
"end_at": "2026-08-18T23:59:59Z"
}Parameters
| Parameter | Required | Default | API query field | Description |
|---|---|---|---|---|
sort_field | No | updatedAt | sortField | Field used by the results API for sorting. |
sort_order | No | desc | sortOrder | Case-insensitive asc or desc; sent to the API in uppercase. |
page_size | No | 10 | pageSize | Number of rows per page. |
page | No | 1 | page | One-based page index. |
search | No | omitted | search | Free-text result filter. |
date_range_column | No | omitted | dateRangeColumn | Column used for the date range. |
start_at | No | omitted | startAt | Inclusive range start. |
end_at | No | omitted | endAt | Inclusive range end. |
The results API receives the sort_field value supplied by the caller.
sort_order is normalized and sent as ASC or DESC.
result
Use result when the result UUID is already known:
GET https://api.app.mrscraper.com/api/v1/results/{result_id}{
"result_id": "result-uuid"
}| Parameter | Required | Description |
|---|---|---|
result_id | Yes | Stored MrScraper result UUID. |