Anchor cloud browsers for sandbox agents. Hosted MCP servers, REST API and SDKs. Key stays on host.
241
Anchor cloud browsers for sandbox agents. Hosted MCP servers, REST API and SDKs. Key stays on host.
| Name | Required | Default | Description |
|---|---|---|---|
mcp | Optional | all | Register Anchor's hosted MCP servers with the agent (all), or leave the agent's MCP config alone (none).Options: all, none |
anchorbrowserExpand a row to see its full configuration. See the full spec for the complete descriptor.
| Configuration | Type | Required | Description |
|---|---|---|---|
com.docker.sandbox/network-policy@1 | Required | — | |
com.docker.sandbox/credential@1 | Required | Anchor Browser API key from https://app.anchorbrowser.io/api-keys | |
com.docker.sandbox/lifecycle@1 | Required | — | |
com.docker.sandbox/agent-skill@1 | Optional | — | |
com.docker.sandbox/agent-skill@1 | Optional | — | |
com.docker.sandbox/agent-context@1 | Required | — |
sbx run <agent> --kit sbx/anchorbrowser:latestRun the following command to install sbx on your machine.
brew install docker/tap/sbxwinget install Docker.sbxNote
Experimental: Sandbox Kit v3This kit uses the experimental Sandbox Kit specification, specifically v3. The format and runtime behavior may change before v3 is stable.
A mixin kit (kind: mixin) that gives any Docker Sandbox agent access to Anchor Browser cloud browsers. It registers Anchor's three hosted MCP servers with Claude Code and Codex, bundles two skills, and routes API authentication through the sandbox proxy so the real key never enters the sandbox.
Anchor maintains this kit at anchorbrowser/anchorbrowser-plugin. The copy here tracks that repository so the kit is discoverable alongside the other community kits.
Create an Anchor Browser API key and store it once in Docker Sandboxes' host-side secret store:
sbx secret set anchorbrowser
The primary form is the published OCI artifact on Docker Hub:
sbx run --kit "docker.io/sbx/anchorbrowser:latest" claude
Or target this repo directly over git:
sbx run --kit "git+https://github.com/docker/sbx-kits-contrib.git#dir=anchorbrowser" claude
Or use a local clone:
sbx run --kit ./anchorbrowser/ claude
On the first run sbx asks you to approve sending the anchorbrowser credential to api.anchorbrowser.io. Accept it; the value already lives in the secret store.
Inside the sandbox, anchorbrowser-smoke checks the whole path: it confirms the key is accepted, creates a session, opens the CDP websocket, calls the hosted MCP endpoint, then ends the session and confirms nothing is left running.
Docker's claude, codex and shell workloads ship Python and pip, and no Node.
| Path | On those workloads |
|---|---|
| MCP tools | Work. Claude Code connects to all three servers. Codex gets them in ~/.codex/config.toml. |
REST with curl | Works. |
| Python SDK | pip install --user anchorbrowser works, and so do sessions and tasks. |
| Playwright from Python | Its driver needs the libatomic1 system library, which these images lack. |
| TypeScript SDK | Needs Node. Compose with the Playwright mixin, which brings it. |
To write and run TypeScript against a session, compose the two mixins:
sbx run --kit "docker.io/sbx/playwright:1.65.1-0" --kit ./anchorbrowser/ claude
In that sandbox npm install anchorbrowser and the SDK's createBrowser() connect to a live Anchor session.
The kit declares two things:
com.docker.sandbox/credential@1 capability whose apiKey.inject maps api.anchorbrowser.io to the anchorbrowser credential, telling the proxy to set the anchor-api-key header on outbound requests to that host.com.docker.sandbox/network-policy@1 capability whose runtime.allow also permits connect.anchorbrowser.io, the CDP websocket host, which gets no auth injection. The cdp_url Anchor returns carries no API key.ANCHORBROWSER_API_KEY is declared with apiKey.proxyManaged: true: the sandbox holds a placeholder, and the proxy supplies the real credential at request time. Because the proxy sets the header on every request to the API host, the SDKs, curl and the MCP clients all authenticate without sending anything themselves.
| Server | URL |
|---|---|
anchor | https://api.anchorbrowser.io/v1/mcp |
anchor-browser | https://api.anchorbrowser.io/v1/mcp/browser |
anchor-actions | https://api.anchorbrowser.io/v1/mcp/actions |
One script, anchorbrowser-mcp-register, runs as an install hook and again as a startup hook. The install run is race-free: it comes after the workload's own install hooks, which seed the agent's config, and before the agent launches. The startup run repeats it on every boot. It stores no header and no placeholder in the agent's config, because the proxy supplies the key.
It registers with Claude Code (claude mcp add) and Codex (~/.codex/config.toml). For other agents, add the URLs by hand. To leave the agent's MCP config alone:
sbx run --kit ./anchorbrowser/ --kit-arg mcp=none claude
| Component | Location | How |
|---|---|---|
anchorbrowser-smoke | /usr/local/bin/ | Static file in the kit's overlay layer |
anchorbrowser-mcp-register | /usr/local/bin/ | Static file in the kit's overlay layer |
| SDK skill and MCP tool guide | /usr/share/anchorbrowser/skills/ | Static files in the overlay, exposed to the agent through agent-skill@1 where the workload has a skills directory |
The overlay is staged under /out and copied into a scratch stage with explicit modes. Copying a file straight into scratch with --chmod applies that mode to every parent directory BuildKit creates, which would replace the base's /usr/share with one the agent cannot traverse.
api.anchorbrowser.io and connect.anchorbrowser.io for Anchor itself, and pypi.org, files.pythonhosted.org and registry.npmjs.org for the SDK installs the agent context documents. The live view on live.anchorbrowser.io is left out on purpose: you open it in your own browser, not from the sandbox.
The kit writes nothing to the host. Remove the stored key with sbx secret rm anchorbrowser. Sessions created inside the sandbox belong to your Anchor account; anchorbrowser-smoke ends the one it creates.