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:

~/Library/Application Support/Claude/claude_desktop_config.json
{
  "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

terminal
claude mcp add webclaw -- npx -y @webclaw/mcp

Or 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:

~/.cursor/mcp.json
{
  "mcpServers": {
    "webclaw": {
      "command": "npx",
      "args": ["-y", "@webclaw/mcp"],
      "env": {
        "WEBCLAW_API_KEY": "<YOUR_API_KEY>"
      }
    }
  }
}

Windsurf

Add webclaw to your Windsurf MCP config:

~/.windsurf/mcp.json
{
  "mcpServers": {
    "webclaw": {
      "command": "npx",
      "args": ["-y", "@webclaw/mcp"],
      "env": {
        "WEBCLAW_API_KEY": "<YOUR_API_KEY>"
      }
    }
  }
}

OpenCode

Add webclaw to your OpenCode config:

~/.config/opencode/opencode.json
{
  "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:

~/.codex/config.toml
[mcp_servers.webclaw]
command = "npx"
args = ["-y", "@webclaw/mcp"]
enabled = true

Antigravity

Antigravity uses the same mcpServers JSON format as Claude Desktop:

Antigravity MCP config
{
  "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.

1

Local HTTP fetch -- fast, free (~80% of sites)

2

Detect bot-protected or JavaScript-heavy pages

3

Automatic cloud API fallback (requires WEBCLAW_API_KEY)

Environment variables

VariableDescription
WEBCLAW_API_KEYEnables cloud fallback for bot-protected and JS-rendered sites
OPENAI_API_KEYEnables extract and summarize tools (OpenAI provider)
OPENAI_BASE_URLOpenAI-compatible endpoint for local or hosted compatible backends
OPENAI_RESPONSE_FORMAT_TYPEResponse mode for OpenAI-compatible backends: json_object, json_schema, or text. Defaults to json_object.
ANTHROPIC_API_KEYEnables extract and summarize tools (Anthropic provider)
ANTHROPIC_BASE_URLAnthropic-compatible endpoint. Defaults to the official Anthropic API.
OLLAMA_HOSTCustom Ollama URL (default: localhost:11434)
Tip
For LM Studio or another OpenAI-compatible backend, set OPENAI_RESPONSE_FORMAT_TYPE to text or json_schemaif the backend rejects OpenAI's default JSON object mode.
Note
The MCP server uses the 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.

ParamTypeRequiredDescription
urlstringYesURL to scrape.
formatstringNoOutput format: markdown, llm, text, json, links, rawHtml, attributes, or query.
include_selectorsstring[]NoCSS selectors to include exclusively.
exclude_selectorsstring[]NoCSS selectors to remove.
only_main_contentbooleanNoExtract only the main content element.
browserstringNoBrowser profile: chrome, firefox, or random.

2. crawl

Crawl a website with BFS traversal.

ParamTypeRequiredDescription
urlstringYesStarting URL.
depthnumberNoMax crawl depth. Default: 2.
max_pagesnumberNoMax pages to extract. Default: 50.
concurrencynumberNoConcurrent requests. Default: 5.
use_sitemapbooleanNoSeed queue with sitemap URLs.
formatstringNoOutput format for each page.

3. map

Discover all URLs on a site via sitemap parsing.

ParamTypeRequiredDescription
urlstringYesBase URL of the site to map.

4. batch

Extract content from multiple URLs concurrently.

ParamTypeRequiredDescription
urlsstring[]YesArray of URLs to extract.
formatstringNoOutput format for each URL.
concurrencynumberNoMax 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.

ParamTypeRequiredDescription
urlstringYesURL to extract data from.
promptstringNo*Natural language extraction prompt. When provided without a schema, the LLM auto-generates a schema first.
schemastringNo*JSON schema string defining the output structure.

6. summarize

Generate a concise summary of a web page.

ParamTypeRequiredDescription
urlstringYesURL to summarize.
max_sentencesnumberNoMax sentences in summary. Default: 3.

7. diff

Track content changes between snapshots.

ParamTypeRequiredDescription
urlstringYesURL to scrape for current version.
previous_snapshotstringYesJSON string of a previous extraction result.

8. brand

Extract brand identity (colors, fonts, logos) from a site.

ParamTypeRequiredDescription
urlstringYesURL 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).

ParamTypeRequiredDescription
namestringYesExtractor name, e.g. github_pr, reddit, amazon_product.
urlstringYesURL that matches the extractor's claimed pattern.

11. search

Search the web and return structured results.

ParamTypeRequiredDescription
querystringYesSearch query.
num_resultsintegerNoNumber of results to return (default 5, max 10).
scrapebooleanNoFetch and extract each result page.
countrystringNoCountry code for localization, e.g. us, gb, it.
langstringNoLanguage code for localization, e.g. en, it.

12. research

Run a deep, multi-source research investigation. Requires WEBCLAW_API_KEY.

ParamTypeRequiredDescription
querystringYesResearch query or question to investigate.
topicstringNoTopic hint to focus research, e.g. technology, finance.
deepbooleanNoEnable 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.

ParamTypeRequiredDescription
urlstringYesCompany website URL to enrich.
no_cachebooleanNoSkip 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.

ParamTypeRequiredDescription
urlsstring[]YesCompany website URLs to enrich (up to 25).
no_cachebooleanNoSkip 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.

Tool call: extract
{
  "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.

Tool call: map
{
  "url": "https://nextjs.org/docs"
}
Tool call: batch
{
  "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"
}
Tip
The MCP server runs the same extraction engine as the REST API and CLI. Every tool produces identical output to its REST API counterpart.

Ready to build? Start extracting.

Cancel anytime. One key for every format and endpoint.