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

# Agent Setup

> Configure BAP MCP server for Claude Code, Codex CLI, Cursor, Claude Desktop, and other AI agents.

# Agent Setup

Per-agent configuration instructions for connecting BAP to your AI coding agent.

## Claude Code

```bash theme={null}
claude mcp add --transport stdio bap-browser -- npx -y @browseragentprotocol/mcp
```

With slim mode (recommended):

```bash theme={null}
claude mcp add --transport stdio bap-browser -- npx -y @browseragentprotocol/mcp --slim
```

<Tip>
  BAP is also available as a Claude Code plugin. Install with `claude plugin add bap` for automatic
  setup.
</Tip>

## Codex CLI

```bash theme={null}
codex mcp add bap-browser -- npx -y @browseragentprotocol/mcp
```

## Codex Desktop

Add to `~/.codex/config.toml`:

```toml theme={null}
[mcp_servers.bap-browser]
command = "npx"
args = ["-y", "@browseragentprotocol/mcp"]
```

## Claude Desktop

Add to `claude_desktop_config.json`:

```json theme={null}
{
  "mcpServers": {
    "bap-browser": {
      "command": "npx",
      "args": ["-y", "@browseragentprotocol/mcp"]
    }
  }
}
```

<Note>
  On native Windows (not WSL), wrap the command with `cmd /c`:

  ```json theme={null}
  {
    "mcpServers": {
      "bap-browser": {
        "command": "cmd",
        "args": ["/c", "npx", "-y", "@browseragentprotocol/mcp"]
      }
    }
  }
  ```
</Note>

## Cursor

Add to your Cursor MCP settings (`.cursor/mcp.json` in your project or global config):

```json theme={null}
{
  "mcpServers": {
    "bap-browser": {
      "command": "npx",
      "args": ["-y", "@browseragentprotocol/mcp"]
    }
  }
}
```

## Windsurf

Add to your Windsurf MCP configuration:

```json theme={null}
{
  "mcpServers": {
    "bap-browser": {
      "command": "npx",
      "args": ["-y", "@browseragentprotocol/mcp"]
    }
  }
}
```

## GitHub Copilot

Add to your VS Code `settings.json`:

```json theme={null}
{
  "github.copilot.chat.mcpServers": {
    "bap-browser": {
      "command": "npx",
      "args": ["-y", "@browseragentprotocol/mcp"]
    }
  }
}
```

## Gemini CLI

```bash theme={null}
gemini mcp add bap-browser -- npx -y @browseragentprotocol/mcp
```

## Generic MCP Client

Any MCP-compatible client can connect to BAP. The server uses stdio transport:

* **Command**: `npx`
* **Args**: `["-y", "@browseragentprotocol/mcp"]`
* **Transport**: stdio

### Common Flags

Add these to the args array as needed:

| Flag        | Args addition                                   | Effect                  |
| ----------- | ----------------------------------------------- | ----------------------- |
| Slim mode   | `"--slim"`                                      | 5 essential tools only  |
| In-process  | `"--in-process"`                                | No child process        |
| Headful     | `"--no-headless"`                               | Show browser window     |
| Firefox     | `"--browser", "firefox"`                        | Use Firefox             |
| Domain lock | `"--allowed-domains", "example.com,*.test.com"` | Restrict navigation     |
| Verbose     | `"--verbose"`                                   | Debug logging to stderr |

Example with multiple flags:

```json theme={null}
{
  "mcpServers": {
    "bap-browser": {
      "command": "npx",
      "args": ["-y", "@browseragentprotocol/mcp", "--slim", "--no-headless"]
    }
  }
}
```

## CLI Skill Installation

For CLI-based agents that do not use MCP, install the BAP skill file instead:

```bash theme={null}
npx @browseragentprotocol/cli install-skill
```

This auto-detects installed agents and copies the appropriate skill file. Supports 13 platforms including Claude Code, Codex CLI, Gemini CLI, Cursor, GitHub Copilot, Windsurf, Roo Code, Amp, and more.

```bash theme={null}
# Preview without installing
npx @browseragentprotocol/cli install-skill --dry-run
```
