█

AI/TLDR

webclaw

A Rust CLI, MCP server and extraction engine that turns websites into clean markdown, JSON and LLM-ready context for agents and RAG pipelines

Web Scraping & CrawlingOpen core
Language
Rust
License
AGPL-3.0
$brew tap 0xMassi/webclaw

Overview

webclaw is a web content extraction tool written in Rust. Its README frames the problem it solves: most scraping tools hand an AI agent either a blocked page, login wall or empty app shell, or raw HTML full of navigation, scripts, styling, ads and duplicated boilerplate. webclaw turns a URL into clean content instead — markdown, plain text, cleaned HTML, structured JSON, or a compact "llm" format meant for agent context and RAG ingestion.

The repository holds the open-source CLI, an MCP server, the extraction engine and a self-hostable server, split into Rust crates: webclaw-core (HTML to markdown, text, JSON and LLM-ready output, with no network I/O so it can be used on its own), webclaw-fetch (fetching, crawling, batching and URL mapping), webclaw-llm (local and hosted LLM providers), webclaw-pdf (PDF text extraction), webclaw-mcp and webclaw-cli. Through MCP, clients such as Claude Code, Claude Desktop, Cursor, Windsurf, OpenCode and Codex CLI get scrape, crawl, map, batch, extract, summarize, diff and brand as native tools.

Two Claude Code terminals side by side: the built-in fetch of a StockX product page fails with a 403 error, while the webclaw MCP scrape returns the page's price and product-detail tables as markdown
The README demo: Claude Code's built-in fetch is blocked with a 403, while the webclaw MCP scrape tool returns the same product page as clean markdown.webclaw README ↗

The CLI and MCP server work locally without an account for the core extraction path. The same project also runs a hosted API at webclaw.io, with a free plan and paid tiers, for protected-site access, JavaScript rendering, async crawl and research jobs, web search and usage tracking; TypeScript, Python and Go SDKs call that API. LLM-powered features such as structured extraction and summaries can run against a local Ollama instance or an OpenAI-compatible, Anthropic-compatible or OrcaRouter endpoint configured through environment variables.

What it does

  • Five output formats — markdown, llm, text, json and html — plus --only-main-content and CSS --include / --exclude selectors to strip navigation, footers and ads
  • Same-origin crawling with depth and page limits, URL mapping without full extraction, and parallel batch scraping of many URLs
  • An MCP server (zero-install via npx @webclaw/mcp, or auto-configured by npx create-webclaw) that exposes scrape, crawl, map, batch, extract, summarize, diff and brand to agent clients
  • LLM-backed structured extraction and page summaries using a local Ollama model or an OpenAI-, Anthropic- or OrcaRouter-compatible provider
  • Page snapshot diffing with --diff-with and brand extraction of colors, fonts, logos and metadata with --brand
  • Optional hosted API (--cloud, or the TypeScript / Python / Go SDKs) for JavaScript rendering, protected sites, web search and research jobs, and proxy support via WEBCLAW_PROXY or a proxy pool file

Getting started

webclaw ships as a single binary. The README lists Homebrew, prebuilt macOS / Linux / Windows binaries on GitHub Releases, a Docker image and a Cargo install from Git; for agent use, an npx installer configures the MCP server for you.

Install the CLI

Homebrew is the shortest route; Docker works without installing anything locally.

bashbash
brew tap 0xMassi/webclaw
brew install webclaw

# or, with Docker
docker run --rm ghcr.io/0xmassi/webclaw https://example.com

Scrape a page into clean output

Pick a format, keep only the main content, or include and exclude elements by CSS selector.

bashbash
webclaw https://stripe.com --format markdown
webclaw https://docs.anthropic.com --format llm
webclaw https://example.com/blog/post --only-main-content

webclaw https://example.com \
  --include "article, main, .content" \
  --exclude "nav, footer, .sidebar, .ad"

Crawl a documentation site

Follow same-origin links with a depth and page cap — a typical way to prepare context for a RAG index.

bashbash
webclaw https://docs.rust-lang.org --crawl --depth 2 --max-pages 50

Connect it to your agent over MCP

Run the installer to detect supported clients and write their configs, or point any MCP client at the npx launcher yourself.

bashbash
npx create-webclaw

# or add this to your MCP client config:
{
  "mcpServers": {
    "webclaw": {
      "command": "npx",
      "args": ["-y", "@webclaw/mcp"]
    }
  }
}

Track a page over time

Save a JSON snapshot, then diff a later fetch against it — useful for pricing pages and changelogs.

bashbash
webclaw https://example.com/pricing --format json > pricing-old.json
webclaw https://example.com/pricing --diff-with pricing-old.json

Fall back to the hosted API when needed

For JavaScript-rendered or bot-protected pages, set a webclaw.io API key and add --cloud.

bashbash
export WEBCLAW_API_KEY=wc_your_key

webclaw https://example.com --cloud

Commands and code are distilled from the project's own documentation — always check the official repo for the latest.

When to use it

  • Reach for it when your coding agent's built-in fetch returns raw HTML or a blocked page and you want it to get clean page content through MCP instead
  • Reach for it when you need to crawl docs, help centers or blogs into markdown or compact LLM text for a RAG index
  • Reach for it when you want to monitor competitor pricing pages, changelogs or docs by diffing snapshots from the command line
  • Reach for it when you need messy pages turned into structured JSON for an automation, using a local Ollama model or your own LLM provider

How webclaw compares

webclaw alongside other open-source web scraping & crawling tools AI/TLDR tracks, ranked by GitHub stars.

ToolStarsWhat it does
Firecrawl★ 194kA crawling service and API that converts whole websites into clean Markdown or structured JSON ready for LLMs.
Agent Reach★ 101kA capability layer that installs, health-checks and routes readers so a CLI agent can read and search web pages, YouTube, RSS, GitHub, Reddit, Twitter/X and more without API fees.
Scrapling★ 89.2kA Python web scraping framework whose parser relocates your elements when pages change, with stealthy fetchers and a Scrapy-like spider engine for full crawls.
Crawl4AI★ 86kA local-first Python web crawler that turns pages into clean Markdown for use in RAG and LLM pipelines.
Scrapy★ 65kA mature Python framework for writing fast spiders that crawl websites and extract structured data at scale.
changedetection.io★ 35.2kA self-hosted web page change monitor with XPath/CSS/jq filters, browser steps and restock alerts, which can route every diff through an LLM to suppress noise.
ScrapeGraphAI★ 32.1kA Python library that uses LLMs and a graph pipeline to extract data from pages based on natural-language prompts.
webclaw★ 2.4kA Rust CLI, MCP server and extraction engine that turns websites into clean markdown, JSON and LLM-ready context for agents and RAG pipelines