BrowserStack MCP server

Integrates with BrowserStack's testing infrastructure to enable automated and manual testing across browsers, devices, and platforms for debugging cross-browser issues and verifying mobile app functionality.
Back to servers
Setup instructions
Provider
BrowserStack
Release date
May 03, 2025
Language
JavaScript
Stats
83 stars

The BrowserStack MCP Server allows you to manage test cases, execute tests, debug issues, and fix code directly within tools like Cursor, Claude, or any MCP-enabled client using natural language. This server connects BrowserStack's comprehensive test platform to your favorite AI tools, reducing context switching and enabling testing through plain English prompts.

Installation

Prerequisites

  • A BrowserStack account (sign up at BrowserStack if you don't have one)
  • Your BrowserStack username and access key from Account Settings
  • Node.js version 18.0 or higher (recommended: v22.15.0 LTS)

Setup Instructions

For VSCode (Copilot - Agent Mode)

Create a .vscode/mcp.json file with the following content:

{
  "servers": {
    "browserstack": {
      "command": "npx",
      "args": ["-y", "@browserstack/mcp-server@latest"],
      "env": {
        "BROWSERSTACK_USERNAME": "<username>",
        "BROWSERSTACK_ACCESS_KEY": "<access_key>"
      }
    }
  }
}

In VSCode, click the "Start" button in the MCP Server to start the server.

For Cursor

Create a .cursor/mcp.json file with the following content:

{
  "mcpServers": {
    "browserstack": {
      "command": "npx",
      "args": ["-y", "@browserstack/mcp-server@latest"],
      "env": {
        "BROWSERSTACK_USERNAME": "<username>",
        "BROWSERSTACK_ACCESS_KEY": "<access_key>"
      }
    }
  }
}

For Claude Desktop

Create a ~/claude_desktop_config.json file with the following content:

{
  "mcpServers": {
    "browserstack": {
      "command": "npx",
      "args": ["-y", "@browserstack/mcp-server@latest"],
      "env": {
        "BROWSERSTACK_USERNAME": "<username>",
        "BROWSERSTACK_ACCESS_KEY": "<access_key>"
      }
    }
  }
}

For Cline

Click the "MCP Servers" icon in the navigation bar, select the "Installed" tab, and click the "Configure MCP Servers" button. Then use the following configuration:

{
  "mcpServers": {
    "browserstack": {
      "command": "npx",
      "args": ["-y", "@browserstack/mcp-server@latest"],
      "env": {
        "BROWSERSTACK_USERNAME": "<username>",
        "BROWSERSTACK_ACCESS_KEY": "<access_key>"
      }
    }
  }
}

Installing via Smithery

For an automated installation with Claude Desktop:

npx -y @smithery/cli install @browserstack/mcp-server --client claude

Usage Examples

Manual App Testing

Test mobile apps on real devices across the latest OS versions:

# Open app on specific device
"open my app on a iPhone 15 Pro Max"

# Debug app crashes
"My app crashed on Android 14 device, can you help me debug?"

Manual Web Testing

Test websites on various browsers and devices:

# Test your websites
"open my website hosted on localhost:3001 on Edge"
"open browserstack.com on latest version of Chrome"

Automated Testing

Run, debug, and fix automated tests on BrowserStack:

# Port test suite to BrowserStack
"Setup test suite to run on BrowserStack infra"

# Run tests on BrowserStack
"Run my tests on BrowserStack"

# AI powered debugging of test failures
"My App Automate tests have failed, can you help me fix the new failures?"

Accessibility Testing

Identify and fix accessibility issues:

# Scan accessibility issues during development
"Scan & help fix accessibility issues for my website running locally on localhost:3000"

# Scan accessibility issues on production site
"Run accessibility scan & identify issues on my website - www.bstackdemo.com"

Test Management

Create and manage test cases:

# Create project & folder structure
"create new Test management project named My Demo Project with two sub folders - Login & Checkout"

# Add test cases
"add invalid login test case in Test Management project named My Demo Project"

# List added test cases 
"list high priority Login test cases from Test Management project - My Demo Project"

# Create test run
"create a test run for Login tests from Test Management project - My Demo Project"

# Update test results
"update test results as passed for Login tests test run from My Demo Project"

BrowserStack AI Agents

Generate and automate tests using BrowserStack's AI:

# Test case generator agent
"With Browserstack AI, create relevant test cases for my PRD located at /usr/file/location"

# Low code authoring agent
"With Browserstack AI, automate my manual test case X, added in Test Management"

# Self healing agent
"Help fix flaky tests in my test script with Browserstack AI self healing"

Recommended MCP Clients

  • For automated testing and debugging: GitHub Copilot or Cursor
  • For manual testing (Live Testing): Claude Desktop

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "browserstack" '{"command":"npx","args":["-y","@browserstack/mcp-server@latest"],"env":{"BROWSERSTACK_USERNAME":"<username>","BROWSERSTACK_ACCESS_KEY":"<access_key>"}}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "browserstack": {
            "command": "npx",
            "args": [
                "-y",
                "@browserstack/mcp-server@latest"
            ],
            "env": {
                "BROWSERSTACK_USERNAME": "<username>",
                "BROWSERSTACK_ACCESS_KEY": "<access_key>"
            }
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "browserstack": {
            "command": "npx",
            "args": [
                "-y",
                "@browserstack/mcp-server@latest"
            ],
            "env": {
                "BROWSERSTACK_USERNAME": "<username>",
                "BROWSERSTACK_ACCESS_KEY": "<access_key>"
            }
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later