A lightweight, stealthy headless browser written in Rust — drop-in compatible with Puppeteer and Playwright, built for AI agents and web scraping at scale.
Obscura is an open-source headless browser engine written in Rust, purpose-built for web scraping and AI agent automation. It runs real JavaScript through V8 (via deno_core), implements the Chrome DevTools Protocol, and serves as a drop-in replacement for headless Chrome with both Puppeteer and Playwright — without requiring Chrome, Node.js, or any runtime dependencies.
Where headless Chrome weighs in at 200+ MB RAM and ~2 seconds to start, Obscura uses around 30 MB of memory, starts instantly, and loads pages in tens of milliseconds. Its architecture is a workspace of focused Rust crates — each responsible for one layer: networking, DOM parsing, JavaScript execution, CDP dispatch, and the MCP server — wired together with strict layering rules to keep the codebase auditable and extensible.
Stealth mode (opt-in at compile time with --features stealth) brings per-session fingerprint randomization across GPU, screen, canvas, audio, and battery signals, realistic navigator.userAgentData, event.isTrusted spoofing, native function masking, and a bundled tracker blocklist covering over 3,500 domains. This makes Obscura meaningfully harder to detect than stock headless Chrome without relying on external browser patches or third-party anti-detect layers.
Obscura also ships a first-class MCP server (obscura serve --mcp), letting AI coding agents drive browser sessions directly over the Model Context Protocol — fetching pages, extracting structured data, filling forms, and intercepting network traffic — all without leaving the agent’s tool interface.
obscura mcp) for direct integration with AI agents over the Model Context Protocol, exposing browser tools like navigate, click, extract, fill, and interceptobscura scrape with configurable concurrency and a worker subprocess architecture that scales across CPU cores--storage-dir, allowing authenticated sessions to survive across runsobscura scrape with 25+ concurrent workers across hundreds of URLs, extracting JavaScript-rendered content at a fraction of Chrome’s memory costobscura serve --port 9222 and switch from headless Chrome without modifying test or scraping scriptsobscura crate directly to drive browser sessions from within a Rust application, using the typed Browser, Page, and Element API instead of CDP over a socketArchitecture Obscura is organized as a strictly layered Rust workspace where each crate owns exactly one responsibility and cross-crate calls only flow upward through the layer above, never sideways. The CLI crate is the entry point that wires together the CDP server, the browser context, and the MCP server; the CDP dispatcher routes incoming WebSocket frames to domain handlers, which call into the browser layer; the browser layer coordinates the JavaScript runtime, DOM tree, and network client without any of those layers knowing about the protocol above them. The single V8 isolate is shared across all pages in a process and protected by a process-wide async mutex, while a per-command watchdog running on a dedicated thread can terminate the isolate if any synchronous V8 work overruns its budget — ensuring that a stuck page cannot wedge other sessions or hold the process.
Tech Stack The runtime is Rust (edition 2021, targeting stable 1.75+) built on the Tokio async runtime with a LocalSet because V8 is inherently single-threaded and non-Send. JavaScript execution uses deno_core’s JsRuntime with a pre-compiled V8 snapshot that embeds the bootstrap environment — window, document, navigator, fetch, IndexedDB, MutationObserver, and other browser globals — as Rust ops exposed to JS via the deno_core op system. HTML parsing uses html5ever with servo_arc for shared DOM node ownership. Networking is built on reqwest with full rustls TLS, optional SOCKS5 proxy support, and a custom cookie jar; stealth mode swaps in wreq for TLS ClientHello randomization. The CDP transport is a WebSocket server built on tokio-tungstenite, and the MCP transport is a plain HTTP/JSON-RPC server with optional origin allowlisting.
Code Quality The codebase has a thorough integration test suite covering CDP protocol parity, concurrent navigation, MCP CORS preflight, and click/submit semantics — all at the system level rather than unit-testing internals. Error handling leans on thiserror for typed domain errors and anyhow for application-level context; panics inside DOM ops are caught with catch_unwind to prevent V8 FFI aborts. The workspace enforces strict crate layering as a structural invariant, comments are abundant with explicit rationale for non-obvious decisions (TLS coherence issues, SSRF mitigations, OOM caps on MCP request bodies), and the release profile deliberately keeps panic=“unwind” so the anti-panic protocol in V8 ops works correctly.
What Makes It Unique Obscura’s most technically distinctive property is that its stealth mode is not a layer applied on top of a real browser — it is native to the engine. Fingerprint properties like canvas noise, AudioContext hash randomization, and GPU renderer strings are injected through the same V8 bootstrap that defines all other browser globals, so they cannot be detected by timing the injection or inspecting property descriptors. The MCP server is a first-class transport built into the binary itself, not a thin adapter around a CDP client, giving AI agents structured browser tools without an intermediate process. The single-isolate design with a watchdog-based preemption mechanism is a deliberate trade-off that keeps memory at 30 MB while still supporting concurrent sessions — a design choice that makes Obscura fundamentally different from multi-process Chrome rather than just a lighter wrapper around it.
Obscura is released under the Apache License 2.0, one of the most permissive open-source licenses in common use. You can use it commercially, modify the source, redistribute it in your own products, and build proprietary software on top of it — all without any copyleft obligation. The only requirements are attribution and preserving the license notice. There is no dual-licensing, no open-core restriction, and the README explicitly states that the Apache-2.0 engine will remain fully featured with no feature gating.
Running Obscura yourself is operationally straightforward compared to hosting a Chromium-based browser stack. The binary ships as a single self-contained executable (70 MB), the Docker image is under 60 MB compressed and built on a distroless base with no shell, and the only runtime dependency is glibc 2.35+ on Linux. You are responsible for keeping the binary updated as new releases appear (roughly every two weeks in the current cadence), managing your own proxy infrastructure if you need residential or rotating IPs, and handling storage persistence for cookie/localStorage sessions via the --storage-dir flag. There is no daemon, no background service manager, and no external database.
The hosted alternative in development is Obscura Cloud, announced after reaching 10,000 stars — a managed version that adds residential proxy infrastructure and dedicated support. As of the current release it is waitlist-only with no published pricing. Until Obscura Cloud ships, self-hosting means you own all uptime, scaling, and incident response. For teams that need high concurrency, the recommended pattern is running multiple obscura worker processes behind a load balancer rather than a single long-lived server, since the single-isolate design bounds per-process parallelism.
No Code Platforms · AI Development · Developer Tools
Visual LLM workflow platform with RAG pipelines, agent capabilities, and model management for building production AI applications.
Developer Tools · Game Development · Design Tools
Free, MIT-licensed 2D and 3D game engine with one-click multi-platform export and no royalties.
Developer Tools · Databases · Search
The open-source Postgres development platform that replaces Firebase with authentication, real-time APIs, edge functions, storage, and vector embeddings — all built on PostgreSQL.