by vibheksoni
The only browser automation that bypasses anti-bot systems. AI writes network hooks, clones UIs pixel-perfect via simple chat.
# Add to your Claude Code skills
git clone https://github.com/vibheksoni/stealth-browser-mcpUndetectable browser automation for MCP-compatible AI agents.
Bypass Cloudflare, antibot systems, and social media blocks with real browser instances powered by nodriver + Chrome DevTools Protocol + FastMCP.
No comments yet. Be the first to share your thoughts!
Stealth Browser MCP bypassing Cloudflare, cloning UI elements, and intercepting network traffic — all through AI chat commands.
git clone https://github.com/vibheksoni/stealth-browser-mcp.git
cd stealth-browser-mcp
python -m venv venv
# Activate virtual environment
# Windows:
venv\Scripts\activate
# Mac/Linux:
source venv/bin/activate
pip install -r requirements.txt
Claude Code CLI (recommended):
Windows:
claude mcp add-json stealth-browser-mcp "{\"type\":\"stdio\",\"command\":\"C:\\path\\to\\stealth-browser-mcp\\venv\\Scripts\\python.exe\",\"args\":[\"C:\\path\\to\\stealth-browser-mcp\\src\\server.py\"]}"
Mac/Linux:
claude mcp add-json stealth-browser-mcp '{
"type": "stdio",
"command": "/path/to/stealth-browser-mcp/venv/bin/python",
"args": ["/path/to/stealth-browser-mcp/src/server.py"]
}'
Replace
/path/to/stealth-browser-mcp/with your actual project path.
Windows (%APPDATA%\Claude\claude_desktop_config.json):
{
"mcpServers": {
"stealth-browser-mcp": {
"command": "C:\\path\\to\\stealth-browser-mcp\\venv\\Scripts\\python.exe",
"args": ["C:\\path\\to\\stealth-browser-mcp\\src\\server.py"],
"env": {}
}
}
}
Mac/Linux (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"stealth-browser-mcp": {
"command": "/path/to/stealth-browser-mcp/venv/bin/python",
"args": ["/path/to/stealth-browser-mcp/src/server.py"],
"env": {}
}
}
}
pip install fastmcp
fastmcp install claude-desktop src/server.py --with-requirements requirements.txt
# OR
fastmcp install claude-code src/server.py --with-requirements requirements.txt
# OR
fastmcp install cursor src/server.py --with-requirements requirements.txt
Restart your MCP client and ask your agent:
"Use stealth-browser to navigate to https://example.com and take a screenshot."
Choose exactly what functionality you need. Run the full 90-tool suite or strip it down to 22 core tools.
| Mode | Tools | Use Case |
|------|-------|----------|
| Full (default) | 90 | Complete browser automation and debugging |
| Minimal (--minimal) | 22 | Core browser automation only |
| Custom (--disable-*) | Your choice | Disable specific sections |
python src/server.py --minimal
python src/server.py --disable-cdp-functions --disable-dynamic-hooks
python src/server.py --list-sections
python src/server.py --debug
Use --debug or set STEALTH_BROWSER_DEBUG=1 to enable verbose server diagnostics on stderr. In normal MCP stdio usage, debug logging stays quiet by default to avoid noisy transport output.
Browser lifecycle defaults
spawn_browser(idle_timeout_seconds=...).BROWSER_IDLE_TIMEOUT=0.BROWSER_IDLE_REAPER_INTERVAL.BROWSER_ORPHAN_PROFILE_MAX_AGE (seconds).These are regular environment variables for the MCP server process itself. Set them wherever you launch src/server.py:
| Variable | Default | Meaning |
|----------|---------|---------|
| BROWSER_IDLE_TIMEOUT | 600 | Global idle timeout in seconds before an unused browser instance is auto-closed. Set 0 to disable idle reaping globally. |
| BROWSER_IDLE_REAPER_INTERVAL | 60 | Background reaper check interval in seconds. |
| BROWSER_ORPHAN_PROFILE_MAX_AGE | 21600 | Startup cleanup threshold in seconds for stale uc_* temp profiles that are not in use by live browser processes. Set 0 to disable this startup sweep. |
| STEALTH_BROWSER_DEBUG | 0 | Enable verbose debug logging to stderr when set to 1. |
Where to set them
# macOS / Linux
export BROWSER_IDLE_TIMEOUT=900
export BROWSER_IDLE_REAPER_INTERVAL=30
export BROWSER_ORPHAN_PROFILE_MAX_AGE=43200
python src/server.py
# Windows PowerShell
$env:BROWSER_IDLE_TIMEOUT='900'
$env:BROWSER_IDLE_REAPER_INTERVAL='30'
$env:BROWSER_ORPHAN_PROFILE_MAX_AGE='43200'
python src/server.py
env block for your client.{
"mcpServers": {
"stealth-browser-mcp": {
"command": "C:\\path\\to\\stealth-browser-mcp\\venv\\Scripts\\python.exe",
"args": ["C:\\path\\to\\stealth-browser-mcp\\src\\server.py"],
"env": {
"BROWSER_IDLE_TIMEOUT": "900",
"BROWSER_IDLE_REAPER_INTERVAL": "30",
"BROWSER_ORPHAN_PROFILE_MAX_AGE": "43200"
}
}
}
}
[Service]
Environment="BROWSER_IDLE_TIMEOUT=900"
Environment="BROWSER_IDLE_REAPER_INTERVAL=30"
Environment="BROWSER_ORPHAN_PROFILE_MAX_AGE=43200"
ExecStart=/path/to/venv/bin/python /path/to/stealth-browser-mcp/src/server.py --transport http
Per-instance override
If you want a single browser instance to live longer or shorter than the server default, pass idle_timeout_seconds in spawn_browser(...).
Examples:
spawn_browser(idle_timeout_seconds=1800) keeps that instance for 30 minutes of inactivity.spawn_browser(idle_timeout_seconds=0) disables idle reaping for that one instance.Available sections:
| Section | Tools | Description |
|---------|-------|-------------|
| browser-management | 11 | Core browser operations |
| element-interaction | 11 | Page interaction and manipulation |
| element-extraction | 9 | Element cloning and extraction |
| file-extraction | 9 | File-based extraction tools |
| network-debugging | 5 | Network monitoring and interception |
| cdp-functions | 13 | Chrome DevTools Protocol execution |
| progressive-cloning | 10 | Advanced element cloning |
| cookies-storage | 3 | Cookie and storage management |
| tabs | 5 | Tab management |
| debugging | 6 | Debug and system tools |
| dynamic-hooks | 10 | AI-powered network hooks |
| Tool | Description |
|------|-------------|
| spawn_browser() | Create undetectable browser instance |
| navigate() | Navigate to URLs |
| close_instance() | Clean shutdown of browser |
| list_instances() | Manage multiple sessions |
| get_instance_state() | Full browser state information |
| go_back() | Navigate back in history |
| go_forward() | Navigate forward in history |
| reload_page() | Reload current page |
| hot_reload() | Reload modules without restart |
| reload_status() | Check module reload status |