MCP server
The webclaw MCP (Model Context Protocol) server exposes the full extraction engine as tools that AI agents can call directly. Works with Claude Desktop, Claude Code, Cursor, Windsurf, OpenCode, Codex, Antigravity, and any MCP-compatible client.
What is MCP
Model Context Protocol is an open standard for connecting AI models to external tools and data sources. Instead of making HTTP calls manually, an AI agent discovers available tools through the MCP server and calls them natively. The webclaw MCP server communicates over stdio transport and exposes 14 tools covering scraping, crawling, extraction, and more.
Setup
Claude Desktop
Add webclaw to your Claude Desktop config file:
{
"mcpServers": {
"webclaw": {
"command": "npx",
"args": ["-y", "@webclaw/mcp"],
"env": {
"WEBCLAW_API_KEY": "<YOUR_API_KEY>"
}
}
}
}npx fetches the launcher automatically — no build or PATH setup. The WEBCLAW_API_KEY enables automatic cloud fallback for bot-protected pages and JavaScript-heavy sites. Without it, extraction works for ~80% of sites via local HTTP.
Claude Code
claude mcp add webclaw -- npx -y @webclaw/mcpOr add the JSON config above to your Claude Desktop config file. Claude Code auto-discovers MCP servers from the same config.
Cursor
Add webclaw to your Cursor MCP config:
{
"mcpServers": {
"webclaw": {
"command": "npx",
"args": ["-y", "@webclaw/mcp"],
"env": {
"WEBCLAW_API_KEY": "<YOUR_API_KEY>"
}
}
}
}Windsurf
Add webclaw to your Windsurf MCP config:
{
"mcpServers": {
"webclaw": {
"command": "npx",
"args": ["-y", "@webclaw/mcp"],
"env": {
"WEBCLAW_API_KEY": "<YOUR_API_KEY>"
}
}
}
}OpenCode
Add webclaw to your OpenCode config:
{
"mcp": {
"webclaw": {
"type": "local",
"command": ["npx", "-y", "@webclaw/mcp"],
"enabled": true
}
}
}Codex
Add webclaw to your Codex config. Codex supports both a CLI and desktop app:
[mcp_servers.webclaw]
command = "npx"
args = ["-y", "@webclaw/mcp"]
enabled = trueAntigravity
Antigravity uses the same mcpServers JSON format as Claude Desktop:
{
"mcpServers": {
"webclaw": {
"command": "npx",
"args": ["-y", "@webclaw/mcp"],
"env": {
"WEBCLAW_API_KEY": "<YOUR_API_KEY>"
}
}
}
}Other MCP clients
Any MCP client that supports stdio transport can connect to webclaw-mcp. Point the client at the binary and it will discover all available tools through the standard MCP handshake.
Smart Fetch
The MCP server uses a local-first architecture. Most scrapes happen locally over HTTP (free, no API credits). When a page is bot-protected or JavaScript-heavy, it automatically falls back to the webclaw cloud API, which returns the real content.
Local HTTP fetch -- fast, free (~80% of sites)
Detect bot-protected or JavaScript-heavy pages
Automatic cloud API fallback (requires WEBCLAW_API_KEY)
Environment variables
| Variable | Description |
|---|---|
WEBCLAW_API_KEY | Enables cloud fallback for bot-protected and JS-rendered sites |
OPENAI_API_KEY | Enables extract and summarize tools (OpenAI provider) |
OPENAI_BASE_URL | OpenAI-compatible endpoint for local or hosted compatible backends |
OPENAI_RESPONSE_FORMAT_TYPE | Response mode for OpenAI-compatible backends: json_object, json_schema, or text. Defaults to json_object. |
ANTHROPIC_API_KEY | Enables extract and summarize tools (Anthropic provider) |
ANTHROPIC_BASE_URL | Anthropic-compatible endpoint. Defaults to the official Anthropic API. |
OLLAMA_HOST | Custom Ollama URL (default: localhost:11434) |
OPENAI_RESPONSE_FORMAT_TYPE to text or json_schemaif the backend rejects OpenAI's default JSON object mode.rmcp crate (the official Rust MCP SDK) and communicates over stdio. No network ports are opened.Tools
The MCP server exposes 14 tools. Each tool maps to a corresponding REST API endpoint.
1. scrape
Extract content from a single URL.
| Param | Type | Required | Description |
|---|---|---|---|
url | string | Yes | URL to scrape. |
format | string | No | Output format: markdown, llm, text, json, links, rawHtml, attributes, or query. |
include_selectors | string[] | No | CSS selectors to include exclusively. |
exclude_selectors | string[] | No | CSS selectors to remove. |
only_main_content | boolean | No | Extract only the main content element. |
browser | string | No | Browser profile: chrome, firefox, or random. |
2. crawl
Crawl a website with BFS traversal.
| Param | Type | Required | Description |
|---|---|---|---|
url | string | Yes | Starting URL. |
depth | number | No | Max crawl depth. Default: 2. |
max_pages | number | No | Max pages to extract. Default: 50. |
concurrency | number | No | Concurrent requests. Default: 5. |
use_sitemap | boolean | No | Seed queue with sitemap URLs. |
format | string | No | Output format for each page. |
3. map
Discover all URLs on a site via sitemap parsing.
| Param | Type | Required | Description |
|---|---|---|---|
url | string | Yes | Base URL of the site to map. |
4. batch
Extract content from multiple URLs concurrently.
| Param | Type | Required | Description |
|---|---|---|---|
urls | string[] | Yes | Array of URLs to extract. |
format | string | No | Output format for each URL. |
concurrency | number | No | Max concurrent requests. Default: 5. |
5. extract
Extract structured JSON data using an LLM. Supports prompt-to-schema generation -- when only a prompt is provided (no schema), the LLM generates a JSON schema first, then extracts data matching it.
| Param | Type | Required | Description |
|---|---|---|---|
url | string | Yes | URL to extract data from. |
prompt | string | No* | Natural language extraction prompt. When provided without a schema, the LLM auto-generates a schema first. |
schema | string | No* | JSON schema string defining the output structure. |
6. summarize
Generate a concise summary of a web page.
| Param | Type | Required | Description |
|---|---|---|---|
url | string | Yes | URL to summarize. |
max_sentences | number | No | Max sentences in summary. Default: 3. |
7. diff
Track content changes between snapshots.
| Param | Type | Required | Description |
|---|---|---|---|
url | string | Yes | URL to scrape for current version. |
previous_snapshot | string | Yes | JSON string of a previous extraction result. |
8. brand
Extract brand identity (colors, fonts, logos) from a site.
| Param | Type | Required | Description |
|---|---|---|---|
url | string | Yes | URL of the site to analyze. |
9. list_extractors
Return the catalog of all 28 vertical extractors with their names, labels, and URL patterns. Takes no parameters. See the vertical extractors reference for the full list.
10. vertical_scrape
Run a specific vertical extractor on a URL. Returns typed JSON with fields specific to the target site (Reddit, GitHub, Amazon, YouTube, and more).
| Param | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Extractor name, e.g. github_pr, reddit, amazon_product. |
url | string | Yes | URL that matches the extractor's claimed pattern. |
11. search
Search the web and return structured results.
| Param | Type | Required | Description |
|---|---|---|---|
query | string | Yes | Search query. |
num_results | integer | No | Number of results to return (default 5, max 10). |
scrape | boolean | No | Fetch and extract each result page. |
country | string | No | Country code for localization, e.g. us, gb, it. |
lang | string | No | Language code for localization, e.g. en, it. |
12. research
Run a deep, multi-source research investigation. Requires WEBCLAW_API_KEY.
| Param | Type | Required | Description |
|---|---|---|---|
query | string | Yes | Research query or question to investigate. |
topic | string | No | Topic hint to focus research, e.g. technology, finance. |
deep | boolean | No | Enable deep mode for a more thorough investigation. |
13. lead
Enrich a company URL into an outreach-ready lead — founders and leadership with LinkedIn and X, plus a company summary. Requires WEBCLAW_API_KEY.
| Param | Type | Required | Description |
|---|---|---|---|
url | string | Yes | Company website URL to enrich. |
no_cache | boolean | No | Skip the cache and force a fresh enrichment. |
14. lead_batch
Enrich up to 25 company URLs into outreach-ready leads in one async batch. Requires WEBCLAW_API_KEY.
| Param | Type | Required | Description |
|---|---|---|---|
urls | string[] | Yes | Company website URLs to enrich (up to 25). |
no_cache | boolean | No | Skip the cache and force a fresh enrichment. |
Example conversations
Here is how an AI agent might use the webclaw MCP tools in practice.
User
Scrape the Stripe pricing page and pull out all the plan names and prices.
Claude (using webclaw MCP)
I will use the extract tool to pull structured pricing data from the page.
{
"url": "https://stripe.com/pricing",
"prompt": "Extract all plan names, monthly prices, and included features"
}User
Crawl the Next.js docs and summarize the top 5 pages.
Claude (using webclaw MCP)
I will first map the site to discover pages, then crawl and summarize the most important ones.
{
"url": "https://nextjs.org/docs"
}{
"urls": [
"https://nextjs.org/docs",
"https://nextjs.org/docs/getting-started",
"https://nextjs.org/docs/routing",
"https://nextjs.org/docs/rendering",
"https://nextjs.org/docs/data-fetching"
],
"format": "llm"
}