Run web automation tests in BrowserStack Automate with the MCP server
Use natural language prompts in your AI assistant to instantly set up BrowserStack SDK, run web automation tests, and fetch screenshots from Automate sessions on real browsers and devices.
Use the BrowserStack MCP server to set up the BrowserStack SDK, run web automation tests, and fetch screenshots from Automate sessions directly from your coding assistant (such as GitHub Copilot, Claude, or Cursor). Skip manual configuration and dashboards—start your web tests or retrieve screenshots with simple prompts.
To use Automate tools on the MCP server, you need an Automate license. Contact BrowserStack support to enable a license for your account.
Streamline web automation testing from your IDE
Use the following tools to set up the BrowserStack SDK, run web automation tests, and fetch screenshots from BrowserStack Automate sessions, all through natural language prompts:
1. Run web automation tests (setupBrowserStackAutomateTests)
Use the setupBrowserStackAutomateTests tool to integrate the BrowserStack SDK and run your web automation tests on real browsers in the cloud. This is the primary tool for executing your test suites with support for various frameworks and programming languages.
Example: Using MCP server with Automate using GitHub Copilot agent on VS Code

2. Fetch screenshots (fetchAutomationScreenshots)
Use the fetchAutomationScreenshots tool to retrieve screenshots from your Automate test sessions. This tool helps you access and analyze visual test results from your automation runs.
Tool reference
Use the setupBrowserStackAutomateTests tool to integrate the BrowserStack SDK and run web tests, and the fetchAutomationScreenshots tool to fetch screenshots from Automate/App Automate sessions.
For a complete list of supported browsers & mobile devices, refer to the BrowserStack Automate supported devices & browsers page.
| Example Prompt | Description | Input Parameters | Invoked Tool |
|---|---|---|---|
| Run my Selenium-JUnit5 tests written in Java on Chrome and Firefox. Enable Percy for visual testing. | Integrates BrowserStack SDK and runs web tests on BrowserStack with optional visual testing support. | • automationFramework: Automation framework (e.g., selenium) • testingFramework: Testing framework (e.g., junit5) • programmingLanguage: Programming language (e.g., java) • targetPlatforms: Browser/OS combinations • enablePercy: Enable visual testing (defaults to false) |
setupBrowserStackAutomateTests |
| Run Playwright tests with WebdriverIO on Safari and Edge browsers. Tests are written in NodeJS. | Executes browser-based automated tests on specified platforms using the chosen framework and language. | • automationFramework: Automation framework (e.g., playwright) • testingFramework: Testing framework (e.g., webdriverio) • programmingLanguage: Programming language (e.g., nodejs) • targetPlatforms: Browser/OS combinations • enablePercy: Enable visual testing (defaults to false) |
setupBrowserStackAutomateTests |
Get screenshots from Automate session ID abc123xyz for my desktop test run |
Fetches screenshots captured during a given Automate session. | • sessionId: Unique identifier for the test session | fetchAutomationScreenshots |
Need help?
- FAQs for common questions.
- Troubleshoot for common issues.
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!