🔥 An advanced, production-ready anti-detect browser framework for Python.
Built with stealth at its core • CDP-Based • Dual-engine architecture
No WebDriver / No ChromeDriver / No JS shims
💡 What is Mithwire?
Mithwire is a next-generation anti-detect browser automation framework for Python designed specifically to bypass modern anti-bot protection systems.
Unlike traditional automation frameworks—such as Playwright, Puppeteer, and Selenium—which were built for software testing rather than stealth, Mithwire was architected from the ground up to operate completely undetected.
💥 The Problem with Traditional Automation
Standard browser automation frameworks leak obvious signatures that modern security systems (Cloudflare, Akamai, DataDome, Kasada, CreepJS, DAB) flag instantly:
- ❌ WebDriver Footprints: Drivers like ChromeDriver inject global variables (
navigator.webdriver = true,cdc_window properties,puppeteer_/playwright_initialization signatures). - ❌ Detectable JS Patching: "Stealth" plugins for Playwright/Puppeteer rely heavily on JavaScript monkey-patching (
Object.defineProperty). Anti-bot scripts detect these by inspecting prototype chain anomalies, getter descriptors, and function.toString()strings. - ❌ Main-Thread Inconsistencies: Injected JS shims only run on the main document. Web Workers, Service Workers, and outgoing HTTP headers leak the real, unpatched host environment—creating glaring lies that lie-detectors flag immediately.
- ❌ VPS & Cloud Server Tell-tales: Running on a Linux server or VPS exposes SwiftShader GPUs, minimal font sets, headless screen metrics, and STUN/WebRTC leaks that instantly betray server environments.
🛡️ The Mithwire Solution: Verified Stealth Superiority
Mithwire solves these challenges by eliminating automation drivers and monkey-patching altogether:
- ⚡ Direct CDP Control (Zero Driver): Connects directly to Chromium via raw Chrome DevTools Protocol. There is no WebDriver binary, no
navigator.webdriverflag, and no injected driver artifacts. - 🎯 Engine-Level Overrides: Applies fingerprint overrides (timezone, locale, languages, platform, user agent client hints) inside Chromium via CDP
Emulation.* domains. Overrides propagate natively to Web Workers and HTTP headers—ensuring 100% internal consistency. - 🥷 Dual Stealth Architecture: Flexible choice between ultra-fast CDP automation and C++ source-level patched binaries (CloakBrowser) for deep hardware anti-detection.
- 🔬 Extensively Tested & Verified: Rigorously benchmarked against CreepJS, deviceandbrowserinfo.com (DAB), Sannysoft, and real-world protected sites, achieving clean stealth scores across platforms.
⚡ Two Core Engines
Mithwire provides two execution modes depending on your fingerprinting requirements:
1. 🚀 CDP Mode (Default)
- Mechanism: Launches standard Chromium-based browsers (Chrome, Brave, Edge) and controls them over raw CDP without a WebDriver.
- Stealth Strategy: Uses native CDP
Emulationcommands to set timezone, locale, geolocation, screen dimensions, user agent, client hints, and hardware concurrency directly inside Chromium. - Capabilities & Limitations: Extremely reliable, lightweight, and fast. CDP mode can apply cross-OS user agents and platforms, but deeper analytics that inspect C++ level hardware primitives (e.g. SwiftShader GPU strings, native system fonts, AudioContext rendering curves) will still reflect the underlying host hardware.
- When to use: Default mode. Serves well for use cases where profiles can match host or cross-OS profiles where target sites have low/medium protection.
2. 🥷 Stealth Mode (Patched Binary / CloakBrowser)
- Mechanism: Swaps in a custom C++-patched Chromium binary (CloakBrowser).
- Stealth Strategy: Modifies deep physical fingerprint surfaces (Canvas hash, WebGL vendor/renderer, AudioContext, system fonts, GPU strings, screen dimensions, TLS/JA3 fingerprints) directly at the C++ source code level before JavaScript executes.
- When to Use: Ideal for cross-OS profiles (e.g. presenting an authentic Windows or macOS profile from a Linux VPS) and bypassing advanced anti-bot detectors (CreepJS, DAB) that inspect low-level hardware primitives.
📊 Mode Comparison Matrix
| Feature / Capability | 🚀 CDP Mode (engine="cdp") |
🥷 Stealth Mode (engine="stealth") |
|---|---|---|
| Chromium Binary | Stock Chrome / Chromium / Edge / Brave | Patched CloakBrowser Binary |
| Automation Driver | None (Raw CDP) | None (Raw CDP) |
navigator.webdriver |
false (Native) |
false (Native) |
| Timezone, Locale & Languages | CDP Overrides (Natively in Workers) | CDP Overrides (Natively in Workers) |
| Geolocation Spoofing | CDP Overrides + Permission Grant | CDP Overrides + Permission Grant |
| User Agent & Client Hints | CDP Emulation Overrides |
C++ Source Level |
| Same-OS Profiling (Linux on Linux, Mac on Mac) | ✅ Excellent | ✅ Excellent |
| Cross-OS Profiling (Windows/Mac profile on Linux) | ⚠️ Works for basic/medium sites; hardware strings reflect host | ✅ Perfect (C++ patched GPU, fonts, UA, canvas) |
| Canvas & Audio Fingerprinting | Host Native | C++ Seed-Randomized |
| WebGL Vendor & Renderer | JS / Profile Override | C++ Seed-Randomized |
| Font Enumeration & TLS Signature | Host Native | C++ Source Level Patched |
| Supported Operating Systems | Linux, macOS, Windows | Linux, macOS |
| Remote Linux / VPS Deployment | ✅ Fully Supported (Same-OS or standard target sites) | ✅ Fully Supported (Advanced cross-OS target sites) |
✨ Key Features at a Glance
- 🥷 Stealth by Design: Zero
navigator.webdriver, no ChromeDriver, no Selenium, no detectable JS shims. - ⚡ Dual Stealth Engines: Native CDP mode for fast same-OS automation, C++ patched binary for deep cross-OS hardware stealth.
- 🎭 Comprehensive Fingerprint Control: Precision control over timezone, locale, Accept-Language, geolocation, screen dimensions, DPR, touch points, platform, user agent, client hints, hardware concurrency, and device memory.
- 🔄 Worker-Thread Consistency: Overrides propagate natively to Web Workers, Service Workers, and outgoing HTTP headers—preventing main-vs-worker lie detection.
- 🔒 WebRTC Leak Protection: Built-in WebRTC STUN candidate filtering to prevent host physical IP leaks when proxied.
- 🌐 Proxy Integration & Pre-Flight Check: Built-in HTTP/HTTPS/SOCKS proxy support with local authenticating relay, pre-flight health validation, and auto-alignment of timezone/locale/geo to proxy exit IP.
- 🧩 Cloudflare Turnstile Solver: Built-in one-liner solver (
tab.verify_cf()) with OpenCV coordinate calculation. - 🧠 Smart DOM Querying: Find elements by text, CSS selector, or XPath; lookups retry automatically as wait conditions.
- 🛠️ Full CDP & Network Access: Intercept, inspect, and analyze network requests, console logs, cookies, and storage.
🎯 Primary Use Cases
- 🤖 AI Agent Web Operations & Debugging: Power autonomous web browsing, automation development, and debugging for AI agents (via mithwire-mcp).
- 🕵️ Stealth Web Scraping: Extract data from sites protected by Cloudflare, Akamai, DataDome, and Kasada.
- 👤 Multi-Account & Social Operations: Manage isolated browser profiles with dedicated proxies, fingerprints, and persistent cookies.
- 🧪 E2E Testing & Prototyping: Perform realistic end-to-end user flow testing without triggering security challenges.
🤖 Give Your AI Agents a Stealth Browser: Mithwire MCP
Looking to integrate browser automation directly into AI models like Claude or Cursor?
mithwire-mcp is a Model Context Protocol server built on Mithwire:
- 🛠️ Develop & Debug Automations: Hand over browser tasks to AI agents to build, test, and debug scripts autonomously with interactive DOM snapshots, console monitoring, and live noVNC viewing.
- 🎮 MCP Tools:
session_start,browser_navigate,browser_click,browser_type,browser_snapshot,browser_solve_cloudflare. - 👤 Persistent Profiles & Proxy Registry: Reusable identities with bound proxies and durable cookies.
- 🐳 Docker-Ready: Pre-packaged with Xvfb, CloakBrowser, and noVNC for visual debugging.
🚀 Installation
# Standard installation (includes CDP mode & BrowserForge fingerprint generator)
pip install mithwire
# Stealth mode (includes C++ patched CloakBrowser wrapper)
pip install "mithwire[stealth]"
Requirements
- Python
>=3.10 - A Chromium-based browser (Chrome, Brave, Edge, or CloakBrowser)
🎬 Quick Start
import mithwire as uc
async def main():
# Start browser in CDP mode
browser = await uc.start()
# Navigate to page
page = await browser.get("https://nowsecure.nl")
# Take screenshot
await page.save_screenshot("nowsecure.png")
uc.loop().run_until_complete(main())
🔧 Detailed Usage & Configuration
1. Launching with Custom Options
from mithwire import start
browser = await start(
headless=False,
user_data_dir="/path/to/profile", # Persistent profile directory
browser_args=["--disable-gpu"],
lang="en-US",
)
tab = await browser.get("https://example.com")
Or using the Config builder:
from mithwire import Config, start
config = Config(
headless=True,
engine="stealth", # Use CloakBrowser patched binary
webrtc_leak_protection="filter",
)
browser = await start(config=config)
2. Fingerprinting & Identity Spoofing
from mithwire import Config, FingerprintConfig, start
fingerprint = FingerprintConfig(
timezone_id="America/New_York",
locale="en-US",
languages=["en-US", "en"],
user_agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36",
platform="Win32",
hardware_concurrency=8,
device_memory=16,
)
config = Config(fingerprint=fingerprint)
browser = await start(config=config)
3. Finding and Interacting with Elements
# Select element by text content (finds best match length)
button = await tab.find("Accept All Cookies", best_match=True)
await button.click()
# Select element by CSS selector (auto-retries until found or timeout)
email_input = await tab.select("input[name='email']")
await email_input.send_keys("user@example.com")
# Select elements by XPath (returns a list)
submit_btns = await tab.xpath("//button[@type='submit']", timeout=5.0)
if submit_btns:
await submit_btns[0].click()
4. Solving Cloudflare Turnstile
page = await browser.get("https://site-behind-turnstile.com")
# Solves Turnstile challenge with automatic retry and coordinate clicking
await page.verify_cf(max_retries=5, timeout=15)
(Requires pip install opencv-python)
5. Browser Process Lifecycle
Mithwire owns the Chrome process it launches and makes sure it does not outlive you:
await browser.stop()terminates Chrome, closes its pipes and deletes the temporary profile (uc_*) it created. A profile you pass viauser_data_diris never touched.- A launch that fails or is cancelled midway (timeout,
Ctrl-C, a cancelled request) terminates the process it already spawned instead of orphaning it. - On POSIX a tiny watchdog process keeps watching the host: if the host is killed hard (
SIGKILL, OOM, crash), it terminates that browser, and only that browser, and removes its temporary profile. It never signals a process whose command line does not match the launched profile.
Set MITHWIRE_NO_EXIT_GUARD=1 to disable the watchdog (for example if you deliberately want Chrome to keep running after your script is killed).
📜 License & Acknowledgments
Mithwire is distributed under the GNU AGPL-3.0 license.
Mithwire is a maintained, enhanced fork of nodriver by UltrafunkAmsterdam (the successor to undetected-chromedriver). Original copyright and license are preserved in LICENSE.txt.
Stealth mode uses CloakBrowser for binary-level Chromium patching.
Disclaimer: Mithwire is intended for authorized security research, testing, and web scraping. Please automate responsibly and respect website Terms of Service.
Metadata
Release files for mithwire 0.51.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mithwire-0.51.10.tar.gz | 437.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mithwire-0.51.10-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 886.7 kB
Release files / mithwire-0.51.10.tar.gz
| Download URL | mithwire-0.51.10.tar.gz |
|---|---|
| Size | 437.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bc8dfaef5936db4ef7e7ea48fc90488c85a29aaaf15fbab39b1dc04e45f436a1
|
|
BLAKE2b-256 checksum How to use checksums |
db89d6661cd40b9d79bdddc8e6f8de29805843846053e7551e8568fd8aeadb5a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.
Transparency logRelease files / mithwire-0.51.10-py3-none-any.whl
| Download URL | mithwire-0.51.10-py3-none-any.whl |
|---|---|
| Size | 448.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3e15a57dc950820d3ff033d81f1fdcd7605b8a1664bb3a73b6ad0fb42f0751e8
|
|
BLAKE2b-256 checksum How to use checksums |
f2c051fa1120394ee3d995a2cae8270ecaf5c4153db38fd950a07b886f953604
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.
Transparency log