> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anchorbrowser.io/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Anchor Browser is cloud browser infrastructure for AI agents and automation: browser sessions you control over CDP or REST, natural-language web tasks, versioned automation tasks, managed authentication into third-party web apps (identities with MFA), persistent volumes and profiles, recordings, live view, batch sessions, webhooks, and network options including residential proxies, extra stealth, and captcha solving for sites that block standard browsers. The for-agents page (https://docs.anchorbrowser.io/for-agents) covers authentication and the first API calls. API keys are created at https://app.anchorbrowser.io/api-keys. Append .md to any page URL for its Markdown version. The SDKs read the API key from ANCHORBROWSER_API_KEY, and REST calls send it in the anchor-api-key header. End every session you create with DELETE /v1/sessions/{id}, because a session is billed until it ends. Location targeting, captcha solving and managed authentication need the Starter plan, and extra stealth needs the Growth plan; on the Free plan, create a session with an empty body. Plans and limits are at https://docs.anchorbrowser.io/pricing. The hosted MCP server is https://api.anchorbrowser.io/v1/mcp.

# OpenClaw

> Give OpenClaw agents a cloud browser: register the Anchor MCP server so they can run web tasks and use signed-in accounts.

Connect [OpenClaw](https://openclaw.ai) to Anchor's hosted MCP server. Your agents can then run web tasks in plain English, open cloud browser sessions and work inside accounts you have signed in to. The browser runs in Anchor's cloud, so nothing is installed on the machine that hosts OpenClaw.

Tested with OpenClaw 2026.6.35 and 2026.12.1.

## Quick setup

Register the server:

```bash theme={null}
openclaw mcp add anchor --url https://api.anchorbrowser.io/v1/mcp --transport streamable-http --auth oauth
```

```text theme={null}
Saved MCP server "anchor" to /home/you/.openclaw/openclaw.json.
Run openclaw mcp login anchor to authorize this MCP server.
```

Sign in. This takes two steps, because OpenClaw's CLI finishes sign-in with a code:

```bash theme={null}
openclaw mcp login anchor
```

```text theme={null}
Open this URL to authorize "anchor":
https://signin.anchorbrowser.io/oauth2/authorize?response_type=code&client_id=...
After approval, run openclaw mcp login anchor --code <code>.
```

1. Open the link and choose **Allow access** on the Anchor page.
2. Your browser then goes to `http://127.0.0.1:8989/oauth/callback?code=...` and shows a connection error. That is expected. Copy the value of `code` from the address bar.
3. Finish the sign-in with that code:

```bash theme={null}
openclaw mcp login anchor --code YOUR_CODE
```

```text theme={null}
MCP OAuth credentials saved for "anchor".
```

You are now connected to your default Anchor project. Each run of `openclaw mcp login anchor` prints a new link, and only the latest one works, so use the code quickly.

Check that the server answers and lists its tools:

```bash theme={null}
openclaw mcp probe anchor
```

```text theme={null}
MCP probe (/Users/you/.openclaw/openclaw.json):
- anchor: 29 tools
```

Saving a server does not prove it is reachable, so run the probe before handing it to an agent.

You can also add it in the Control UI: **Settings**, **MCP**, **Configured servers**, **Add server**, and pick **Streamable HTTP**.

## Use an API key instead

An always-on agent usually has no browser to sign in with. Send an API key instead. Create one at [API Keys](https://app.anchorbrowser.io/api-keys), make it available to OpenClaw as `ANCHORBROWSER_API_KEY`, and add the server with a header:

```bash theme={null}
openclaw mcp add anchor --url https://api.anchorbrowser.io/v1/mcp --transport streamable-http --header 'anchor-api-key=${ANCHORBROWSER_API_KEY}'
```

Keep the single quotes so the variable name, not the key, is saved. OpenClaw connects to the server before saving, so a wrong key fails here. The command writes this to `~/.openclaw/openclaw.json`:

```json5 theme={null}
{
  mcp: {
    servers: {
      anchor: {
        url: "https://api.anchorbrowser.io/v1/mcp",
        transport: "streamable-http",
        headers: {
          "anchor-api-key": "${ANCHORBROWSER_API_KEY}"
        }
      }
    }
  }
}
```

Leave `auth: "oauth"` out of this entry. Use one method per server, either sign-in or the header.

> [!WARNING]
>
> Use `${ANCHORBROWSER_API_KEY}` rather than pasting the key. `openclaw mcp doctor` warns about secrets written into the config file.

## Try it

Ask your agent:

```text theme={null}
Use Anchor to open https://books.toscrape.com and return the title and price of the first five books.
```

```text theme={null}
Create an Anchor identity for https://linkedin.com and send me the link to sign in. Once I have signed in, open a session with it and list my recent notifications.
```

The second prompt is the pattern for work inside an account: you sign in once through the link, and the agent uses the session without ever seeing the password.

## Troubleshooting

* **The probe fails:** run `openclaw mcp doctor anchor --probe`, then `openclaw mcp show anchor` to confirm the URL and transport.
* **`requires OAuth authorization` from the probe:** the sign-in is not finished. Run `openclaw mcp login anchor` again and complete it with `--code`.
* **The code is rejected:** it has expired or belongs to an older link. Run `openclaw mcp login anchor` for a fresh link.
* **No browser on the host:** open the link on any other machine, copy the code from its address bar, and run the `--code` command on the host. Or use the API key setup.
* **401 Unauthorized:** confirm `ANCHORBROWSER_API_KEY` is set in the environment OpenClaw runs in, not only in your own shell.
* **Too many tools in context:** limit the server to the tools you need with `--include`, for example `--include 'perform_web_task,get_web_task_status,create_session,end_session'`.

## Next steps

* [MCP servers and tools](https://docs.anchorbrowser.io/advanced/mcp.md): the three Anchor servers and what each tool does.
* [Managed authentication](https://docs.anchorbrowser.io/essentials/authenticated-applications.md): how identities keep passwords away from the agent.
* [All integrations](https://docs.anchorbrowser.io/integrations/overview.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.