Veilbrowser is a stealth automation runtime for AI agents that drives real Chrome through native CDP (Chrome DevTools Protocol), without using Playwright, Puppeteer, or WebDriver, and with zero runtime dependencies. The project is built by HamTek, written in TypeScript, and natively supports MCP.
Purpose and Positioning
Veil's goal is to let AI agents operate on hostile websites as real Chrome. It does not reimplement the browser, but instead replaces the automation layer that is easily detected. It is officially stated to pass sannysoft 57/57 detection and to bypass Cloudflare's JS challenge.
Main Capabilities
- Stealth automation: uses real Chrome's binary, TLS, JS engine, and canvas/WebGL/font fingerprints.
- Attach to an already running Chrome: attach to an already running browser via Browser.connect(), reuse logged-in sessions, and avoid starting a new browser that results in a brand-new, logged-out session.
- Native MCP support: comes with an MCP server, so any agent can obtain stealth browsing capability as a tool.
- Agent-first tools: snapshot() returns a flat numbered index based on the accessibility tree, using stable refs instead of CSS/XPath selectors; screenshot() returns a PNG buffer; click/fill/type drive real CDP input with human-like dynamics; waitFor(expr) replaces fixed waits; goto() returns { status, ok }; blockResources(types, {urls}) can discard specified resources.
- FedCM support: drives the native "Sign in with Google" account chooser through CDP's FedCM domain, and can be enabled on demand.
- Fingerprint control: uses real Chrome fingerprints by default; Fingerprint presets or random self-consistent configurations can also be applied, setting UA, client hints, screen, time zone, etc. through CDP Emulation.*, with page-level overrides only for values that CDP cannot set.
- Private network protection: by default blocks visited sites from port-scanning localhost/LAN.
Usage
Prerequisites: Chrome/Chromium in PATH (or set VEIL_CHROME=/path/to/chrome), and Bun. Install in the project: bun add @achamm/veilbrowser or npm install @achamm/veilbrowser. Attach to a logged-in browser: use Browser.connect(). The Python frontend is located in the python/ directory and provides the same core API.
Applicable Scenarios
- TypeScript agents and MCP hosts need to drive the browser programmatically.
- Need to reuse logged-in sessions and websites that score by session (such as Google, Reddit, Meta, TikTok).
- Automation tasks that need to bypass anti-bot detection such as Cloudflare.
Limitations and Notes
- Attaching to a Chrome profile makes that profile part of the agent's security boundary, and the agent can access everything that profile is logged into. It is recommended to use a dedicated profile and only log into the sites required for the task.
- Fingerprint control is "consistent identity presentation," not a universal solution, and cannot by itself defeat any specific hard target.
- navigator.oscpu is intentionally not set; screen.colorDepth follows the profile but rendered pixels still come from the host GPU; WebGL canvas readback is handled by vendor overrides and does not add noise.
- Attached pages do not reapply fingerprints, because modifying the navigator properties of an already fingerprinted document is more easily detected.
- FedCM should be enabled on demand; enabling it globally will cause sites that silently probe FedCM to hang.
- Official materials do not provide specific information such as fees, pricing, or platform support scope, so none is provided for now.