Fast Browser MCP
# โก Fast Browser MCP
[](https://www.python.org/downloads/)
[](https://opensource.org/licenses/MIT)
[](https://modelcontextprotocol.io/)
[](https://chromedevtools.github.io/devtools-protocol/)
[](https://github.com/kqlio67/fast-browser-mcp)
Universal, ultra-fast **Model Context Protocol (MCP)** server and command-line interface for browser automation powered directly by the **Chrome DevTools Protocol (CDP)**.
Engineered specifically to eliminate the two biggest bottlenecks in AI web agents: **round-trip LLM inference latency** and **context window token bloat**.
---
## ๐ Why Fast Browser MCP?
Traditional AI browser tools suffer from severe limitations:
- **Round-trip Latency:** Each individual action (click, type, scroll) requires an entire round-trip to the language model (~3โ5 seconds per step). A 5-step form fill can take 25โ40 seconds.
- **Context Bloat:** Dumping entire raw HTML trees consumes 10,000โ50,000 tokens per step.
- **Blind to Shadow DOM:** Chrome internal pages (`chrome://settings`, `chrome://extensions`) and modern Web Components are invisible to standard `document.querySelector` tools.
- **Anti-Bot Roadblocks:** Headless browsers frequently trigger Cloudflare, Captchas, and bot challenges.
**Fast Browser MCP solves all of this:**
| Feature | Fast Browser MCP | Standard Browser MCPs |
|---|---|---|
| **Multi-Action Batching (`browser_batch`)** | **Local execution in ~500ms** for 5โ10 actions | 20โ30 seconds (1 LLM turn per action) |
| **Snapshot Context Cost** | **< 150 tokens** via numbered `@ref` tree | 10,000โ50,000 tokens (raw HTML/DOM) |
| **Multimodal Screenshots (`type: "image"`)** | Native inline image content for Vision LLMs | โ Text base64 or file path only |
| **Dynamic Port Switching (`browser_connect`)** | Switch on the fly (e.g. Electron apps, port 43275) | โ Fixed single port |
| **Auto-Launch & Standalone (`--auto-launch`)** | Auto-discovers and launches Chromium if not running | โ Crashes without manual start |
| **MCP Resources & Prompts** | `browser://tabs`, `browser://active/snapshot`, etc. | โ Tools only |
| **Shadow DOM & Web Components** | **Deep recursive traversal** into all `shadowRoot` levels | โ Incomplete or completely blind |
| **Chrome System Pages** | Full control over `chrome://settings`, `chrome://extensions`, etc. | โ Unsupported |
| **Extension Management** | List, enable, disable, reload, and inspect extensions | โ Unsupported |
| **Real Browser Integration** | Attaches to active Chrome session on port 9222 (bypasses Cloudflare) | Often isolated / detected headless |
| **Reverse Engineering & Traffic** | Live WebSocket frames, XHR request/response bodies, cookie extraction | Usually basic console logs only |
---
## ๐ Core Highlights
### 1. ๐๏ธ Ultra-Fast Batch Execution (`browser_batch`)
Execute an entire pipeline of actions locally in a single MCP round-trip:
```json
{
"steps": [
{"action": "navigate", "url": "https://example.com/login"},
{"action": "fill", "ref": "@1", "text": "agent@example.com"},
{"action": "fill", "ref": "@2", "text": "secret123"},
{"action": "click", "ref": "@3"},
{"action": "wait", "ms": 500},
{"action": "snapshot"}
]
}
```
*Result: Executed entirely over direct local WebSocket in ~600ms total!*
### 2. ๐ท๏ธ Token-Efficient Numbered `@ref` Snapshot
Captures a compact accessibility tree with numbered target handles (`@1`, `@2`, ...). Intelligently identifies non-textual UI elements:
- Icons, SVG graphics, and title labels
- CSS `background-image` sprites (e.g. `bg:quest1.png`)
- ARIA roles, input states, and placeholder texts
- Filters out internal presentation noise (`cr-ripple`, `path`, `cr-icon` inside buttons)
```text
=== Page: Extensions ===
URL: chrome://extensions/
--- Interactive Elements (12 found) ---
@1 [button] "Search extensions"
@2 [input] [type=search]
@3 [button] [ checked]
@4 [button] "Load unpacked"
@5 [button] "Pack extension"
@6 [button] "Update"
@7 [menuitem] "My extensions" -> /
@8 [menuitem] "Keyboard shortcuts" -> /shortcuts
@9 [button] "Details"
@10 [button] "Remove"
@11 [button] "Reload"
@12 [button] [ checked]
```
### 3. ๐ Full Browser Window & System Management
- **Window Bounds:** Retrieve and set window states (`normal`, `minimized`, `maximized`, `fullscreen`) or exact pixel dimensions and coordinates.
- **System Pages:** Direct navigation to `chrome://settings`, `chrome://extensions`, `chrome://downloads`, `chrome://history`, `chrome://flags`, `chrome://version`, and more.
- **Extension Controls:** Query all installed Chrome extensions, enable/disable them, reload extensions, or open options and popup pages.
- **Download Management:** Automatically configure download paths without interactive prompt dialogs.
- **Permissions:** Programmatically grant or reset browser permissions (`clipboardReadWrite`, `notifications`, `geolocation`).
### 4. ๐ฌ Network & Real-Time WebSocket Inspection
- Inspect intercepted HTTP/XHR/Fetch requests, headers, and POST payloads.
- Fetch raw response bodies (JSON, HTML, binary).
- Real-time **WebSocket frame capture** (`sent` / `received`), critical for game automation, real-time sync, and bot development.
- One-click traffic dump export to structured JSON.
---
## ๐ฆ Installation
### Requirements
- Python 3.10 or newer
- Any Chromium-based browser (Google Chrome, Chromium, Brave, Microsoft Edge, or Kitesurf)
### Option A: Direct Install with Pip
```bash
# Install directly from GitHub
pip install git+https://github.com/kqlio67/fast-browser-mcp.git
# Or install locally for development
git clone https://github.com/kqlio67/fast-browser-mcp.git
cd fast-browser-mcp
pip install -e .
```
*After installation, two global commands are available in your PATH: `fast-browser` (CLI) and `fast-browser-mcp` (MCP stdio server).*
### Option B: Instant Run with `uvx` (No Installation Needed)
```bash
# Run CLI commands instantly
uvx --from git+https://github.com/kqlio67/fast-browser-mcp.git fast-browser --help
# Or run the MCP server directly
uvx --from git+https://github.com/kqlio67/fast-browser-mcp.git fast-browser-mcp
```
### Option C: Docker / Docker Compose (Isolated Container)
```bash
# Start container with built-in headless Chromium and dumb-init
docker compose up -d
```
Or build and run manually:
```bash
docker build -t fast-browser-mcp .
docker run -d -p 9222:9222 fast-browser-mcp
```
---
## ๐ Cross-Platform Compatibility
Fast Browser MCP is built with zero binary C-extensions and operates entirely via native async Python WebSockets. It is tested and fully supported on:
- **Linux** (Ubuntu, Debian, Arch, Fedora, AntiX): Auto-detects GUI display (`DISPLAY`, `WAYLAND_DISPLAY`) or falls back safely to `--headless=new`.
- **Windows** (10, 11, Server): Automatically discovers Chrome, Edge (`msedge.exe`), and Brave in standard `Program Files` locations.
- **macOS** (Apple Silicon M1-M4 & Intel): Automatically discovers browsers in `/Applications/`.
- **Docker / Kubernetes / CI**: Automatically detects containerized environments (`/.dockerenv`, `cgroup`) or root privileges and applies `--no-sandbox` automatically.
---
## โ๏ธ Environment Variables Reference
| Variable | Default | Description |
|---|---|---|
| `FAST_BROWSER_AUTO_LAUNCH` | `0` (or `false`) | Set to `1` or `true` to automatically launch Chrome in the background if port 9222 is unreachable. |
| `FAST_BROWSER_HOST` / `CDP_HOST` | `127.0.0.1` | Host address of the CDP endpoint. |
| `FAST_BROWSER_PORT` / `CDP_PORT` | `9222` | TCP port of the CDP remote debugging endpoint. |
| `CHROME_PATH` / `BROWSER_PATH` | *auto-detected* | Custom path to the Chrome/Chromium/Brave/Edge binary. |
| `FAST_BROWSER_ALLOWED_DIR` | *unrestricted* | Restrict file reads and writes (e.g. downloads, traffic exports, sessions) to this root directory to prevent directory traversal. |
| `FAST_BROWSER_PROFILES_DIR` | `~/.config/fast-browser/profiles` | Base directory for persistent named browser profiles (`--profile`). |
---
## โ๏ธ Quickstart & Setup
### 1. Launch Chrome with Remote Debugging
If `FAST_BROWSER_AUTO_LAUNCH=1` is configured, you can skip this step! Otherwise, start your browser with `--remote-debugging-port=9222`:
**Linux (Standard Desktop GUI):**
```bash
google-chrome --remote-debugging-port=9222 &
# Or if using Chromium:
chromium --remote-debugging-port=9222 &
```
**Linux (Completely Hidden Background Mode via Xvfb):**
*Runs Chrome on a virtual display in memory โ zero desktop windows, no keyboard/mouse focus stealing, full anti-bot evasion:*
```bash
nohup xvfb-run -a google-chrome \
--remote-debugging-port=9222 \
--user-data-dir="/tmp/chrome_hidden_session" \
--no-first-run \
--no-default-browser-check \
--disable-gpu > /dev/null 2>&1 &
```
**macOS:**
```bash
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222 &
```
**Windows:**
```cmd
chrome.exe --remote-debugging-port=9222
```
*(Optional: Use `--user-data-dir="/tmp/chrome_dev_session"` to run alongside your personal browser profile without conflicts).*
---
### 2. Connect to Your MCP Client
#### Google Antigravity
```bash
agy mcp add fast-browser fast-browser-mcp
```
*Or using Python module path:*
```bash
agy mcp add --env PYTHONPATH=/path/to/fast-browser-mcp fast-browser python3 -m fast_browser.server
```
#### Claude Desktop (`claude_desktop_config.json`)
```json
{
"mcpServers": {
"fast-browser": {
"command": "fast-browser-mcp",
"env": {
"FAST_BROWSER_AUTO_LAUNCH": "1"
}
}
}
}
```
#### Cursor / Windsurf
Add Fast Browser MCP as an MCP stdio server executing:
- **Command:** `fast-browser-mcp` (or `python3 -m fast_browser.server`)
- **Environment:** `FAST_BROWSER_AUTO_LAUNCH=1`
---
## ๐ ๏ธ Complete Tool Reference (95 Tools)
### ๐ Process & Lifecycle Management
| Tool | Description |
|---|---|
| `browser_connect` | Connect dynamically to any running browser or Electron instance by host and port (e.g. port 9222 or custom devtools port) |
| `browser_launch` | Launch a managed Chromium/Chrome instance (headless/headed, custom port, proxy, and user data directory) |
| `browser_close_browser` | Terminate and clean up the launched or managed browser process |
| `browser_wait_for_download` | Wait for a file download to complete in the download directory within a given timeout |
| `browser_export_session` | Export active session state (cookies, localStorage, sessionStorage, active URL) to JSON file or string |
| `browser_import_session` | Restore session state (cookies, localStorage, sessionStorage, navigation) from exported data |
### ๐ Tab & Navigation
| Tool | Description |
|---|---|
| `browser_list_tabs` | List all open browser tabs (ID, title, URL) |
| `browser_select_tab` | Switch active connection to a tab by title or URL query |
| `browser_new_tab` | Open a new tab with a given URL (supports `activate: true` to immediately bring to foreground) |
| `browser_activate_tab` | Bring a browser tab to the foreground, activating focus and disabling background rendering/timer throttling |
| `browser_close_tab` | Close a tab by target ID (or close current tab) |
| `browser_navigate` | Navigate active tab to a URL |
| `browser_reload` | Reload the page (with optional `ignore_cache` option) |
| `browser_back` | Navigate backward in browser history (back button) |
| `browser_forward` | Navigate forward in browser history (forward button) |
| `browser_history` | Retrieve full tab navigation history entries and current position |
### ๐ฏ Interaction & Actions
| Tool | Description |
|---|---|
| `browser_click` | Click an element by snapshot ref (`@1`, `@2`) or CSS selector (supports `trusted: true` for native CDP hardware input with `isTrusted: true`) |
| `browser_fill` | Type text into an input element by ref or CSS selector (supports `paste: true` for instant CDP text insertion, `press_enter: true`, and auto-detects `contenteditable` fields) |
| `browser_type` | Type text character-by-character with realistic hardware keystrokes (`Input.dispatchKeyEvent`), human jitter, and optional element focus (anti-bot bypass) |
| `browser_fill_form` | Fill multiple form elements in one fast batch execution |
| `browser_press_key` | Dispatch keyboard key event (`Enter`, `Escape`, `Tab`, `ArrowDown`, etc.) |
| `browser_scroll` | Scroll page by $(\Delta x, \Delta y)$ or scroll element into view |
| `browser_mouse` | Advanced mouse operations: `double_click`, `right_click`, `move`, `drag_and_drop` |
| `browser_find_in_page` | Find text on page (Ctrl+F): count matches, extract snippets, and auto-scroll |
| `browser_clipboard` | Read or write to the system clipboard (`read`, `write`) |
| `browser_upload_file` | Upload files natively into `<input type='file'>` elements via CDP |
### ๐๏ธ Inspection & Snapshots
| Tool | Description |
|---|---|
| `browser_snapshot` | Compact, token-efficient A11y tree with `@ref` markers, Shadow DOM traversal, optional CSS selector scoping, and viewport filtering |
| `browser_get_html` | Extract full document `outerHTML` or save directly to a file |
| `browser_screenshot` | Capture viewport, element clip, or full-page scrollable screenshot (PNG/JPEG) |
| `browser_screencast_start` | Start capturing a screencast video of the browser viewport |
| `browser_screencast_stop` | Stop capturing screencast video and save the result |
| `browser_print_to_pdf` | Print page to PDF file with landscape/background options |
| `browser_eval` | Evaluate arbitrary JavaScript expressions in the page context |
### ๐ ๏ธ DevTools Superpowers & Deep Inspection (v0.13.0)
| Tool | Description |
|---|---|
| `browser_cdp_send` | **Universal CDP Raw Dispatcher**: Execute any of the 1,000+ Chrome DevTools Protocol commands directly (e.g. `DOM.enable`, `Storage.getCookies`, `Emulation.setDeviceMetricsOverride`, `Security.enable`, etc.) |
| `browser_get_event_listeners` | **Native Event Listener Inspection**: Inspect native DOM event listeners (click, submit, change, keydown, custom) via CDP `DOMDebugger` with handler source location and flags |
| `browser_observe_coverage` | **V8 Code Coverage Profiling**: Measure executed JS functions and code ranges in real time during an observation window |
| `browser_start_coverage` | Start precise V8 JavaScript code coverage collection across subsequent browser actions |
| `browser_stop_coverage` | Stop V8 coverage collection and return filtered executed functions and call counts |
| `browser_compare_screenshots` | **Deterministic Visual Diffing**: Compare two screenshots/PNGs with RGBA pixel delta, changed ratio, and bounding box without Vision LLM cost |
| `browser_diff_snapshot` | **Semantic Snapshot Diffing**: Compute added/removed elements, text changes, and URL deltas between page states |
| `browser_route_intercept` | **CDP Fetch Interception**: Mock responses, redirect URLs, modify headers, or fail network requests |
| `browser_discover_endpoints` | **Static API Discovery**: Extract API endpoints and fetch/XHR URLs from scripts and DOM elements |
| `browser_human_mouse` | **Natural Mouse Modeling**: Humanized Bezier curves with micro-jitter and Fitts's law easing (bypasses behavioral anti-bot heuristics) |
| `browser_set_adblock` | **Built-in Content Filter**: Curated ad, tracker, and telemetry blocker via `Network.setBlockedURLs` |
| `browser_smart_find` | **Semantic Element Finder**: Find interactive elements by natural language intent with relevance scoring and `@ref` targets |
| `browser_create_context` | Create an isolated incognito BrowserContext with clean session, storage, and cookies |
| `browser_dispose_context` | Close and clean up an isolated BrowserContext and all associated tabs |
| `browser_list_contexts` | List all active isolated BrowserContext IDs |
| `browser_get_page_state` | **Zero-Cost State & Mutation Check**: Lightweight page state and DOM mutation sequence counter (`seq`) across Chrome and Kitesurf |
| `browser_paint_damage` | **Visual Damage Tracking**: Detect elements whose rendered pixels or DOM subtrees changed after actions, without screenshot diffing |
| `browser_turbo_mode` | **Headless Turbo Scraping**: Toggle turbo mode (disables layout/raster in Kitesurf; blocks media/fonts/animations in Chrome) |
| `browser_list_webmcp_tools` | List WebMCP tools exposed by the web page |
| `browser_execute_webmcp_tool` | Execute a WebMCP tool exposed by the web page |
| `browser_get_css_styles` | Inspect computed styles, applied stylesheet rules, bounding rect, and attached event listeners for any element by `@ref` or CSS selector |
| `browser_new_isolated_tab` | Spawn a tab in a completely isolated incognito browser context (`Target.createBrowserContext`) with clean session, cookies, and cache |
| `browser_set_cpu_throttling` | Emulate CPU slowdown factors (`1.0` = normal, `2.0` = 2x slowdown, `4.0` = 4x slowdown) for low-end device testing |
| `browser_handle_dialog` | Automate JavaScript dialogs (`alert`, `confirm`, `prompt`) by accepting, dismissing, or providing prompt responses without blocking execution |
### โก High-Speed Batch Runner & Resilience
| Tool | Description |
|---|---|
| `browser_batch` | **Ultra-fast local batch execution**: runs an array of actions in a single round-trip without model latency. Supports coordinate clicking/hovering (`(x, y)`), `duration`/`seconds` wait, `dismiss_banners`, `wait_for`, and 100% action parity across all 100 CDP tools and actions. |
| `browser_wait_for_network_idle` | Wait until all in-flight network requests cease for a stable duration |
| `browser_block_resources` | Block images, video/audio media, web fonts, or tracking scripts/ads for up to 10x page load speedup |
| `browser_block_urls` | Block specific wildcard URL patterns (e.g. `*.png`, `*analytics*`, `*ads*`) to accelerate page load times |
| `browser_cleanup_tabs` | Automatically close blank (`about:blank`), stale, or pattern-matching tabs to free RAM |
| `browser_performance_metrics` | Live memory profiling: JS heap used (MB), DOM nodes, layouts, and task durations |
### ๐ก Network, WebSockets & Storage
| Tool | Description |
|---|---|
| `browser_network_requests` | List captured HTTP/XHR/Fetch requests filtered by type or URL pattern (with optional secrets redaction) |
| `browser_network_get_response` | Inspect headers, POST payload, and retrieve server response bodies |
| `browser_websocket_messages` | Monitor real-time WebSocket frames (`sent` / `received`) |
| `browser_get_cookies` | Retrieve all cookies and authentication tokens for current origin |
| `browser_set_cookie` | Inject cookies into the browser context |
| `browser_get_storage` | Inspect and dump `localStorage`, `sessionStorage`, and `cacheStorage` |
| `browser_get_cache_storage` | Inspect PWA and Service Worker CacheStorage entries and cached responses |
| `browser_get_indexeddb` | Inspect all IndexedDB databases, version numbers, and object store names |
| `browser_clear_storage` | Clear browser cache and/or cookies |
| `browser_export_traffic` | Export captured HTTP & WebSocket traffic into JSON or standards-compliant HAR 1.2 format with automated secrets redaction |
### ๐ฅ๏ธ Browser & System Management
| Tool | Description |
|---|---|
| `browser_window` | Inspect or set window bounds (coordinates, width, height) and state (`maximized`, `minimized`, `fullscreen`, `normal`) |
| `browser_open_system_page` | Open or switch to Chrome system pages (`settings`, `extensions`, `downloads`, `history`, `flags`, etc.) |
| `browser_list_extensions` | Query all installed Chrome extensions (IDs, names, versions, enabled status) |
| `browser_extension_action` | Manage extensions: `enable`, `disable`, `reload`, `options`, `popup` |
| `browser_add_preload_script` | Inject custom JavaScript evaluating before page scripts load (hooks / Tampermonkey) |
| `browser_remove_preload_script` | Remove a previously registered preload script by identifier |
| `browser_stealth_mode` | Toggle anti-bot stealth overrides (`navigator.webdriver`, PluginArray with 5 PDF plugins, client hints, languages, permissions) |
| `browser_network_throttling` | Emulate network profiles (`offline`, `slow3g`, `fast3g`, `4g`, `none`) or custom latency/bandwidth |
| `browser_set_media_theme` | Emulate color scheme on page: `dark`, `light`, `no-preference` |
| `browser_set_page_zoom` | Adjust page zoom scale (e.g. `0.75`, `1.0`, `1.25`, `1.5`) |
| `browser_mute_tab` | Mute or unmute all audio/video media playback on the active tab |
| `browser_set_ignore_certificate_errors` | Bypass or enforce SSL/TLS certificate warnings on HTTPS websites |
| `browser_system_info` | Inspect Chrome version, V8 engine, User-Agent, environment readiness, and memory metrics |
| `browser_set_download_path` | Set download folder and allow downloads without browser dialogs |
| `browser_grant_permissions` | Grant or reset permissions (`clipboardReadWrite`, `notifications`, `geolocation`) |
| `browser_set_geolocation` | Override device GPS coordinates (`latitude`, `longitude`, `accuracy`) |
| `browser_set_timezone` | Emulate local timezone (e.g. `Europe/Kyiv`, `America/New_York`) |
| `browser_emulate_environment` | Emulate geolocation coordinates and/or timezone simultaneously in a single call |
| `browser_console_logs` | View captured console logs (`console.log`, `error`, `warn`, unhandled exceptions) |
| `browser_set_viewport` | Configure viewport dimensions and mobile device emulation |
| `browser_set_user_agent` | Override User-Agent header |
| `browser_set_headers` | Inject custom HTTP headers into all outgoing requests |
---
## ๐ฆ Built-in MCP Resources & Prompts
Fast Browser MCP provides native Model Context Protocol (MCP) Resources and Prompts for seamless integration with MCP clients (Antigravity, Claude Desktop, Cursor, etc.).
### ๐ MCP Resources
Directly read live browser state as structured MCP resources without executing tool calls:
| Resource URI | MIME Type | Description |
|---|---|---|
| `browser://tabs` | `application/json` | Real-time list of all open browser tabs (ID, title, URL, WebSocket debugger URL) |
| `browser://active/snapshot` | `text/plain` | Token-efficient formatted accessibility snapshot of the currently focused tab |
| `browser://active/dom` | `text/html` | Complete raw HTML document of the active page |
| `browser://console` | `application/json` | Captured browser console output (logs, warnings, errors, exceptions) |
| `browser://network` | `application/json` | Ring-buffer captured HTTP/XHR network requests and traffic summary |
### ๐ก MCP Prompts
Pre-configured agent workflows:
| Prompt Name | Description |
|---|---|
| `web-research` | Systematic web browsing workflow: search, navigate, snapshot, and extract information |
| `form-automation` | Structured guide for safely inspecting, validating, and filling multi-step web forms |
| `network-debugger` | Guided workflow to inspect network API requests and WebSocket frames for reverse engineering |
---
## ๐ป CLI Usage
Fast Browser MCP also includes a complete standalone CLI for manual operations and shell scripting:
```bash
# List open tabs (optionally with a persistent profile)
python3 -m fast_browser.cli --profile my_session list-tabs
# Take a snapshot of a tab
python3 -m fast_browser.cli --tab mmobitva snapshot
# Navigate history (Back & Forward)
python3 -m fast_browser.cli back
python3 -m fast_browser.cli forward
python3 -m fast_browser.cli history
# Activate stealth mode (hide automation markers)
python3 -m fast_browser.cli stealth
# Emulate network conditions (Slow 3G, Offline, or reset)
python3 -m fast_browser.cli throttling slow3g
python3 -m fast_browser.cli throttling none
# Emulate dark mode theme
python3 -m fast_browser.cli theme dark
# Adjust page zoom level (125%)
python3 -m fast_browser.cli zoom 1.25
# Mute tab audio
python3 -m fast_browser.cli mute
# Search text on page (Ctrl+F)
python3 -m fast_browser.cli find "SearchQuery"
# Read/write clipboard
python3 -m fast_browser.cli clipboard --write "Hello from Fast Browser"
python3 -m fast_browser.cli clipboard
# Inspect IndexedDB databases
python3 -m fast_browser.cli indexeddb
# Inspect browser window geometry
python3 -m fast_browser.cli window
# Maximize browser window
python3 -m fast_browser.cli window --state maximized
# Open Chrome Settings or Extensions
python3 -m fast_browser.cli system-page settings
python3 -m fast_browser.cli extensions
# Send raw Chrome DevTools Protocol command ("God Mode")
python3 -m fast_browser.cli cdp-send Page.getNavigationHistory
# Inspect computed CSS styles of an element
python3 -m fast_browser.cli css-styles --ref @1
python3 -m fast_browser.cli css-styles --selector "button.primary"
# Create a tab in an isolated incognito browser context
python3 -m fast_browser.cli isolated-tab https://example.com
# Emulate 4x CPU slowdown
python3 -m fast_browser.cli cpu-throttling 4.0
# Configure JavaScript dialog handling
python3 -m fast_browser.cli dialog --action accept
# Run high-speed batch actions
python3 -m fast_browser.cli --tab mytab batch '[
{"action": "stealth", "enabled": True},
{"action": "theme", "theme": "dark"},
{"action": "snapshot"},
{"action": "click", "ref": "@2"},
{"action": "wait", "ms": 200},
{"action": "snapshot"}
]'
```
---
## ๐งช Testing
The automated test suite runs in a **100% isolated headless background process** on an ephemeral dynamic port with a temporary user data directory. It **never touches your personal browser session (port 9222)**, never opens or closes visible desktop tabs, and never steals mouse or keyboard focus:
```bash
PYTHONPATH=. python3 -m unittest discover -s tests
```
*(Optional: To explicitly run tests against an existing custom port, set the `CDP_PORT` environment variable: `CDP_PORT=9222 python3 -m unittest discover -s tests`).*
---
## ๐ License
This project is licensed under the [MIT License](LICENSE).
TDQS
Scored across 95 tools
Many tools overlap heavily: browser_click vs browser_mouse vs browser_human_mouse, browser_fill vs browser_type vs browser_fill_form, and browser_block_urls vs browser_set_adblock vs browser_block_resources all target nearly identical actions. browser_batch duplicates roughly 35 capabilities that also exist as standalone tools, and storage/network inspection is split across six-plus closely related tools, making misselection likely.
Nearly every tool carries the browser_ prefix in snake_case, which is predictable and readable. Minor deviations exist where the second token is a noun rather than a verb (browser_window, browser_clipboard, browser_mouse, browser_history), but the convention remains coherent overall.
95 tools is far beyond what an agent can navigate reliably, and a large fraction is redundant because browser_batch and browser_cdp_send already subsume many dedicated operations. The surface feels like an exhaustive CDP capability dump rather than a curated, well-scoped set.
Coverage is exceptionally broad: navigation, tabs/contexts, forms, network interception and export, storage, cookies, coverage, screencast, PDF, emulation, extensions, and raw CDP escape hatches are all present. Almost no browser-automation workflow is a dead end, and browser_cdp_send guarantees an escape hatch for anything missing.