servo-fetch is a self-contained browser engine for fetching, rendering, and extracting web page content, with output formats including Markdown, JSON, or screenshots, requiring no Chromium, no API keys, and no additional configuration. It embeds the Servo browser engine, can execute JavaScript, compute CSS layout, take screenshots using a software renderer, and extract clean content. The tool provides four forms of use: CLI, Rust library, Python SDK, and Node.js SDK.
Main capabilities
- Zero dependencies: a single binary file, no Chromium needed, and no API keys needed.
- Real JS execution: JavaScript is run by SpiderMonkey, and a parallel CSS engine computes layout.
- Layout- and visibility-aware extraction: strips navigation bars, sidebars, and footers based on rendered position, and removes cookie banners, popups, and CSS-hidden content (such as opacity:0, aria-hidden, sr-only).
- Schema-driven JSON: extracts structured data through declarative CSS selector schemas.
- Parallel batch fetching: can concurrently fetch multiple URLs.
- Isolated browser sessions: each session uses a one-off worker process, fully isolating cookies and storage.
- Site crawling: BFS-based link traversal, with support for robots.txt, same-site scope, and rate limiting.
- URL discovery: sitemap-based URL mapping, no rendering required, fast and lightweight.
- GPU-free screenshots: the software renderer can capture PNG or full-page screenshots in any environment.
- Accessibility tree: integrates AccessKit, providing roles, names, and bounding boxes.
- Agent-oriented: can serve as a plug-and-play web tool for AI agents, with a built-in MCP server, and can also wrap the Python API as a tool in any agent framework.
Performance and quality On Apple M3 Pro, compared with Playwright (a typical AI agent tech stack): in extraction quality, the average word-F1 on test samples of eight page types is 0.819, while Readability is 0.728; without[] boilerplate content removal rate is 95.0%, while the latter is 78.6%. Direct binary engine comparable tools (chrome-headless-shell, Lightpanda, curl) are optional comparison items. For methodology, three-axis breakdown, per-sample F1, and raw JSON, see benchmarks/README.md and benchmarks/results/.
Installation and usage Downloadable from GitHub Releases. Linux requires installing runtime dependencies, and on headless servers use xvfb-run. On Windows, cargo binstall does not copy sidecar files (cargo-binstall#353), so the installed servo-fetch.exe will fail to start due to a missing libEGL.dll; instead, download the .zip from Releases, which contains libEGL.dll and libGLESv2.dll. macOS requires no additional setup.
CLI: batch fetching attempts every URL, and a non-zero exit code is returned if any fetch fails. Crawling exits non-zero due to page failure only if all attempted pages fail. Command-level failures are still fatal errors; a closed output pipe is treated as success. For the full CLI reference, see servo-fetch-cli.
Rust library: for the full API reference, see servo-fetch.
Python SDK: requires Python 3.11 or later; for the full API reference, see bindings/python; the bundled CLI can also be run directly without installation.
Node.js SDK: for the full API reference, see bindings/node.
MCP server: a built-in Model Context Protocol server providing six tools: fetch, batch_fetch, crawl, map, screenshot, and execute_js. Streaming HTTP method: servo-fetch mcp --port 8080. For the full MCP tool reference, see the servo-fetch-cli README. If you prefer in-process tools, you can wrap the Python API as an agent tool; see bindings/python/examples/strands_agent.py.
HTTP API: provides REST endpoints for containerized deployment and HTTP clients: GET /health, GET /version, POST /v1/fetch, POST /v1/batch_fetch, POST /v1/screenshot, POST /v1/execute_js, POST /v1/crawl, POST /v1/map. For the full HTTP API reference, see the servo-fetch-cli README. Multi-architecture images (linux/amd64, linux/arm64) are available on the GitHub Container Registry, run as a non-root user (UID 1001), the images are signed with cosign (keyless), and SLSA provenance and SBOM attestations are published.
Agent Skills: servo-fetch comes with an Agent Skills package for AI coding agents.
Security and Limitations servo-fetch blocks all private and reserved IP ranges (RFC 6890), strips credentials from URLs, disables HTTP redirects to prevent SSRF bypass, and sanitizes all output for terminal escape injection (CVE-2021-42574). See SECURITY.md for details. Sites behind CAPTCHAs are not supported. See CONTRIBUTING.md for development setup, commit conventions, and PR guidelines. Licensed under MIT OR Apache-2.0.