Agent Setup
Per-agent configuration instructions for connecting BAP to your AI coding agent.
Claude Code
claude mcp add --transport stdio bap-browser -- npx -y @browseragentprotocol/mcp
With slim mode (recommended):
claude mcp add --transport stdio bap-browser -- npx -y @browseragentprotocol/mcp --slim
BAP is also available as a Claude Code plugin. Install with claude plugin add bap for automatic
setup.
Codex CLI
codex mcp add bap-browser -- npx -y @browseragentprotocol/mcp
Codex Desktop
Add to ~/.codex/config.toml:
[mcp_servers.bap-browser]
command = "npx"
args = ["-y", "@browseragentprotocol/mcp"]
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"bap-browser": {
"command": "npx",
"args": ["-y", "@browseragentprotocol/mcp"]
}
}
}
On native Windows (not WSL), wrap the command with cmd /c:{
"mcpServers": {
"bap-browser": {
"command": "cmd",
"args": ["/c", "npx", "-y", "@browseragentprotocol/mcp"]
}
}
}
Cursor
Add to your Cursor MCP settings (.cursor/mcp.json in your project or global config):
{
"mcpServers": {
"bap-browser": {
"command": "npx",
"args": ["-y", "@browseragentprotocol/mcp"]
}
}
}
Windsurf
Add to your Windsurf MCP configuration:
{
"mcpServers": {
"bap-browser": {
"command": "npx",
"args": ["-y", "@browseragentprotocol/mcp"]
}
}
}
GitHub Copilot
Add to your VS Code settings.json:
{
"github.copilot.chat.mcpServers": {
"bap-browser": {
"command": "npx",
"args": ["-y", "@browseragentprotocol/mcp"]
}
}
}
Gemini CLI
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:
{
"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:
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.
# Preview without installing
npx @browseragentprotocol/cli install-skill --dry-run