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-mcpGuides for using ai agents skills like stealth-browser-mcp.
Last scanned: 5/10/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-05-10T06:36:31.328Z",
"semgrepRan": false,
"npmAuditRan": true,
"pipAuditRan": false
}No comments yet. Be the first to share your thoughts!
Undetectable 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.
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."
This repo includes an agent skill at skills/stealth-browser-mcp for clients that support Codex-style skills. It teaches agents the recommended tool order, state checks, pre-document CDP script usage, network debugging flow, and browser cleanup rules.
Use the skill when an LLM struggles to choose the right MCP tool or forgets to verify browser state after actions. If your client does not load repo-local skills automatically, add or symlink skills/stealth-browser-mcp into your client skills directory.
Choose exactly what functionality you need. Run the full 97-tool suite or strip it down to 20 core tools.
| Mode | Tools | Use Case |
|------|-------|----------|
| Full (default) | 97 | Complete browser automation and debugging |
| Minimal (--minimal) | 20 | 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.
HTTP transport security
stdio transport is recommended for local MCP clients and does not require HTTP auth.STEALTH_BROWSER_MCP_AUTH_TOKEN to enable bearer-token auth for HTTP transport.Authorization: Bearer <token> after HTTP auth is enabled.Browser lifecycle defaults
spawn_browser(idle_timeout_seconds=...).BROWSER_IDLE_TIMEOUT=0.BROWSER_IDLE_REAPER_INTERVAL.BROWSER_ORPHAN_PROFILE_MAX_AGE (seconds).BROWSER_FILE_UPLOAD_ALLOWED_DIRS.These are regular environment variables for the MCP server process itself. Set them wherever you launch src/server.py:
| Variable | Default | Meaning |
|----------|---------|---------|
| STEALTH_BROWSER_MCP_AUTH_TOKEN | unset | Optional bearer token for HTTP transport. When set, HTTP clients must send Authorization: Bearer <token>. |
| MCP_AUTH_TOKEN | unset | Backward-compatible alias for STEALTH_BROWSER_MCP_AUTH_TOKEN. |
| 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. |
| BROWSER_FILE_UPLOAD_ALLOWED_DIRS | repo root | Directories that file_upload() may read from. Separate multiple roots with ; on Windows or : on macOS/Linux. |
| STEALTH_BROWSER_DEBUG | 0 | Enable verbose debug logging to stderr when set to 1. |
Where to set them
# macOS / Linux
export STEALTH_BROWSER_MCP_AUTH_TOKEN="replace-with-a-long-random-token"
export BROWSER_IDLE_TIMEOUT=900
export BROWSER_IDLE_REAPER_INTERVAL=30
export BROWSER_ORPHAN_PROFILE_MAX_AGE=43200
export BROWSER_FILE_UPLOAD_ALLOWED_DIRS="/Users/me/uploads:/Users/me/Documents"
python src/server.py
# Windows PowerShell
$env:STEALTH_BROWSER_MCP_AUTH_TOKEN='replace-with-a-long-random-token'
$env:BROWSER_IDLE_TIMEOUT='900'
$env:BROWSER_IDLE_REAPER_INTERVAL='30'
$env:BROWSER_ORPHAN_PROFILE_MAX_AGE='43200'
$env:BROWSER_FILE_UPLOAD_ALLOWED_DIRS='C:\Users\me\uploads;C:\Users\me\Documents'
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": {
"STEALTH_BROWSER_MCP_AUTH_TOKEN": "replace-with-a-long-random-token",
"BROWSER_IDLE_TIMEOUT": "900",
"BROWSER_IDLE_REAPER_INTERVAL": "30",
"BROWSER_ORPHAN_PROFILE_MAX_AGE": "43200",
"BROWSER_FILE_UPLOAD_ALLOWED_DIRS": "C:\\Users\\me\\uploads;C:\\Users\\me\\Documents"
}
}
}
}
[Service]
Environment="STEALTH_BROW