Stealth browser automation for AI agents over MCP and the Chrome DevTools Protocol: navigation, network hooks, DOM extraction, and pixel-accurate UI cloning.
Python ai-agent-toolsai-toolsanthropicanti-bot-bypassautomation-toolsbrowser-automationchrome-devtoolsclaude-mcpcloudflare-bypassdeveloper-toolsfastmcpmcp-servermodel-context-protocolnetwork-interceptionnodriverpythonstealth-browserundetectable-browserweb-automationweb-scraping
Publish to PyPI as browserstealthmcp
Vibhek Soni63761e3bf4a4
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 30d8462..ca21d43 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -50,4 +50,5 @@ jobs:run: |pipx install --python "$(which python)" "$GITHUB_WORKSPACE"/dist/*.whlstealth-browser-mcp --list-sections- "$(pipx environment --value PIPX_LOCAL_VENVS)/stealth-browser-mcp/bin/python" -c "from stealth_browser_mcp import element_cloner, paths; assert paths.source_checkout_root() is None; assert (element_cloner.JS_DIR / 'extract_structure.js').is_file(); print(paths.clone_output_dir())"+ browserstealthmcp --list-sections > /dev/null+ "$(pipx environment --value PIPX_LOCAL_VENVS)/browserstealthmcp/bin/python" -c "from stealth_browser_mcp import element_cloner, paths; assert paths.source_checkout_root() is None; assert (element_cloner.JS_DIR / 'extract_structure.js').is_file(); print(paths.clone_output_dir())"diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex 42b14d8..dafdd9d 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -30,7 +30,7 @@ jobs:timeout-minutes: 10environment:name: pypi- url: https://pypi.org/project/stealth-browser-mcp/+ url: https://pypi.org/project/browserstealthmcp/permissions:id-token: writesteps:@@ -39,3 +39,5 @@ jobs:name: distpath: dist/- uses: pypa/gh-action-pypi-publish@release/v1+ with:+ skip-existing: truediff --git a/CHANGELOG.md b/CHANGELOG.mdindex fdc6af6..2d019c2 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -6,7 +6,7 @@ The format is based on Keep a Changelog and adheres to Semantic Versioning where## [Unreleased]### Added-- **pipx install** - `pipx install git+https://github.com/vibheksoni/stealth-browser-mcp.git` installs a `stealth-browser-mcp` command, so MCP clients can use `"command": "stealth-browser-mcp"` instead of a venv interpreter and script path. `python -m stealth_browser_mcp` works too. The code moved into a real `stealth_browser_mcp` package under `src/`, the JavaScript templates ship as package data, and `pyproject.toml` has a build system and console script. `python src/server.py` still works for existing configs (#38).+- **PyPI package** - `pipx install browserstealthmcp` installs a `stealth-browser-mcp` command, and `uvx browserstealthmcp` runs it without installing. The PyPI name differs because `stealth-browser-mcp` on PyPI belongs to an unrelated project. Installing from the GitHub URL works too. MCP clients can use `"command": "stealth-browser-mcp"` instead of a venv interpreter and script path. `python -m stealth_browser_mcp` works too. The code moved into a real `stealth_browser_mcp` package under `src/`, the JavaScript templates ship as package data, and `pyproject.toml` has a build system and console script. `python src/server.py` still works for existing configs (#38).- **`STEALTH_BROWSER_MCP_DATA_DIR`** - Sets where element clones and large responses are written. An installed package defaults to the per-user data directory, and the file upload allowlist defaults to an `uploads` folder inside it. A clone keeps using the repo root for both.- **`press_key()` tool** - Presses real keys through CDP `Input.dispatchKeyEvent`, producing trusted `keydown`/`keypress`/`keyup` events. Supports named keys (Enter, Tab, Escape, arrows, Backspace, Delete, Home, End, PageUp, PageDown, Space, F1-F12), single printable characters, modifier combinations (Shift, Control/Ctrl, Alt, Meta/Cmd), optional focus selector, repeat count, and inter-press delay.- **Tests** - `tests/test_press_key.py` covers the key-to-CDP mapping, the modifier bitmask, and the dispatch sequence. A browser-backed test asserting `isTrusted` runs when `STEALTH_BROWSER_TESTS=1` is set.diff --git a/README.md b/README.mdindex 9c34672..6e305d7 100644--- a/README.md+++ b/README.md@@ -105,12 +105,12 @@ Requires Python 3.10+ and Chrome, Chromium, or Microsoft Edge.**With pipx (recommended):**```bash-pipx install git+https://github.com/vibheksoni/stealth-browser-mcp.git+pipx install browserstealthmcp```-This puts a `stealth-browser-mcp` command on your `PATH`. Upgrade with `pipx upgrade stealth-browser-mcp`, or pin a release by adding `@<tag>` to the URL. `uvx --from git+https://github.com/vibheksoni/stealth-browser-mcp.git stealth-browser-mcp` runs it without installing.+This puts a `stealth-browser-mcp` command on your `PATH`. Upgrade with `pipx upgrade browserstealthmcp`. `uvx browserstealthmcp` runs it without installing. To run the latest commit instead of a release, use `pipx install git+https://github.com/vibheksoni/stealth-browser-mcp.git`.-The package is not on PyPI yet. `pipx install stealth-browser-mcp` without the GitHub URL installs a different, unrelated project that uses the same name.+The PyPI package is named `browserstealthmcp` because `stealth-browser-mcp` on PyPI belongs to a different, unrelated project. `pipx install stealth-browser-mcp` installs that project, not this one.**From a clone (for development):**@@ -150,7 +150,7 @@ Or in any client's JSON config:}```-If your client cannot find the command, use the full path printed by `pipx list`.+If your client cannot find the command, use the full path printed by `pipx list`. With uv you can skip the install and use `"command": "uvx", "args": ["browserstealthmcp"]`.**From a clone with Claude Code CLI:**diff --git a/pyproject.toml b/pyproject.tomlindex be04d34..ab2f53e 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -3,7 +3,7 @@ requires = ["hatchling>=1.26"]build-backend = "hatchling.build"[project]-name = "stealth-browser-mcp"+name = "browserstealthmcp"dynamic = ["version"]description = "Ultimate undetectable browser automation MCP server with CDP-level access"readme = "README.md"@@ -32,6 +32,7 @@ dependencies = [[project.scripts]stealth-browser-mcp = "stealth_browser_mcp.server:main"+browserstealthmcp = "stealth_browser_mcp.server:main"# Development dependencies (optional)[project.optional-dependencies]