Skip to main content

auto-browser-client

Python SDK and MCP stdio bridge for the Auto Browser REST API.

SDK

from auto_browser_client import AutoBrowserClient

client = AutoBrowserClient("http://localhost:8000", token_file="data/api-token")
session = client.create_session(start_url="https://example.com")
client.navigate(session["id"], "https://example.com/dashboard")
client.close_session(session["id"])

A local controller with no API_BEARER_TOKEN saves its generated token to data/api-token in the auto-browser folder; token_file reads it once, when the client is built (a relative path is relative to where your code runs). Pass token= instead for a token you set. A missing file raises FileNotFoundError, an empty one ValueError.

Every method has an async_ twin (await client.async_create_session(...)), and the client works as a sync or async context manager. HTTP errors raise AutoBrowserError, which carries status_code and the controller's detail.

An AutoBrowserError, and httpx's own errors raised from a call (a connection or protocol failure), leave out the token and the base URL's userinfo, query and fragment. httpx itself logs every request at INFO on its httpx logger, naming the URL as sent (userinfo, query and fragment included) and the server's reason phrase, and this package does not filter that logger: keep a secret in token or token_file, not in the base URL. A base URL holding a user name or password is refused with a token or an Authorization header in headers (ValueError), since httpx would send them as Basic credentials in place of it; without either they go as Basic credentials. A base URL's query is sent with every request, as httpx writes parameters (a request's own parameter replaces one of the same name); its fragment is never sent.

A controller with REQUIRE_OPERATOR_ID=true rejects requests that don't name an operator. A named credential (API_BEARER_TOKENS) names one through the token; with the shared token, pass operator_id. Any other headers go in headers:

from auto_browser_client import AutoBrowserClient, AutoBrowserError

client = AutoBrowserClient(
    "http://localhost:8000",
    token="secret",
    operator_id="alice",
)
try:
    client.observe(session_id, preset="text")
except AutoBrowserError as exc:
    print(exc.status_code, exc.detail)

MCP stdio bridge

This package also ships the auto-browser-mcp console script, which bridges stdio MCP clients (Claude Desktop, Cursor, ...) to a running Auto Browser controller:

auto-browser-mcp --base-url http://127.0.0.1:8000/mcp \
  --token-file /ABSOLUTE/PATH/TO/auto-browser/data/api-token

--token-file (or AUTO_BROWSER_TOKEN_FILE) is read on every request, so the bridge can start before the controller has written it. --bearer-token (or AUTO_BROWSER_BEARER_TOKEN) wins when it is set.

A bridge older than the one that added --token-file ignores AUTO_BROWSER_TOKEN_FILE, so every tool call fails with HTTP 401: use uvx auto-browser-mcp@latest, or set AUTO_BROWSER_BEARER_TOKEN to the file's contents.

Or zero-install via uv: uvx auto-browser-mcp (resolved through the auto-browser-mcp metapackage).

The server itself is Docker-first — see the Auto Browser repository to run it.

Metadata

Release files for auto-browser-client 1.17.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for auto-browser-client 1.17.0
File Size Uploaded Provenance Actions
auto_browser_client-1.17.0.tar.gz 61.3 kB With provenance Details for auto_browser_client-1.17.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for auto-browser-client 1.17.0
File Interpreter ABI Platform Actions
auto_browser_client-1.17.0-py3-none-any.whl Python 3 none any Details for auto_browser_client-1.17.0-py3-none-any.whl

Total release size: 86.2 kB

Release files / auto_browser_client-1.17.0.tar.gz

Download URL auto_browser_client-1.17.0.tar.gz
Size 61.3 kB
Tags Source
SHA-256 checksum
How to use checksums
3deb7ae0cce35253dce3aa42e6e0ccf088c3e17e32b96101cf19838fc32a0400
BLAKE2b-256 checksum
How to use checksums
10dbe982f97c56dcac8f9f99eb00ff12bed71377f5b3c73a69e3f22bef51936c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

Release files / auto_browser_client-1.17.0-py3-none-any.whl

Download URL auto_browser_client-1.17.0-py3-none-any.whl
Size 24.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c6f1a8cc90b427796466734487cc673d743b392b32692b7710271da11e84c669
BLAKE2b-256 checksum
How to use checksums
28edb1bb04f5de3db6a709dbcf9b11cbc5b645f8aa42b725ed1d174da3a95f4e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

Security for auto-browser-client 1.17.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for auto_browser_client-1.17.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.17.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page