Skip to content
Conduit

mcp server

stealth-scraper-mcp

MCP server that scrapes any web page into clean, token-efficient Markdown for AI agents

Set up

Runs on your computer. Pick your agent and operating system.

Before you start

  • uv (`curl -LsSf https://astral.sh/uv/install.sh | sh`)
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "stealth-scraper-mcp": {
      "command": "uvx",
      "args": [
        "stealth-scraper-mcp"
      ]
    }
  }
}

same format Cursor, GitHub Copilot CLI, Junie, JetBrains AI Assistant, Augment (Auggie CLI), Factory Droid, Kiro, Devin CLI +12

Values in angle brackets are placeholders. Restart Claude Desktop after editing its config.Claude Desktop docs

README

synced Oct 23, 2026

Stealth Web Scraper MCP

An MCP server that fetches any web page and returns clean, token-efficient Markdown for AI agents.

  • Tiered fetching, cheapest first: direct HTTP, browser, HTTP via residential proxy, browser via proxy. Each tier runs only when the previous one is blocked.
  • Fast path: curl_cffi with real browser TLS fingerprints (Chrome, Safari, Firefox, Edge), rotated on retry.
  • Browser fallback: when a page is blocked or needs JavaScript, it is rendered in your installed Google Chrome (or Playwright's Chromium).
  • Fewer tokens: pass query to get only the passages that answer a question, ranked with BM25. Long pages are paginated.
  • Safe by default: refuses localhost and private-network URLs, binds to 127.0.0.1, optional API key.

Benchmark

Measured on 30 real sites (docs, reference, news, shops, JavaScript apps and bot-protected sites), with no proxy. Each site was fetched once. Full results are in benchmark/RESULTS.md; re-run with PYTHONPATH=src python benchmark/run.py.

Result
Success rate, no proxy24/30 (80%)
Tokens vs raw HTML, clean Markdown97.9% fewer (median 90,222 → 1,901)
Tokens vs raw HTML, with query99.6% fewer (median 341)
Median time2.6 s HTTP, 11.4 s browser

The 6 misses: three sites behind strict bot protection that need a residential proxy (Etsy, G2, Glassdoor), and three image-heavy homepages with little text.

Install

Claude Code:

claude mcp add stealth-scraper -- uvx stealth-scraper-mcp

Claude Desktop, Cursor, VS Code and other clients (mcpServers config):

{
  "mcpServers": {
    "stealth-scraper": {
      "command": "uvx",
      "args": ["stealth-scraper-mcp"]
    }
  }
}

The browser fallback uses Google Chrome if it is installed. Otherwise download Chromium once:

uvx stealth-scraper-mcp --install-browser

Tool: scrape_url_stealth

ParameterDefaultPurpose
urlrequiredPage to fetch
querynoneReturn only the passages relevant to this question
top_k5Passages to return with query
output_formatmarkdownmarkdown, text, html or links
response_formatconcisedetailed adds engine, metadata and cache diagnostics
max_chars / offset15000 / 0Pagination; pass next_offset back as offset
max_age_seconds1 hourCache freshness; 0 forces a fresh fetch, -1 reads only the cache
render_jsautoalways or never force or skip the browser
proxyautoauto uses the residential proxy only after a block; never or always
css_selectornoneOnly return matching elements
wait_for_selector, scrollnone / falseBrowser options for dynamic and lazy-loaded pages

Errors come back as [code] message Hint: ..., e.g. blocked, timeout, url_not_allowed, selector_not_found.

Running over HTTP

uvx stealth-scraper-mcp --transport http --port 8080

The endpoint is http://127.0.0.1:8080/mcp, with /health for checks. To expose it on a network, set an API key first:

SCRAPER_API_KEY=change-me SCRAPER_HOST=0.0.0.0 uvx stealth-scraper-mcp --transport http

Clients then send Authorization: Bearer change-me.

Configuration

VariableDefaultPurpose
SCRAPER_PROXY_URLnoneResidential proxy, used only after a direct fetch is blocked
SCRAPER_API_KEYnoneRequire a bearer token on HTTP
SCRAPER_HOST / SCRAPER_PORT127.0.0.1 / 8080HTTP bind address
SCRAPER_CACHE_TTL3600Default cache freshness in seconds
SCRAPER_CACHE_MAX_ENTRIES256Cache size
SCRAPER_BROWSER_CHANNELchromeBrowser to launch; empty for bundled Chromium
SCRAPER_BROWSER_HEADLESStruefalse runs a visible, harder-to-detect browser
SCRAPER_BROWSER_LOCALE / SCRAPER_BROWSER_TIMEZONEen-US / systemKeep these consistent with your proxy's location
SCRAPER_ALLOW_PRIVATE_NETWORKSfalseAllow localhost and private IPs
SCRAPER_FETCH_TIMEOUT, SCRAPER_MAX_RETRIES20, 2Request timeout and retries

Plugins

Packages can extend the server through the stealth_scraper_mcp.plugins entry point group. They can add usage metering, extra HTTP routes and CLI commands; see src/stealth_scraper_mcp/plugins.py. Without plugins the server is free and unmetered.

Responsible use

Respect each site's terms of service and robots.txt, and avoid heavy request rates.

License

AGPL-3.0-or-later. You can use, modify and self-host this freely. If you offer a modified version to others as a network service, you must publish your changes under the same license.

↑↓ navigate openesc close