servo-fetch
When to use
- A URL returns empty or incomplete content with simple HTTP fetch (SPA, React, Vue)
- You need a screenshot of a web page in CI/Docker (no GPU available)
- You need to evaluate JavaScript in a page context (DOM queries, data extraction)
- You want clean Markdown from a documentation site, blog, or article
- You need to crawl an entire documentation site or blog for RAG / knowledge ingestion
- You need the accessibility tree with bounding boxes for a page
When NOT to use
- The page is simple static HTML (use
curl or built-in web fetch instead)
- You need to interact with the page (click, fill forms) — servo-fetch is read-only
- You need full Chromium compatibility for complex web apps
Tools (MCP)
Start the MCP server: servo-fetch mcp (stdio) or servo-fetch mcp --port 8080 (Streamable HTTP)
fetch
Extract readable content from a URL. JavaScript is executed, CSS layout is computed, and navigation noise (navbars, sidebars, footers, cookie banners) is stripped automatically.
Parameters:
url (required): URL to fetch (http/https only)
format: "markdown" (default), "json", "html", "text", or "accessibility_tree"
selector: CSS selector to extract a specific section instead of full-page extraction
maxLength: max characters to return (default 5000)
startIndex: character offset for pagination
visibility: "moderate" (default), "strict", or "off"
- common:
timeout (s, default 30), settleMs (ms, default 0), userAgent, cookiesFile, headers
fetch(url: "https://docs.rs/tokio", format: "markdown")
fetch(url: "https://example.com", format: "json", selector: "article")
fetch(url: "https://example.com", format: "accessibility_tree")
PDF URLs are auto-detected via Content-Type and extracted directly.
batch_fetch
Fetch multiple URLs in parallel. Results are returned as separate content entries in completion order. Failed URLs are reported inline without aborting the batch.
Parameters:
urls (required): array of URLs to fetch (http/https only, max 20)
format: "markdown" (default), "json", "html", "text", or "accessibility_tree"
selector: CSS selector to extract a specific section
maxLength: max characters per URL result (default 5000)
visibility: "moderate" (default), "strict", or "off"
- common:
timeout (s, default 30), settleMs (ms, default 0), userAgent, cookiesFile, headers
batch_fetch(urls: ["https://a.com", "https://b.com"], format: "markdown")
batch_fetch(urls: ["https://a.com", "https://b.com"], format: "json", selector: "article")
crawl
Crawl a website starting from a URL, following same-site links via BFS. JavaScript is executed, CSS layout is computed, and navigation noise is stripped. Respects robots.txt.
Parameters:
url (required): starting URL to crawl (http/https only)
limit: max pages to crawl (default 50, max 500)
maxDepth: max link depth from seed (default 3, max 10)
format: "markdown" (default) or "json"
include: URL path patterns to include (e.g. ["/docs/**"])
exclude: URL path patterns to exclude
maxLength: max characters per page result (default 5000)
selector: CSS selector to extract a specific section per page
- common:
timeout (s, default 30), settleMs (ms, default 0), userAgent, cookiesFile, headers
crawl(url: "https://docs.example.com", limit: 20, maxDepth: 3)
crawl(url: "https://docs.example.com", include: ["/guide/**"], limit: 50)
screenshot
Capture a PNG screenshot. Uses Servo's software renderer — works without GPU.
Parameters:
url (required): URL to capture
fullPage: capture the full scrollable page (default false)
- common:
timeout (s, default 30), settleMs (ms, default 0), userAgent, cookiesFile, headers
screenshot(url: "https://example.com")
screenshot(url: "https://example.com", fullPage: true)
execute_js
Evaluate a JavaScript expression after the page loads. Console messages (log, warn, error) are appended to the result.
Parameters:
url (required): URL to load
expression (required): JavaScript expression to evaluate
- common:
timeout (s, default 30), settleMs (ms, default 0), userAgent, cookiesFile, headers
execute_js(url: "https://example.com", expression: "document.title")
execute_js(url: "https://example.com", expression: "[...document.querySelectorAll('h2')].map(e => e.textContent)")
CLI
servo-fetch https://example.com # Markdown (default)
servo-fetch https://example.com --format json # Structured JSON
servo-fetch URL1 URL2 URL3 # Parallel batch (Markdown with separators)
servo-fetch URL1 URL2 --format json # Parallel batch (NDJSON)
servo-fetch https://example.com --format png -o out.png # Save PNG screenshot
servo-fetch https://example.com --js "document.title" # Run JavaScript and print result
servo-fetch https://example.com --selector article # Extract a section by CSS selector
servo-fetch https://example.com --schema schema.json # Schema-driven JSON
servo-fetch https://example.com --cookies cookies.txt # Send session cookies
servo-fetch https://example.com -H "Authorization: Bearer TOKEN" # Custom request header (repeatable)
servo-fetch https://example.com --format html # Raw HTML
servo-fetch https://example.com --format text # Plain text
servo-fetch https://example.com -t 60 # Custom timeout
servo-fetch https://example.com --settle 500 # Extra wait for SPAs
servo-fetch crawl https://docs.example.com --limit 20 # Crawl a site (BFS)
servo-fetch crawl https://docs.example.com --include "/docs/**" # Crawl with path filter
servo-fetch URL --output page.md # Save a single URL to a file
servo-fetch crawl URL --output-dir ./pages/ # One file per page
Gotchas
- Servo's web compatibility is improving but not at Chromium level — best for docs, blogs, and SSR sites
- Private/reserved IP addresses are blocked (SSRF protection)
- Default timeout is 30 seconds; increase with
timeout parameter for slow pages
- Cookie banners and newsletter popups are stripped via injected user stylesheets
For pagination patterns, format selection, and MCP configuration, see references/guide.md.
Source: konippi/servo-fetch — distributed by TomeVault.
1---2name: servo-fetch3description: Fetch and render web pages using the Servo browser engine — a single binary with JS execution, CSS layout, screenshots, and content extraction. Use when a URL returns empty or incomplete content with plain HTTP fetch, when you need a screenshot without GPU, or when you need to run JavaScript in a page context. No browser download required. Use when this capability is needed.4---56# servo-fetch78## When to use910- A URL returns empty or incomplete content with simple HTTP fetch (SPA, React, Vue)11- You need a screenshot of a web page in CI/Docker (no GPU available)12- You need to evaluate JavaScript in a page context (DOM queries, data extraction)13- You want clean Markdown from a documentation site, blog, or article14- You need to crawl an entire documentation site or blog for RAG / knowledge ingestion15- You need the accessibility tree with bounding boxes for a page1617## When NOT to use1819- The page is simple static HTML (use `curl` or built-in web fetch instead)20- You need to interact with the page (click, fill forms) — servo-fetch is read-only21- You need full Chromium compatibility for complex web apps2223## Tools (MCP)2425Start the MCP server: `servo-fetch mcp` (stdio) or `servo-fetch mcp --port 8080` (Streamable HTTP)2627### fetch2829Extract readable content from a URL. JavaScript is executed, CSS layout is computed, and navigation noise (navbars, sidebars, footers, cookie banners) is stripped automatically.3031Parameters:3233- `url` (required): URL to fetch (http/https only)34- `format`: `"markdown"` (default), `"json"`, `"html"`, `"text"`, or `"accessibility_tree"`35- `selector`: CSS selector to extract a specific section instead of full-page extraction36- `maxLength`: max characters to return (default 5000)37- `startIndex`: character offset for pagination38- `visibility`: `"moderate"` (default), `"strict"`, or `"off"`39- common: `timeout` (s, default 30), `settleMs` (ms, default 0), `userAgent`, `cookiesFile`, `headers`4041```text42fetch(url: "https://docs.rs/tokio", format: "markdown")43fetch(url: "https://example.com", format: "json", selector: "article")44fetch(url: "https://example.com", format: "accessibility_tree")45```4647PDF URLs are auto-detected via Content-Type and extracted directly.4849### batch_fetch5051Fetch multiple URLs in parallel. Results are returned as separate content entries in completion order. Failed URLs are reported inline without aborting the batch.5253Parameters:5455- `urls` (required): array of URLs to fetch (http/https only, max 20)56- `format`: `"markdown"` (default), `"json"`, `"html"`, `"text"`, or `"accessibility_tree"`57- `selector`: CSS selector to extract a specific section58- `maxLength`: max characters per URL result (default 5000)59- `visibility`: `"moderate"` (default), `"strict"`, or `"off"`60- common: `timeout` (s, default 30), `settleMs` (ms, default 0), `userAgent`, `cookiesFile`, `headers`6162```text63batch_fetch(urls: ["https://a.com", "https://b.com"], format: "markdown")64batch_fetch(urls: ["https://a.com", "https://b.com"], format: "json", selector: "article")65```6667### crawl6869Crawl a website starting from a URL, following same-site links via BFS. JavaScript is executed, CSS layout is computed, and navigation noise is stripped. Respects robots.txt.7071Parameters:7273- `url` (required): starting URL to crawl (http/https only)74- `limit`: max pages to crawl (default 50, max 500)75- `maxDepth`: max link depth from seed (default 3, max 10)76- `format`: `"markdown"` (default) or `"json"`77- `include`: URL path patterns to include (e.g. `["/docs/**"]`)78- `exclude`: URL path patterns to exclude79- `maxLength`: max characters per page result (default 5000)80- `selector`: CSS selector to extract a specific section per page81- common: `timeout` (s, default 30), `settleMs` (ms, default 0), `userAgent`, `cookiesFile`, `headers`8283```text84crawl(url: "https://docs.example.com", limit: 20, maxDepth: 3)85crawl(url: "https://docs.example.com", include: ["/guide/**"], limit: 50)86```8788### screenshot8990Capture a PNG screenshot. Uses Servo's software renderer — works without GPU.9192Parameters:9394- `url` (required): URL to capture95- `fullPage`: capture the full scrollable page (default false)96- common: `timeout` (s, default 30), `settleMs` (ms, default 0), `userAgent`, `cookiesFile`, `headers`9798```text99screenshot(url: "https://example.com")100screenshot(url: "https://example.com", fullPage: true)101```102103### execute_js104105Evaluate a JavaScript expression after the page loads. Console messages (log, warn, error) are appended to the result.106107Parameters:108109- `url` (required): URL to load110- `expression` (required): JavaScript expression to evaluate111- common: `timeout` (s, default 30), `settleMs` (ms, default 0), `userAgent`, `cookiesFile`, `headers`112113```text114execute_js(url: "https://example.com", expression: "document.title")115execute_js(url: "https://example.com", expression: "[...document.querySelectorAll('h2')].map(e => e.textContent)")116```117118## CLI119120```bash121servo-fetch https://example.com # Markdown (default)122servo-fetch https://example.com --format json # Structured JSON123servo-fetch URL1 URL2 URL3 # Parallel batch (Markdown with separators)124servo-fetch URL1 URL2 --format json # Parallel batch (NDJSON)125servo-fetch https://example.com --format png -o out.png # Save PNG screenshot126servo-fetch https://example.com --js "document.title" # Run JavaScript and print result127servo-fetch https://example.com --selector article # Extract a section by CSS selector128servo-fetch https://example.com --schema schema.json # Schema-driven JSON129servo-fetch https://example.com --cookies cookies.txt # Send session cookies130servo-fetch https://example.com -H "Authorization: Bearer TOKEN" # Custom request header (repeatable)131servo-fetch https://example.com --format html # Raw HTML132servo-fetch https://example.com --format text # Plain text133servo-fetch https://example.com -t 60 # Custom timeout134servo-fetch https://example.com --settle 500 # Extra wait for SPAs135servo-fetch crawl https://docs.example.com --limit 20 # Crawl a site (BFS)136servo-fetch crawl https://docs.example.com --include "/docs/**" # Crawl with path filter137servo-fetch URL --output page.md # Save a single URL to a file138servo-fetch crawl URL --output-dir ./pages/ # One file per page139```140141## Gotchas142143- Servo's web compatibility is improving but not at Chromium level — best for docs, blogs, and SSR sites144- Private/reserved IP addresses are blocked (SSRF protection)145- Default timeout is 30 seconds; increase with `timeout` parameter for slow pages146- Cookie banners and newsletter popups are stripped via injected user stylesheets147148For pagination patterns, format selection, and MCP configuration, see `references/guide.md`.149150---151> Source: [konippi/servo-fetch](https://github.com/konippi/servo-fetch) — distributed by [TomeVault](https://tomevault.io).152<!-- tomevault:4.0:skill_md:2026-07-04 -->