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.19.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.19.0
File Size Uploaded Provenance Actions
auto_browser_client-1.19.0.tar.gz 62.1 kB With provenance Details for auto_browser_client-1.19.0.tar.gz

Built distribution (wheel)

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

Total release size: 87.9 kB

Release files / auto_browser_client-1.19.0.tar.gz

Download URL auto_browser_client-1.19.0.tar.gz
Size 62.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d28399ba672fca0911700e11fb3a40dd4ede18b0ac233dc7183695a9a8c48a58
BLAKE2b-256 checksum
How to use checksums
b47c46e21f58f94338f26c7d852f34efe9c2163a18070f37195538e5200beafd
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 22, 2026.

Transparency log

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

Download URL auto_browser_client-1.19.0-py3-none-any.whl
Size 25.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c5f982b49878c63dd8622f98b385c7462c21612f5c662f87a77889c375f4c67c
BLAKE2b-256 checksum
How to use checksums
53671a4bd63a4546d6070ce87e7490a482e14930f915e4e6b65e6b2ed9b70af7
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 22, 2026.

Transparency log

Security for auto-browser-client 1.19.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.19.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 22, 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.19.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