BrowserStack Test Reporting and Analytics with the MCP server
Use natural language prompts in your AI assistant to fetch error logs from Automate and App Automate sessions with the BrowserStack MCP server.
Use the BrowserStack MCP server to retrieve error logs from your Automate and App Automate sessions directly from your AI assistant, such as GitHub Copilot, Claude, or Cursor. Skip the dashboard and get detailed failure logs for your test sessions with prompts.
To set up the server, see get started with the BrowserStack MCP server.
To use the Test Reporting and Analytics features with the MCP server, ensure your BrowserStack account has the necessary licenses for Test Reporting and Analytics. Contact BrowserStack support to enable a license for your account.
Streamline test reporting and analytics from your IDE
Use the following tools to streamline test reporting and analytics from your IDE, all through natural language prompts:
Retrieve error logs (getFailureLogs)
Use the getFailureLogs tool to retrieve various types of error logs from Automate and App Automate sessions. This tool helps you quickly access logs for debugging and reporting.
Example prompt: Get the error logs from the session ID: “sample_session_id”, Build ID: “sample_build_id” of App Automate Test session.
Find build ID (getBuildId)
Use the getBuildId tool to find the BrowserStack build ID from a project and build name. This is useful for connecting with insights or RCA tools.
Example prompt: Get the build ID for project Checkout Flow and build release-2025-11-01.
Fetch build insights (fetchBuildInsights)
Use the fetchBuildInsights tool to pull Test Reporting and Analytics insights for a build, including unique failures, always-failing tests, flakiness, automation stability, and Quality Gate results.
Example prompt: Fetch build insights for build ID ob_bld_8129 and summarize top risks.
Fetch RCA (fetchRCA)
Use the fetchRCA tool to get AI root cause analysis (RCA) for BrowserStack Automate or App Automate sessions, with suggested fixes. Copilot can apply these fixes to help debug failed tests faster.
Example prompt: Fetch RCA for Automate session sess_1a2b3c and generate a PR with the suggested fix.
Tool reference
The following tools are available for retrieving error logs and using Test Reporting and Analytics:
For a complete list of supported browsers and devices, see the Automate and App Automate supported device lists.
| Example prompt | Description | Input parameters | Invoked tool |
|---|---|---|---|
| Get the error logs from the session ID: “sample-session-id”, Build ID: “sample-build-id” of the App Automate test session. | Retrieves various types of error logs from Automate and App Automate sessions for debugging and reporting. | • Session ID • Session type (Automate or App Automate) • Build ID (for App Automate) |
getFailureLogs |
| Get the build ID for project Checkout Flow and build release-2025-11-01. | Finds the BrowserStack build ID from project and build name. Use this to connect with insights or RCA tools. | • Project name • Build name |
getBuildId |
| Fetch build insights for build ID ob_bld_8129 and summarize top risks. | Pulls Test Reporting and Analytics insights for a build: unique failures, always-failing tests, flakiness, automation stability, Quality Gate result, etc. | • Build ID | fetchBuildInsights |
| Fetch RCA for Automate session sess_1a2b3c and generate a PR with the suggested fix. | Gets AI root cause analysis (RCA) for BrowserStack Automate or App Automate sessions, with suggested fixes. Copilot can apply these fixes. | • Session ID • Session type (Automate or App Automate) |
fetchRCA |
| List failed test IDs for build auto_bld_6641. | Lists test IDs from a BrowserStack Automate build. You can filter by status (e.g., failed). | • Build ID • Status filter (optional) |
listTestIds |
The following example shows GitHub Copilot in VS Code calling the getFailureLogs tool:

Common workflows
The BrowserStack MCP server supports the following workflows for complex testing scenarios. Each workflow shows the sequence of tools and automated actions.
Ensure you have active licenses for all the BrowserStack products in your workflows, such as Percy, App Automate, and Automate, before running these prompts. Contact BrowserStack support to enable a license for your account.
Run tests and get build insights
Run tests and get a health summary of the build from BrowserStack Test Reporting and Analytics.
Tools invoked: runAppTestsOnBrowserStack, setupBrowserStackAutomateTests, setupBrowserStackAppAutomateTests, fetchBuildInsights, getBuildId, listTestIds
Example prompt:
“Get build ID for the
The MCP server performs the following actions:
-
Runs tests on BrowserStack.
-
Resolves build ID using
getBuildIdor from CI output. -
Fetches insights using
fetchBuildInsights. -
Shares risks and actions.
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!