DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
browser automation

How to Set Up BrowserStack’s MCP Server for Browser Automation

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To use BrowserStack for browser automation through an AI assistant, connect its MCP server to a supported client, provide your BrowserStack Username and Access Key for a local setup (or approve OAuth for the documented VS Code remote setup), and confirm the server is enabled. Choose the local server when you want a process on your machine; choose the hosted server when you prefer a remote endpoint and no local installation. Local setup requires Node.js v22 or newer.

What BrowserStack MCP does—and what it does not do

BrowserStack MCP connects an AI-enabled client to BrowserStack tools. For browser automation, those tools can help configure the BrowserStack SDK, run tests on selected platforms and frameworks such as Playwright, and retrieve screenshots from Automate or App Automate sessions. Running those Automate workflows requires an Automate license.

MCP is the connection between the assistant and BrowserStack; it is not itself a test plan or proof that an application passed. Tell the assistant what action to take, review the configuration and test scope it proposes, and inspect the resulting test output. BrowserStack says tool calls depend on the MCP client and the language model, so they can be nondeterministic.

Choose local or remote MCP

BrowserStack documents two ways to connect: run the npm server locally, or connect to the hosted endpoint at https://mcp.browserstack.com/mcp. The right choice depends on whether you want local process control or a hosted connection.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Decision Local server Remote server
Installation Runs the @browserstack/mcp-server package through Node.js; Node.js v22 or newer is required. No local package installation; connect to BrowserStack’s hosted MCP URL.
Credentials BrowserStack recommends the BROWSERSTACK_USERNAME and BROWSERSTACK_ACCESS_KEY environment variables. A client configuration can pass them to the local process. For the documented VS Code setup, start the HTTP server and approve OAuth.
Control and scope BrowserStack documents global and project-specific installation/configuration. The process is local to your development setup. Uses BrowserStack’s hosted endpoint; local process installation is not needed.
Network considerations Your client must be able to run Node.js and reach BrowserStack. Your client must be able to reach the hosted endpoint and complete OAuth.

Use local MCP if you need to control the process on your machine or want a project-scoped configuration alongside your code. Use remote MCP if you prefer a hosted endpoint and OAuth flow. BrowserStack describes its local server as a “secure local gateway” connecting AI-enabled clients directly to its real-device cloud; that describes the local connection model, not a guarantee that every prompt or test result is secure or correct.

Prerequisites

  • A BrowserStack account, Username, and Access Key. Keep the Access Key private.
  • An AI-enabled MCP client. BrowserStack documents setup guidance for VS Code, Cursor, Cline, and Claude Desktop; the remote server uses Streamable HTTP clients.
  • For local installation, Node.js v22 or newer. Check the version available to your client with node --version.
  • An Automate license if you intend to use BrowserStack Automate test tools.

Do not paste credentials into prompts or commit them to a shared repository. BrowserStack recommends environment variables for local credentials; placing secrets directly in a configuration file stores them in plain text. If a project-scoped file is shared, make sure it contains no real credentials.

Set up the local BrowserStack MCP server

1. Add a stdio server configuration

For clients that accept a stdio MCP configuration, use this JSON structure. Replace the two values with your BrowserStack Username and Access Key. The npx command downloads and runs the current package version when the client starts the server.

{
  "mcpServers": {
    "browserstack": {
      "command": "npx",
      "args": ["-y", "@browserstack/mcp-server@latest"],
      "env": {
        "BROWSERSTACK_USERNAME": "YOUR_USERNAME",
        "BROWSERSTACK_ACCESS_KEY": "YOUR_ACCESS_KEY"
      }
    }
  }
}

The configuration above is the common local-server shape; the filename and scope depend on your client. If you use environment variables outside the client configuration, ensure the client process can actually see them. A terminal’s environment is not automatically inherited by an application launched another way.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

2. Put the configuration in the right client location

Client Configuration location or action Start and verify
VS Code with GitHub Copilot or Cline For project scope, use .vscode/mcp.json. VS Code can also install the NPM package from its MCP tools interface. Start the server from the MCP configuration. Check the MCP tools interface to confirm it is running.
Cursor Use a user-level .cursor/mcp.json for global scope, or a project-level .cursor/mcp.json for that project. Save the configuration and credentials, then check Cursor’s MCP toggle/status.
Cline Use cline_mcp_settings.json. Save the file; BrowserStack says Cline starts the server after it is saved. Confirm its status in the client.
Claude Desktop Use the user-level claude_desktop_config.json with the local npx command and environment variables. Restart Claude Desktop or start the MCP integration, then confirm the server is available.

For VS Code or Cursor, a project-level file keeps the connection configuration with that project; a user-level Cursor file applies globally. Follow the client’s own instructions for creating its configuration file. If you use NVM and the client cannot find Node.js, BrowserStack points users to an NVM configuration guide; make sure the application starts with the intended Node.js version rather than assuming it uses the same environment as your terminal.

3. Keep local credentials out of shared project files

The sample JSON places credentials in the client’s env section to show what the process needs. That is convenient for a private local configuration, but values saved in plain text can be exposed if the file is committed, synced, or shared. Prefer a secret-management method that the client can read as environment variables. If you use a project-scoped file, keep secrets outside version control and check the exact file before committing.

Connect to the hosted remote server

Remote MCP avoids installing the local npm package. BrowserStack’s documented VS Code configuration uses an HTTP MCP server with the identifier browserstack and its hosted URL:

{
  "servers": {
    "browserstack": {
      "url": "https://mcp.browserstack.com/mcp"
    }
  }
}
  1. Add the HTTP server configuration to VS Code’s MCP setup. For a project configuration, BrowserStack shows the file path .vscode/mcp.json.
  2. Start the BrowserStack server from the client’s MCP controls.
  3. Approve the OAuth flow when prompted.
  4. Check that the server is enabled before asking the assistant to use it.

This remote example is specifically the documented VS Code flow. BrowserStack’s repository describes the hosted server as stateless over Streamable HTTP and lists support for Streamable-HTTP clients including Claude, Cursor, VS Code, and ChatGPT. Client setup screens and authorization flows can differ; do not assume the VS Code JSON format is the format for every client.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Run a first low-risk automation task

  1. Start the configured server using the client’s MCP controls.
  2. Confirm the BrowserStack server is shown as enabled or connected. If it is missing or stopped, fix the connection before asking for a test.
  3. Ask: “List the BrowserStack MCP tools available in this session and confirm which account is connected.” Verify the response against the client’s enabled server and your account.
  4. Begin with a narrow action, such as generating a BrowserStack SDK configuration or running a small smoke test on a selected platform.
  5. Review generated configuration, target platform, framework, and test output before using the result as a release decision.

For Automate, BrowserStack documents tools including setupBrowserStackAutomateTests and fetchAutomationScreenshots. The former can help integrate the SDK and execute tests on selected platforms and frameworks, including Playwright; the latter retrieves screenshots from Automate or App Automate sessions. These workflows require an Automate license. A prompt should identify the test file or scope, framework, and intended platform rather than asking vaguely to “test everything.”

Choose a client for the job

BrowserStack recommends GitHub Copilot or Cursor for automated testing and debugging, and Claude Desktop for manual Live testing. Treat that as BrowserStack’s guidance, not a guarantee that a particular client will produce a correct test or support every tool in the same way.

The BrowserStack MCP server is under active development and supports a subset of the MCP specification, according to its repository. Tool behavior can also vary with the MCP client and LLM. Confirm the client displays the server as enabled, inspect the tool call and its output, and rerun or validate important tests through your normal test workflow rather than treating one assistant response as conclusive.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot common setup failures

The local server will not start

  • Check Node.js: Local use requires Node.js v22 or newer. Run node --version in the environment available to the client. If you use NVM, check that the client can see the selected version.
  • Check the command and package name: The documented command is npx -y @browserstack/mcp-server@latest. Make sure the JSON uses the correct spelling and valid commas and quotation marks.
  • Check the client’s expected format: Local stdio configuration uses a mcpServers object in the documented sample. A server that is valid for another client or transport may not work if pasted into the wrong configuration location.

The server starts but BrowserStack tools fail

  • Recheck credentials: Confirm the Username and Access Key are correct and that the client process receives both BROWSERSTACK_USERNAME and BROWSERSTACK_ACCESS_KEY. A value set in a different terminal session may not reach the client.
  • Check account access: BrowserStack account credentials are required, and Automate actions require an Automate license. A working MCP connection does not by itself grant an Automate entitlement.
  • Review the requested tool and scope: Ask the assistant to list available tools, then request one clearly scoped action. The server supports only a subset of MCP, and tool availability can depend on the client.

The remote connection does not authenticate

  • Confirm the endpoint is exactly https://mcp.browserstack.com/mcp and that the server is configured as HTTP in a client that supports Streamable HTTP.
  • Start the server from the client and complete the OAuth approval prompt. Adding only the URL does not complete authorization.
  • If your network or organization blocks access to the hosted endpoint or authorization flow, check with the network administrator; the local and remote methods have different network and credential paths.

The assistant gives inconsistent results

BrowserStack warns that LLM-driven tool invocations can be nondeterministic. Narrow the prompt, verify the selected framework and platform, inspect returned output or screenshots, and repeat or validate critical work through the test workflow you trust. Do not interpret a successful connection as proof that a test passed.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Or skip the browser setup

BrowserStack MCP is for connecting an AI assistant to BrowserStack’s real-device and automation workflows. If your immediate need is to capture a clean image or PDF of a webpage by URL—not to run a BrowserStack device test—ScreenshotNeo is a screenshot API and MCP server to try. Its API can return PNG, JPEG, WebP, or PDF; it accepts consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture. Each cleanup step can be disabled. Bot checks/CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the page verdict and billing status in headers.

Here is a one-request example; replace the URL with the page you need to capture. See the ScreenshotNeo API documentation for parameters and response details.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

The same request in Python:

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)

Or in Node.js:

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

ScreenshotNeo also has an MCP server for AI agents, with take_screenshot, get_page_info, and capture_pdf tools. It is not a substitute for BrowserStack Automate when you need real-device test execution. ScreenshotNeo’s Free plan includes 1,000 shots per month without a card; paid plans start at $5 for 3,000 shots.

Sign up for ScreenshotNeo free: get 1,000 screenshots a month with no card required.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

FAQ

Does connecting BrowserStack MCP mean my Playwright suite is running continuously?

No. MCP gives an AI client access to tools for requested tasks; it does not establish that a continuous test run or CI integration has been configured.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Read next

Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.