> ## 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. AI agents should start at https://docs.anchorbrowser.io/for-agents, then get an API key with Agent Access at https://docs.anchorbrowser.io/quickstart/agent-access — no dashboard account required. Read those two pages before authentication or API calls.

# MCP - Hosted Version

> Connect Cursor, Claude, ChatGPT, Grok, or any MCP client to Anchor: cloud browsers that get past bot detection, sign in with MFA, run deterministic site actions, and scale without concurrency limits.

<img src="https://mintcdn.com/anchor-b3ec2715/hJc2I0-WvjLCCXOl/images/mcp_logo.png?fit=max&auto=format&n=hJc2I0-WvjLCCXOl&q=85&s=ec164cf1532c41350abe6f1dd8c52e73" alt="Model Context Protocol" style={{width: "200px", margin: "20px 0"}} width="485" height="514" data-path="images/mcp_logo.png" />

Anchor's hosted MCP servers give an agent a real browser in the cloud. Each session is an isolated VM destroyed when it ends, there is no concurrency limit, and the tools cover what agents actually struggle with on the web:

* **Sites that block bots**: residential and mobile proxies by country, extra-stealth fingerprinting, automatic captcha solving.
* **Scale at low cost**: saved tasks and the action index run deterministic code and fall back to an AI step only where a page changed, so repeat work does not pay LLM cost.
* **Digital coworkers**: long-lived signed-in sessions, a live view the user can watch or take over, and sign-in links so a person never hands an agent a password.
* **Authentication**: identities are managed logins; Anchor signs in, handles MFA, and keeps credentials in its vault. No tool returns them.
* **Security**: ephemeral VMs, Zero Data Retention mode, SOC 2 Type II, ISO 27001, HIPAA, and GDPR.

Nothing to install. Paste a URL into your client and sign in, or add an API key header. The dashboard's [MCP page](https://app.anchorbrowser.io/mcp) builds the config for you.

## Servers

Three servers over the same account. Start with `Anchor`; add `Anchor Browser` to drive a live browser and `Anchor Actions` for one site's verified actions.

<CardGroup cols={3}>
  <Card title="Anchor" icon="anchor" href="#anchor">
    `https://api.anchorbrowser.io/v1/mcp` — start here. Web tasks, site actions, saved automations, managed logins, browser sessions, and `call_endpoint` for everything else.
  </Card>

  <Card title="Anchor Browser" icon="browser" href="#anchor-browser">
    `https://api.anchorbrowser.io/v1/mcp/browser` — step-by-step control of a live browser.
  </Card>

  <Card title="Anchor Actions" icon="bolt" href="#anchor-actions">
    `https://api.anchorbrowser.io/v1/mcp/actions/{domain}` — deterministic recipes for one site as typed tools. Always pass a domain from an IDE or chat client.
  </Card>
</CardGroup>

### Anchor

`https://api.anchorbrowser.io/v1/mcp`

[Add to Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=anchor\&config=eyJ1cmwiOiJodHRwczovL2FwaS5hbmNob3Jicm93c2VyLmlvL3YxL21jcCJ9), or from a CLI:

```bash theme={null}
claude mcp add --transport http anchor https://api.anchorbrowser.io/v1/mcp
grok mcp add --transport http anchor https://api.anchorbrowser.io/v1/mcp
```

The headline set for agents that should get work done on the web:

| Area | Tools |
| - | - |
| Web tasks | `perform_web_task`, `get_web_task_status` |
| Site actions | `search_action_index`, `get_action_index`, `execute_action_index` |
| Saved automations | `list_tasks`, `get_task`, `run_task`, `get_execution` |
| Managed logins | `create_identity`, `create_identity_link`, `create_reauth_link`, `reauthenticate_identity`, `get_identity` |
| Browser sessions | `create_session`, `get_session`, `end_session` |
| Docs | `search_docs`, `read_doc` |
| Everything else | `list_endpoints`, `get_endpoint`, `call_endpoint_read`, `call_endpoint_write` |

Long operations are asynchronous so tool calls return within a minute: `perform_web_task` returns a `workflow_id` to poll with `get_web_task_status`, `reauthenticate_identity` returns `pending` to poll with `get_identity`, and `run_task` returns an execution to poll with `get_execution`.

<Note>
  `https://api.anchorbrowser.io/v1/mcp/all` serves every route tagged for agents as its own typed tool, `Anchor` tools first, for integrations whose client can hold a large tool list. Use it instead of `Anchor`, not alongside it; the tool names overlap.
</Note>

### Anchor Browser

`https://api.anchorbrowser.io/v1/mcp/browser`

[Add to Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=anchor-browser\&config=eyJ1cmwiOiJodHRwczovL2FwaS5hbmNob3Jicm93c2VyLmlvL3YxL21jcC9icm93c2VyIn0%3D), or from a CLI:

```bash theme={null}
claude mcp add --transport http anchor-browser https://api.anchorbrowser.io/v1/mcp/browser
grok mcp add --transport http anchor-browser https://api.anchorbrowser.io/v1/mcp/browser
```

Step-by-step `anchor_*` tools over a live Anchor session: navigate, snapshot, click, type, screenshot, network and console logs, and Playwright code generation. Element references come from accessibility snapshots instead of selectors, so no vision model is needed. Add an `anchor-session-id` header to attach to a session you created on the `Anchor` server; without it the first tool call opens a new session. Every result echoes the session id so `perform_web_task` and actions can continue in the same browser.

<Note>
  `https://api.anchorbrowser.io/mcp` is the legacy address of this server and keeps working with an `anchor-api-key` header.
</Note>

### Anchor Actions

`https://api.anchorbrowser.io/v1/mcp/actions/{domain}`, for example `/v1/mcp/actions/amazon.com`

The domain is part of the URL, so each site is its own server. For `amazon.com`: [Add to Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=anchor-amazon\&config=eyJ1cmwiOiJodHRwczovL2FwaS5hbmNob3Jicm93c2VyLmlvL3YxL21jcC9hY3Rpb25zL2FtYXpvbi5jb20ifQ%3D%3D), or from a CLI:

```bash theme={null}
claude mcp add --transport http anchor-amazon https://api.anchorbrowser.io/v1/mcp/actions/amazon.com
grok mcp add --transport http anchor-amazon https://api.anchorbrowser.io/v1/mcp/actions/amazon.com
```

Several sites run in parallel: repeat with a different name and domain for each (`anchor-linkedin`, `anchor-github`, …). They share one sign-in and tool names are prefixed with the site, so they do not collide. The `anchor-actions` plugin holds one domain per install; use these per-site entries for anything beyond that.

Every active action index item for the site becomes a tool with the action's own parameter schema. Actions that require a signed-in session say so; pass the `sessionId` of a session created with an identity on the `Anchor` server. Each run is deterministic code in an Anchor browser, with no LLM steps.

Without a domain, `/v1/mcp/actions` lists every active action across all sites, currently thousands of tools. That form is for programmatic consumers that index tools themselves; IDE and chat clients should always use the domain form.

## Authentication

**Sign in (OAuth).** Give the client only the URL. On first use it opens the Anchor sign-in and connects to your default project. Cursor, Claude, ChatGPT, Grok, and VS Code all support this.

**API key.** Add an `anchor-api-key` header from [API Keys](https://app.anchorbrowser.io/api-keys). Use this for CI, non-interactive runtimes, a project other than your default, or an [Agent Access](/quickstart/agent-access) key. Teams using Agent Access identity enforcement also send `anchor-identity-token`.

## Connect a client

Each server above has its own Add to Cursor link and CLI commands. The snippets here use the `Anchor` server and cover the remaining clients; swap the URL for any server.

<Tabs>
  <Tab title="Cursor">
    One click: [Add to Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=anchor\&config=eyJ1cmwiOiJodHRwczovL2FwaS5hbmNob3Jicm93c2VyLmlvL3YxL21jcCJ9), or add to `.cursor/mcp.json`:

    ```json theme={null}
    {
      "mcpServers": {
        "anchor": {
          "url": "https://api.anchorbrowser.io/v1/mcp"
        }
      }
    }
    ```

    With an API key instead of sign-in:

    ```json theme={null}
    {
      "mcpServers": {
        "anchor": {
          "url": "https://api.anchorbrowser.io/v1/mcp",
          "headers": { "anchor-api-key": "YOUR_ANCHOR_API_KEY" }
        }
      }
    }
    ```
  </Tab>

  <Tab title="Claude">
    Claude Code:

    ```bash theme={null}
    claude mcp add --transport http anchor https://api.anchorbrowser.io/v1/mcp
    ```

    Claude Desktop and claude.ai: Settings → Connectors → Add custom connector, paste `https://api.anchorbrowser.io/v1/mcp`, and sign in when prompted.
  </Tab>

  <Tab title="ChatGPT">
    Settings → Connectors → Create, paste `https://api.anchorbrowser.io/v1/mcp`, and sign in when prompted. Developer mode must be enabled for custom connectors.
  </Tab>

  <Tab title="Grok">
    Grok CLI:

    ```bash theme={null}
    grok mcp add --transport http anchor https://api.anchorbrowser.io/v1/mcp
    ```

    grok.com: Connectors → New Connector → Custom, paste the URL, and sign in. Grok also reads `.cursor/mcp.json` and `.mcp.json` from your project.
  </Tab>

  <Tab title="VS Code">
    Add to `.vscode/mcp.json`:

    ```json theme={null}
    {
      "servers": {
        "anchor": {
          "type": "http",
          "url": "https://api.anchorbrowser.io/v1/mcp"
        }
      }
    }
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    import asyncio
    from mcp import ClientSession
    from mcp.client.streamable_http import streamablehttp_client

    async def main():
        async with streamablehttp_client(
            url="https://api.anchorbrowser.io/v1/mcp",
            headers={"anchor-api-key": "YOUR_ANCHOR_API_KEY"},
        ) as (read, write, _):
            async with ClientSession(read, write) as session:
                await session.initialize()
                result = await session.call_tool(
                    "perform_web_task",
                    {"prompt": "Return the top Show HN post", "url": "https://news.ycombinator.com"},
                )
                print(result.content[0].text)

    asyncio.run(main())
    ```
  </Tab>

  <Tab title="OpenAI / xAI API">
    Attach a server to a Responses API request; the platform calls Anchor for you:

    ```python theme={null}
    tools=[{
        "type": "mcp",
        "server_label": "anchor",
        "server_url": "https://api.anchorbrowser.io/v1/mcp",
        "headers": {"anchor-api-key": "YOUR_ANCHOR_API_KEY"},
    }]
    ```
  </Tab>
</Tabs>

## Examples

<Expandable title="Run a web task and poll it">
  ```text theme={null}
  Use Anchor to find the current top post on Hacker News and give me its title and URL.
  ```

  The agent calls `perform_web_task`, receives a `workflow_id`, and polls `get_web_task_status` until the result is ready.
</Expandable>

<Expandable title="Work inside a signed-in account">
  ```text theme={null}
  Create an Anchor identity for https://app.example.com and give me a link to sign in.
  Then open a session with it and list my open invoices.
  ```

  The agent calls `create_identity`, then `create_reauth_link` and hands you the link. After you sign in, it calls `create_session` with the identity and runs `perform_web_task` with that `sessionId`. Your password never passes through the conversation.
</Expandable>

<Expandable title="Generate a Playwright test from a real session (Anchor Browser)">
  ```text theme={null}
  - You are a playwright test generator.
  - You are given a scenario and you need to generate a playwright test for it.
  - DO NOT generate test code based on the scenario alone.
  - DO run steps one by one using the tools provided by the Anchor Browser MCP.
  - Only after all steps are completed, emit a Playwright TypeScript test that uses @playwright/test based on message history
  - Save generated test file in the tests directory
  - Execute the test file and iterate until the test passes

  Generate a Playwright test for the following scenario:
  1. Navigate to https://www.imdb.com/
  2. search for 'Garfield'
  3. return the director of the last movie
  ```

  <video autoPlay muted loop playsInline src="https://mintcdn.com/anchor-b3ec2715/hJc2I0-WvjLCCXOl/images/garfield-test-generator.mp4?fit=max&auto=format&n=hJc2I0-WvjLCCXOl&q=85&s=9174bc30dd24beede6a343fb305f7b7b" alt="Test Generator" data-path="images/garfield-test-generator.mp4" />
</Expandable>

## Install as a plugin

The [anchor-mcp-plugin](https://github.com/anchorbrowser/anchor-mcp-plugin) repository lists `anchor`, `anchor-browser`, and `anchor-actions` as separate plugins for Cursor, Claude Code, and Grok, using sign-in for authentication. `anchor-actions` asks for the site domain.

```bash theme={null}
claude plugin marketplace add anchorbrowser/anchor-mcp-plugin
claude plugin install anchor@anchorbrowser
```

In Cursor, install **Anchor** from the marketplace; **Anchor Browser** and **Anchor Actions** are listed alongside it. For Grok, copy the repository's `.grok/config.toml` into your project or run the `grok mcp add` commands from its README.

## Self-hosting

For custom tools or running inside your own infrastructure, see the [open source MCP server](/advanced/mcp-open-source).

## Getting help

1. Check the API key or re-run the sign-in from your client.
2. Disable and re-enable the server in the client.
3. Reach out at [support@anchorbrowser.io](mailto:support@anchorbrowser.io).


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