Skip to main content
🚀 See how 20+ AI Agents can make your QA faster and smarter. Join 10k+ QAs at global leadership summit! Register Now
No Result Found
Connect & Get help from fellow developers on our Discord community. Ask the CommunityAsk the Community

Use AI Agents with BrowserStack MCP server

Use natural language prompts in your AI assistant to run various BrowserStack services through the MCP server.

Use the BrowserStack MCP server to leverage AI-powered testing tools directly from your coding assistant (such as GitHub Copilot, Claude, or Cursor). BrowserStack AI agents are intelligent automation tools that enhance your testing workflows through failure analysis, test case generation, self-healing capabilities, and visual testing automation.

To get started with BrowserStack MCP server, see the get started with BrowserStack MCP documentation.

To use AI agents, you need to activate your AI preferences in your BrowserStack account. For more information, see the activate BrowserStack AI documentation.

Enhance testing workflows with AI agents

Use the following AI agents to automate and optimize your testing processes through natural language prompts. Each agent can be invoked with simple, natural language prompts in your coding assistant:

Test Failure Analysis Agent (previously RCA Agent)

Automatically analyze test failures and provide detailed insights to help you quickly identify and resolve issues. Works for Automate, App Automate, Test Reporting and Analytics, and will soon be enabled for Test Management.

Example prompt: Fetch and fix flaky test selectors in Automate session ID session_9482 using MCP

Self-healing agent

Automatically fix flaky tests by retrieving AI-generated selectors that adapt to dynamic DOM changes. Available for both Automate and App Automate to maintain stable test automation scripts over time.

Example prompt: Fetch and fix flaky test selectors in Automate session ID session_9482 using MCP

Test case generator agent (TM)

Generate comprehensive test cases from Product Requirement Documents (PRDs) or convert manual test cases into Low Code Automation (LCA) steps for teams adopting low-code frameworks.

Example prompt: Convert the manual test case ‘Add to Cart’ in the ‘Shopping App’ project into LCA steps

Visual review agent

Shows a single summary of all visual changes between the latest Percy build and the previous one. It collates the per‑snapshot AI summaries. Use it after a Percy scan, to quickly see what changed.

Example prompt: Fetch visual change summary for the latest Percy build in shop-web.

Visual test integration agent

Full onboarding for new Percy users with complete setup and demo workflows

Example prompt: Integrate Percy in project shop-web and show a two-build visual diff demo

Tool reference

Use these AI agent tools to automate testing processes, analyze failures, generate test cases, and implement self-healing test automation through simple natural language prompts.

Example prompt Description Input parameters Invoked tool
Fetch and fix flaky test selectors in Automate session ID session_9482 using MCP Retrieves AI-generated, self-healed selectors for a BrowserStack Automate session to resolve flaky tests caused by dynamic DOM changes. This helps maintain stable test automation scripts over time. • Session ID (required)
• Product type (optional)
fetchSelfHealedSelectors
Convert the manual test case ‘Add to Cart’ in the ‘Shopping App’ project into LCA steps Creates Low Code Automation (LCA) steps from a manual test case in Test Management. Useful for teams adopting low-code frameworks. • Test case name (required)
• Project name (required)
• Test case ID (optional)
createLCASteps
Upload PRD from /Users/username/Desktop/login-flow.pdf and use BrowserStack AI to generate test cases Uploads a Product Requirement Document (PRD) or any relevant file like PDF or a screenshot and returns a file mapping ID. After this tool has uploaded the file, createTestCasesFromFile tool is invoked by MCP server to create the test cases. Both these tools work in sync. The file mapping ID generated above can then be used by the AI test case generator to automatically create test cases. • File path (required)
• File type (optional)
• Project context (optional)
uploadProductRequirementFile
“Integrate Percy for this project using percyVisualTestIntegrationAgent”

“Integrate Percy in project shop-web and show a two-build visual diff demo”
Full onboarding for new Percy users. Detects tech stack, installs SDK and deps, adds snapshots, runs Build 1, simulates a safe UI change, runs Build 2, shows diffs, then reverts the demo changes. Works on a separate branch; offers to expand coverage after. • Project name (optional)
• Project path (optional)
• Branch name (optional)
• Tech stack (auto-detected)
percyVisualTestIntegrationAgent
Fetch visual change summary for the latest Percy build in shop-web. Shows a summary of all visual changes between the latest Percy build and the previous one.

Returns: AI-generated summary of changes, per-snapshot diffs.
• projectName (required): Project name fetchPercyChanges

Example: Using MCP server with AI agents using Github Copilot agent on VS Code

Screenshot showing a GitHub Copilot prompt in VS Code that asks the BrowserStack MCP server to run automated tests using an AI agent, with the resulting tool call and output displayed in the editor

Need help?

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

Is this page helping you?

Yes
No

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!

Talk to an Expert
Download Copy Check Circle