{"id":50539341,"url":"https://github.com/devinosolutions/stealth-chrome-devtools-mcp","last_synced_at":"2026-06-03T19:01:33.237Z","repository":{"id":357948325,"uuid":"1239152939","full_name":"DevinoSolutions/stealth-chrome-devtools-mcp","owner":"DevinoSolutions","description":"Undetectable browser automation for AI agents via MCP. Stealth Chrome DevTools with smart profile management, anti-detection arg filtering, and CDP access.","archived":false,"fork":false,"pushed_at":"2026-05-29T04:14:01.000Z","size":440,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-29T06:10:05.852Z","etag":null,"topics":["anti-detection","browser-automation","cdp","chrome-devtools","mcp","model-context-protocol","nodriver","python","stealth","web-scraping"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DevinoSolutions.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-14T20:15:59.000Z","updated_at":"2026-05-29T04:14:06.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/DevinoSolutions/stealth-chrome-devtools-mcp","commit_stats":null,"previous_names":["devinosolutions/stealth-chrome-devtools-mcp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DevinoSolutions/stealth-chrome-devtools-mcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevinoSolutions%2Fstealth-chrome-devtools-mcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevinoSolutions%2Fstealth-chrome-devtools-mcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevinoSolutions%2Fstealth-chrome-devtools-mcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevinoSolutions%2Fstealth-chrome-devtools-mcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DevinoSolutions","download_url":"https://codeload.github.com/DevinoSolutions/stealth-chrome-devtools-mcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevinoSolutions%2Fstealth-chrome-devtools-mcp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33876333,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-03T02:00:06.370Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anti-detection","browser-automation","cdp","chrome-devtools","mcp","model-context-protocol","nodriver","python","stealth","web-scraping"],"created_at":"2026-06-03T19:01:31.558Z","updated_at":"2026-06-03T19:01:33.231Z","avatar_url":"https://github.com/DevinoSolutions.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Stealth Chrome DevTools MCP\n\n[![Tests](https://github.com/DevinoSolutions/stealth-chrome-devtools-mcp/actions/workflows/test.yml/badge.svg)](https://github.com/DevinoSolutions/stealth-chrome-devtools-mcp/actions/workflows/test.yml)\n[![Python 3.11+](https://img.shields.io/badge/python-3.11%2B-blue.svg)](https://www.python.org/downloads/)\n[![License: AGPL-3.0](https://img.shields.io/badge/license-AGPL--3.0-blue.svg)](LICENSE)\n[![MCP](https://img.shields.io/badge/MCP-compatible-purple.svg)](https://modelcontextprotocol.io)\n\n\u003e Undetectable browser automation for AI agents via the Model Context Protocol.\n\nA self-contained **stealth Chrome DevTools MCP server** with smart profile management, anti-detection stealth arg filtering, and robust process lifecycle handling. Built on [nodriver](https://github.com/AminDhouib/nodriver) (CDP-based) for full anti-bot evasion.\n\n---\n\n## Key Features\n\n- **Undetectable by anti-bot systems** — Cloudflare, DataDome, PerimeterX, etc.\n- **Smart profile management** — master/snapshot/clone strategy preserves logins across sessions\n- **Stealth arg filtering** — automatically strips 30+ detectable Chrome flags (Puppeteer/Playwright signatures, automation markers)\n- **Multi-instance support** — spawn and manage multiple browsers simultaneously\n- **Auto-suffix busy profiles** — `github-session` auto-becomes `github-session-2` when occupied\n- **Orphan recovery** — safely cleans up leaked browser processes without killing live ones\n- **Session persistence** — cloned profiles carry cookies, logins, and Web Data from master\n- **Zero idle timeout** — browsers stay alive until explicitly closed\n- **Full CDP access** — DOM manipulation, network interception, JavaScript execution, screenshots\n\n## Quick Start\n\n### Install from GitHub\n\n```json\n{\n  \"mcpServers\": {\n    \"stealth-chrome-devtools-mcp\": {\n      \"command\": \"uvx\",\n      \"args\": [\n        \"--refresh\",\n        \"--from\",\n        \"git+ssh://git@github.com/DevinoSolutions/stealth-chrome-devtools-mcp.git\",\n        \"stealth-chrome-devtools-mcp\"\n      ]\n    }\n  }\n}\n```\n\n### Local Development\n\n```json\n{\n  \"mcpServers\": {\n    \"stealth-chrome-devtools-mcp\": {\n      \"command\": \"uv\",\n      \"args\": [\n        \"--directory\", \"/path/to/stealth-chrome-devtools-mcp\",\n        \"run\", \"stealth-chrome-devtools-mcp\"\n      ]\n    }\n  }\n}\n```\n\n## How It Works\n\n### Browser Profile Strategy\n\n```\nC:\\stealth-mcp-browser-sessions\\\n  master/              # Your primary Chrome profile (logins, cookies, extensions)\n  master-snapshot/     # Safe copy refreshed while master is closed\n  sessions/            # Cloned profiles for concurrent use\n    github-session/\n    github-session-2/  # Auto-suffixed when github-session is busy\n```\n\n1. `spawn_browser()` uses the master profile when available\n2. Before opening master, the server refreshes `master-snapshot`\n3. When master is busy, a clone is created from the snapshot\n4. Clones carry all cookies, logins, and session data\n5. Stale snapshots are auto-refreshed when auth files change\n\n### Stealth Arg Filtering\n\nThe server automatically strips Chrome flags that would compromise stealth:\n\n| Category | Examples | Why Stripped |\n|----------|----------|-------------|\n| Automation signals | `--enable-automation`, `--test-type` | Sets `navigator.webdriver=true` |\n| Fingerprint leaks | `--disable-gpu`, `--disable-webgl` | Detectable via WebGL/canvas probes |\n| Puppeteer defaults | `--disable-backgrounding-occluded-windows` | Bot signature fingerprint |\n| Playwright defaults | `--password-store=basic`, `--use-mock-keychain` | Bot signature fingerprint |\n\nStripped args are reported in `spawn_diagnostics.stealth_args_stripped`.\n\n### Orphan Recovery\n\nOn server restart, the process cleanup system:\n\n- Identifies browser processes from previous sessions via `create_time` tracking\n- Only kills processes started **before** the current server session\n- Never kills browsers spawned during the current run\n- Safely handles `psutil.AccessDenied` on Windows elevated processes\n\n## Usage Examples\n\n```python\n# Spawn with default master profile\nspawn_browser()\n\n# Named session with login persistence\nspawn_browser(user_data_dir=\"github-session\")\n\n# Same name while first is open → auto-suffixes to github-session-2\nspawn_browser(user_data_dir=\"github-session\")\n\n# Headless with stealth (bad args auto-stripped)\nspawn_browser(headless=True, browser_args=[\"--enable-automation\"])\n# → stealth_args_stripped: [\"--enable-automation stripped: sets navigator.webdriver=true\"]\n```\n\n## MCP Tools\n\n| Tool | Description |\n|------|-------------|\n| `spawn_browser` | Launch a new stealth browser instance |\n| `navigate` | Navigate to a URL |\n| `take_screenshot` | Capture page screenshot |\n| `execute_script` | Run JavaScript in page context |\n| `query_elements` | Find DOM elements by CSS selector |\n| `click_element` | Click on an element |\n| `type_text` | Type text into an input |\n| `get_page_content` | Get page HTML content |\n| `list_instances` | List all active browser instances |\n| `close_instance` | Close a specific browser |\n| `list_network_requests` | View intercepted network traffic |\n| `get_cookies` / `set_cookie` | Manage browser cookies |\n\n[See all tools →](src/stealth_chrome_devtools_mcp/embedded/server.py)\n\n## Testing\n\n```bash\n# Unit tests only (no Chrome needed)\nuv run pytest -m \"not integration\"\n\n# All tests (needs Chrome installed)\nuv run pytest\n\n# Verbose with short tracebacks\nuv run pytest -v --tb=short\n```\n\n**95 tests** covering stealth arg filtering, profile resolution, orphan recovery, and full browser integration.\n\n## Environment Variables\n\nAll optional. Defaults work for normal use.\n\n| Variable | Default | Purpose |\n|----------|---------|---------|\n| `STEALTH_MCP_BROWSER_SESSION_ROOT` | `C:\\stealth-mcp-browser-sessions` (Win) / `~/.stealth-mcp-browser-sessions` (Unix) | Base folder for profiles |\n| `BROWSER_MASTER_USER_DATA_DIR` | `\u003croot\u003e/master` | Master Chrome profile path |\n| `BROWSER_MASTER_SNAPSHOT_DIR` | `\u003croot\u003e/master-snapshot` | Snapshot clone source |\n| `BROWSER_PROFILE_CLONE_ROOT` | `\u003croot\u003e/sessions` | Folder for profile copies |\n| `BROWSER_PROFILE_REFRESH_DAYS` | `7` | Refresh copies after N days (`0` = disable) |\n| `BROWSER_IDLE_TIMEOUT` | `0` | Idle cleanup timeout (`0` = disabled) |\n| `STEALTH_CHROME_PROFILE_KEY` | unset | Force a stable clone key |\n| `STEALTH_BROWSER_DEBUG` | `false` | Enable debug logging |\n\n## Preparing the Master Profile\n\n1. Start the MCP server\n2. Call `spawn_browser()` without `user_data_dir`\n3. Sign in to your accounts in the browser that opens\n4. Close it — future sessions use this profile or clone from it\n\n## Requirements\n\n- Python 3.11+\n- Chrome, Chromium, or Microsoft Edge\n- [uv](https://docs.astral.sh/uv/) (recommended) or pip\n\n## License\n\nSee [LICENSE](LICENSE).\n\n---\n\nBuilt by [Devino Solutions](https://devino.ca)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevinosolutions%2Fstealth-chrome-devtools-mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevinosolutions%2Fstealth-chrome-devtools-mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevinosolutions%2Fstealth-chrome-devtools-mcp/lists"}