> ## Documentation Index
> Fetch the complete documentation index at: https://browseruse-0aece648-magnus-streaming-api-link.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Server

> Run browser automation tasks from your AI coding assistant. Connect to Claude, Cursor, Windsurf, or any MCP client.

```
https://api.browser-use.com/v3/mcp
```

Get your API key at [cloud.browser-use.com/settings](https://cloud.browser-use.com/settings?tab=api-keys\&new=1).

## Claude Code

```bash theme={null}
claude mcp add -t http -H "x-browser-use-api-key: YOUR_API_KEY" browser-use https://api.browser-use.com/v3/mcp
```

## Claude Desktop

Add to `claude_desktop_config.json`:

```json theme={null}
{
  "mcpServers": {
    "browser-use": {
      "url": "https://api.browser-use.com/v3/mcp",
      "headers": {
        "x-browser-use-api-key": "YOUR_API_KEY"
      }
    }
  }
}
```

## Cursor

Add to `.cursor/mcp.json`:

```json theme={null}
{
  "mcpServers": {
    "browser-use": {
      "url": "https://api.browser-use.com/v3/mcp",
      "headers": {
        "x-browser-use-api-key": "YOUR_API_KEY"
      }
    }
  }
}
```

## Windsurf

Add to `~/.codeium/windsurf/mcp_config.json`:

```json theme={null}
{
  "mcpServers": {
    "browser-use": {
      "serverUrl": "https://api.browser-use.com/v3/mcp",
      "headers": {
        "x-browser-use-api-key": "YOUR_API_KEY"
      }
    }
  }
}
```

## Available Tools

| Tool                    | Description                                                                                                               |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| `run_session`           | Create a session and run a task. Supports `keep_alive`, `model` (`bu-mini`, `bu-max`), `output_schema`, and `profile_id`. |
| `get_session`           | Poll session status and output. Returns status, step count, cost breakdown, and live URL.                                 |
| `send_task`             | Send a follow-up task to an idle keep-alive session.                                                                      |
| `stop_session`          | Stop a session. `strategy: "task"` stops only the task, `"session"` destroys the sandbox.                                 |
| `get_session_messages`  | Get the agent's messages — browser actions, reasoning, and results.                                                       |
| `list_sessions`         | List recent sessions with status and cost.                                                                                |
| `list_browser_profiles` | List browser profiles for authenticated tasks.                                                                            |
