BrowserStack App Automate with the MCP server
Use natural language prompts in your AI assistant to run automated app tests, take verification screenshots, and list sessions on real devices with the BrowserStack MCP server.
Use the BrowserStack MCP server to run automated app tests, take verification screenshots, and list sessions in App Automate directly from your AI assistant, such as GitHub Copilot, Claude, Cursor, or ChatGPT.
To set up the server, see get started with the BrowserStack MCP server.
To use App Automate tools on the MCP server, you need an App Automate license. Contact BrowserStack support to enable a license for your account.
Workflows and tools
Your assistant picks the right tool for each request. You don’t need to name a tool in your prompt. Describe the outcome, and the assistant picks the tool. The MCP server logs every tool call, so you can confirm which tool a prompt used.
The MCP server can set up the BrowserStack SDK automatically for Appium. Pre-built Espresso and XCUITest suites run directly, without the SDK. For the full list of devices, see BrowserStack App Automate supported devices and browsers.
Test runs
| Workflow | What it does | Tool |
|---|---|---|
| Run Espresso or XCUITest suites | Uploads your app and a pre-built Espresso (Android) or XCUITest (iOS) test suite, and runs it on real devices in the cloud. This is the primary tool for running native test suites. Not for Appium or SDK setups. | runAppTestsOnBrowserStack |
| Set up and run Appium tests | Integrates the BrowserStack SDK into your Appium project in any supported language and runs it on real devices, with optional Percy visual testing. Not for Espresso or XCUITest bundles. | setupBrowserStackAppAutomateTests |
| Verify an app launch | Launches your app on a chosen device and captures a screenshot to confirm it started successfully. | takeAppScreenshot |
Builds and sessions
| Workflow | What it does | Tool |
|---|---|---|
| List sessions in a build | Returns the sessions in an Automate or App Automate build, with each session’s status, OS, browser or device, and dashboard and video links. The session IDs it returns work with getFailureLogs, fetchAutomationScreenshots, and fetchSelfHealedSelectors. |
listSessions |
| List tests in a build | Returns the tests in a build with each test’s status. Filter by status, for example, failed. | listTestIds |
Debugging
| Workflow | What it does | Tool |
|---|---|---|
| Run tests and debug failures | Runs your test suite, finds the failed tests in the build, and fetches AI root cause analysis with suggested code fixes. Fixes are suggestions only and are never applied automatically. |
runAppTestsOnBrowserStackgetBuildIdlistTestIdsfetchRCA
|
Use Appium MCP or WebdriverIO MCP with BrowserStack
You can also explore your app on BrowserStack real devices with an open-source MCP server that you install yourself, such as Appium MCP or WebdriverIO MCP. These servers aren’t part of the BrowserStack MCP server. They connect straight to the BrowserStack hub, which starts each session on a real Android or iOS device. Your AI assistant then opens your app and tests it step by step, from natural language prompts.
To connect, you need your BrowserStack username and access key from your account profile.
Supported MCP servers
The following table lists the MCP servers that you can use with BrowserStack real devices:
| MCP server | Use it to | Works with |
|---|---|---|
| Appium MCP | Explore an app or a mobile website step by step. | Android and iOS apps, Chrome on Android, and Safari on iOS |
| WebdriverIO MCP | Explore an app step by step. | Android and iOS apps |
Maestro MCP and mobile-mcp aren’t supported. To test a website on desktop browsers with Playwright MCP, see Use Playwright MCP with BrowserStack.
Upload your app
To test an app, upload it to App Automate first. You get an app ID that starts with bs://, which your AI assistant uses to install the app. You can ask your AI assistant to upload the app for you. For other upload methods and app management options, see Upload and manage apps.
Set up Appium MCP
Install Appium MCP
Follow the Appium MCP setup guide.
Save your BrowserStack credentials in a file
Create a file, for example browserstack.json, with your username and access key. Your AI assistant then never sees your credentials. The idleTimeout setting keeps each session open for up to 5 minutes while your AI assistant decides its next step.
Point Appium MCP to the file
In the MCP server settings, set CAPABILITIES_CONFIG to the path of the file, for example /Users/you/browserstack.json. Appium MCP then adds your credentials to every session.
Tell your AI assistant to use BrowserStack
Add the following line to your AI assistant’s rules file, such as CLAUDE.md, AGENTS.md, or .github/copilot-instructions.md:
The remoteServerUrl address sends each session to BrowserStack instead of your own computer. The instruction to not pass bstack:options stops your AI assistant from sending its own settings, which would replace your saved credentials.
Set up WebdriverIO MCP
Install WebdriverIO MCP
Follow the WebdriverIO MCP setup guide.
Add your BrowserStack credentials
In the MCP server settings, set BROWSERSTACK_USERNAME to your username and BROWSERSTACK_ACCESS_KEY to your access key. WebdriverIO MCP has a built-in BrowserStack option that uses these credentials.
Example prompts
Try the following prompts after you set up Appium MCP or WebdriverIO MCP:
| Example prompt | What your AI assistant does |
|---|---|
| Open bs://YOUR_APP_ID on a Samsung Galaxy S23 with Android 13. Walk through sign-up and take a screenshot after each step. | Starts a session on a real device, taps and types through the flow, and returns a screenshot of each screen. |
| Open example.com in Safari on an iPhone 15 and check that the menu opens. | Opens the page on a real iPhone, taps the menu, and returns a screenshot. |
View each session, with its video, on your App Automate dashboard.
Sessions and parallels
- Each open session uses one parallel from your plan. When all your parallels are busy, new sessions wait in a queue.
- A session closes after 90 seconds with no command. The
idleTimeoutsetting in the Appium MCP credentials file raises this to 300 seconds.
Related topics
For more help, see the following pages:
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
Thank you for your valuable feedback!