# BrowserStack MCP for AI Agents AI Agent Connect

> BrowserStack MCP lets you manage cross-browser testing projects and build statuses directly from your AI client. Stop switching tabs to check if your nightly regression passed or why a specific session timed out. It pulls logs, checks your plan's parallel session limits, and lists supported browser environments so you can keep your CI/CD pipelines moving without manual overhead.

## Overview
- **Category:** loved-by-devs
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_QfMSmaBJhbb00bXFG15oIucKmIgIGaxUOK4qcRpA/ai-agent-connect
- **Tags:** cross-browser-testing, automated-testing, ci-cd, test-automation, mobile-testing, qa-testing

## Description

Instead of digging through the BrowserStack dashboard every time a test fails, you can just ask your AI client for the status of your latest builds. This Connector puts your entire automation pipeline into a conversation. You can quickly see which projects are running, grab the raw Selenium or Appium logs from a failed session, and figure out exactly where the script tripped up. It handles the heavy lifting of fetching session details, including OS and browser stats, so you don't have to hunt for them in a complex UI. If you're worried about hitting your concurrency limits, you can check your plan's parallel session usage in seconds. It's a massive time saver for anyone who needs to keep their testing cycle moving. Vinkius makes it easy to plug this into your existing workflow, giving you a direct line to your testing infrastructure. You get the specific data you need, like supported browser combinations or build durations, exactly when you need them, without the context switching.

## Tools

### list_browsers
Lists all supported OS and browser combinations for configuring desired capabilities.

### list_builds
Lists recent builds with statuses, durations, and session counts for tracking suites.

### get_build
Retrieves session details, OS/browser combos, and logs for a specific automation build.

### get_session
Gets specific details for a session, including video URLs, logs, and failure reasons.

### get_session_logs
Fetches the text execution logs for a session to help debug failed test steps.

### get_plan
Shows your current plan details, including parallel session usage and queue length.

### delete_session
Deletes a specific BrowserStack session by its ID.

### delete_build
Deletes a specific BrowserStack build using its unique ID.

### list_projects
Lists all projects on BrowserStack Automate with their names, IDs, and build counts.

### get_project
Fetches full details for a project, including its group ID and recent builds.

## Prompt Examples

**Prompt:** 
```
List my recent automation builds and summarize their outcomes.
```

**Response:** 
```
**Recent Build Summary**

| Build Name | Status | Duration |
| :--- | :--- | :--- |
| Nightly Regression #120 | ✅ Passed | 14:02 |
| PR-Check #491 | ✅ Passed | 2:15 |
| Payment Flow E2E | ❌ Failed | 4:30 |
| Hotfix-Deploy-Prod | 🟡 Running | 1:12 |

Would you like me to dive into the 'Payment Flow E2E' build and fetch the failed session logs?
```

**Prompt:** 
```
Fetch the logs for the failed session in build e4da3b.
```

**Response:** 
```
I retrieved the session inside the build (Session ID: 7a912f). Here is the relevant snippet from the execution logs:

```text
[14:23:45] POST /session/7a912f/element - Request payload: {"using":"css selector","value":"#checkout-btn"}
[14:23:50] NoSuchElementError: no such element: Unable to locate element: {"method":"css selector","selector":"#checkout-btn"}
```

The test failed because the `#checkout-btn` element could not be found after 5 seconds of rendering.
```

**Prompt:** 
```
Check how many parallel sessions our current plan allows.
```

**Response:** 
```
According to your **Automate Enterprise** plan, your team is allowed **20 parallel sessions** globally.

*   **In Use:** 18
*   **Queued:** 0
*   **Available:** 2

You have room to start 2 more concurrent threads without throttling.
```

## Capabilities

### Track build statuses
See if your automation builds passed, failed, or are still running.

### Extract execution logs
Pull raw Selenium or Appium logs from failed sessions to debug errors.

### Monitor plan limits
Check your current parallel session usage and queue length.

### Inspect session details
Get specific OS, browser, and duration data for any test run.

### Manage projects
List and view details for all your BrowserStack automation projects.

### Browse environments
See all supported OS and browser combinations for your test scripts.

## Use Cases

### Debugging a flaky test
A QA engineer asks for the logs of build e4da3b. The agent uses get_build and get_session_logs to find a NoSuchElementError.

### Checking capacity
A DevOps lead asks how many more tests they can run. The agent uses get_plan to report 2 remaining parallel sessions.

### Updating scripts
A developer needs to know if a specific browser version is supported. The agent uses list_browsers to provide the correct payload.

### Build summary
A manager asks for the status of nightly tests. The agent uses list_builds to provide a summary of pass/fail counts.

## Benefits

- Debug faster by using get_session_logs to pull raw Selenium or Appium data into your chat.
- Stop guessing your capacity by using get_plan to see real-time parallel session usage.
- Save time on project organization by using list_projects to see your entire suite at a glance.
- Verify environment compatibility instantly with list_browsers before updating your scripts.
- Monitor your CI/CD pipeline more effectively using list_builds to track pass/fail rates.
- Clean up your workspace by using delete_build or delete_session to remove old test data.

## How It Works

The bottom line is you stop tab-hopping between your IDE and the BrowserStack dashboard.

1. Subscribe to the BrowserStack MCP on Vinkius.
2. Provide your BrowserStack username and access key in your AI client settings.
3. Ask your agent to list builds, fetch logs, or check your plan status.

## Frequently Asked Questions

**Can the BrowserStack MCP help me debug failed tests?**
Yes, it lets you pull the text execution logs of a failed session directly into your chat. You can see the exact error messages without leaving your IDE.

**How does this Connector help with my testing plan?**
It gives you instant visibility into your current plan, showing you how many parallel sessions you're using and how many are left in your queue.

**Can I see which browsers are supported with the BrowserStack MCP?**
Yes, you can ask your agent to list all supported OS and browser combinations to make sure your test scripts are configured correctly.

**Does this Connector work with Claude or Cursor?**
Yes, it works with any MCP-compatible client, including Claude, Cursor, and Windsurf.

**Can I manage my projects using this?**
You can list all your projects and get specific details about them, like group IDs and recent build history, using natural language.

**How do I find out why a test timed out?**
You can ask your agent to fetch the session details for a specific build. It will pull the OS, browser, duration, and any available logs to help you find the bottleneck.

**Can my AI automatically read the logs of a failed Selenium test?**
Yes. When you ask it to investigate a recently failed build, the agent can use `get_build` to find the failed session, and then automatically call `get_session_logs`. It will download the raw textual execution steps directly into the chat and summarize why the UI test failed.

**Is there a risk that my AI alters my testing scripts or repository code?**
No, this Connector integrates exclusively with BrowserStack Automate API. It can read statuses, logs, and configurations, and can delete hung sessions or builds, but it has no connection to your actual codebase or git repository.

**How can I resolve concurrent session limits preventing my pipeline from advancing?**
You can ask your agent to `get_plan` to inspect your parallel boundaries and verify if you are queuing. Then, the agent can look up stalled items via `list_builds` and execute `delete_session` or `delete_build` to manually unblock stuck processes.