# BrowserStack MCP server

> Lets AI clients manage and run BrowserStack manual and automated tests, debug failures, and run accessibility scans from plain English prompts.

- Repository: https://github.com/browserstack/mcp-server
- Page: https://hostedmcp.org/servers/browserstack/mcp-server
- Transport: stdio, remote
- Stars: 153
- License: AGPL-3.0
- Latest version: 2.6.8

## Install

### Claude Code

```sh
claude mcp add --env 'BROWSERSTACK_ACCESS_KEY=<YOUR_BROWSERSTACK_ACCESS_KEY>' --env 'BROWSERSTACK_USERNAME=<BROWSERSTACK_USERNAME>' mcp-server -- npx -y @browserstack/mcp-server
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@browserstack/mcp-server"
      ],
      "env": {
        "BROWSERSTACK_ACCESS_KEY": "<YOUR_BROWSERSTACK_ACCESS_KEY>",
        "BROWSERSTACK_USERNAME": "<BROWSERSTACK_USERNAME>"
      }
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "mcp-server": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@browserstack/mcp-server"
      ],
      "env": {
        "BROWSERSTACK_ACCESS_KEY": "<YOUR_BROWSERSTACK_ACCESS_KEY>",
        "BROWSERSTACK_USERNAME": "<BROWSERSTACK_USERNAME>"
      }
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"mcp-server","type":"stdio","command":"npx","args":["-y","@browserstack/mcp-server"],"env":{"BROWSERSTACK_ACCESS_KEY":"<YOUR_BROWSERSTACK_ACCESS_KEY>","BROWSERSTACK_USERNAME":"<BROWSERSTACK_USERNAME>"}}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@browserstack/mcp-server"
      ],
      "env": {
        "BROWSERSTACK_ACCESS_KEY": "<YOUR_BROWSERSTACK_ACCESS_KEY>",
        "BROWSERSTACK_USERNAME": "<BROWSERSTACK_USERNAME>"
      }
    }
  }
}
```

### Codex

```sh
codex mcp add mcp-server --env 'BROWSERSTACK_ACCESS_KEY=<YOUR_BROWSERSTACK_ACCESS_KEY>' --env 'BROWSERSTACK_USERNAME=<BROWSERSTACK_USERNAME>' -- npx -y @browserstack/mcp-server
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.mcp-server]
command = "npx"
args = ["-y", "@browserstack/mcp-server"]

[mcp_servers.mcp-server.env]
BROWSERSTACK_ACCESS_KEY = "<YOUR_BROWSERSTACK_ACCESS_KEY>"
BROWSERSTACK_USERNAME = "<BROWSERSTACK_USERNAME>"
```

### Gemini CLI

```sh
gemini mcp add -s user -e 'BROWSERSTACK_ACCESS_KEY=<YOUR_BROWSERSTACK_ACCESS_KEY>' -e 'BROWSERSTACK_USERNAME=<BROWSERSTACK_USERNAME>' mcp-server npx -- -y @browserstack/mcp-server
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@browserstack/mcp-server"
      ],
      "env": {
        "BROWSERSTACK_ACCESS_KEY": "<YOUR_BROWSERSTACK_ACCESS_KEY>",
        "BROWSERSTACK_USERNAME": "<BROWSERSTACK_USERNAME>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `BROWSERSTACK_ACCESS_KEY` | yes | yes | BrowserStack Access Key |
| `BROWSERSTACK_USERNAME` | yes | no | BrowserStack Username |

## FAQ

### How do I authenticate the BrowserStack MCP server?

You need a BrowserStack account and your username and access_key from Account Settings; sign-in flows are also supported for hosted clients.

### What Node version does the BrowserStack MCP server require?

It requires Node version 22 or later, with v22.15.0 LTS recommended.

### Can I test websites hosted locally on my machine?

Yes, you can open and test sites running on localhost without deploying them to a remote server.

### Can the server run automated test suites like Playwright and Selenium?

Yes, it can set up and run Jest, Playwright, Selenium, and other suites on BrowserStack's Test Platform and help debug failures.

### Does the server apply code fixes automatically when debugging?

No, root cause analysis fixes are returned as proposals only and require your explicit approval before any file is edited.
