# Applitools MCP for AI Agents MCP

> Applitools brings AI-powered visual testing directly to your workflow. It lets your agent manage entire visual regression pipelines—checking test batches, reviewing UI differences, and handling baselines—all from your preferred client without opening a dashboard.

## Overview
- **Category:** ship-it
- **Price:** Free
- **Tags:** visual-testing, regression-testing, ui-validation, automated-testing, quality-assurance, batch-processing

## Description

Need to validate frontend changes visually without logging into the Applitools console? This MCP connects your AI agent directly to your entire visual testing suite. You can ask it to analyze active test batches for aggregated status updates or drill down into specific sessions to spot failed images and browser discrepancies. It's built to handle complex tasks like listing 'golden' graphical baselines, checking branch-specific states, or even deleting outdated records to keep your workspace clean. Because Vinkius hosts this MCP, you connect once from any compatible client, giving your agent access to all these visual validation tools in one place. Your AI agent handles the heavy lifting, letting you validate changes and assess testing health dynamically right where you're working.

## Tools

### list_baselines
Lists the IDs and names of visual baselines for a specific application.

### get_batch_stats
Provides summary counts (passed, failed, unresolved) for an entire Applitools test batch.

### list_batches
Lists all active test batches and their current statuses like Passed or Failed.

### list_branch_baselines
Retrieves visual baselines tied to a specific Git branch name.

### delete_baseline
Removes an Applitools test baseline when it becomes outdated or irrelevant.

### delete_batch
Permanently removes an entire Applitools test batch; use this only if you know it's safe to delete.

### get_batch
Retrieves full, granular details for a specific Applitools batch ID.

### list_results
Lists all individual test results contained within a specified Applitools batch.

### get_session
Gets deep details about one particular test session by providing the necessary batch and session IDs.

### validate_key
Checks your Applitools API key to confirm connectivity before running any visual tests.

## Prompt Examples

**Prompt:** 
```
List the most recent failed test batches and give me a summary of the failures.
```

**Response:** 
```
**Visual Test Batch Summary**

The following 3 batches were recently processed:

*   `V2 Checkout Redesign` (ID: `b_991x`) - **Unresolved**. Status shows 4 failed sessions out of 10 total.
*   `Login Dropdown Fix` (ID: `b_773z`) - **Failed**. Contains 2 critical failures across Safari/iOS.
*   `Marketing Footer` (ID: `b_882y`) - Passed. Looks clean.

I recommend we focus on the unresolved issues in the Checkout Redesign batch.
```

**Prompt:** 
```
What are all the baselines set up for the 'feature/dark-mode' branch?
```

**Response:** 
```
**Baselines for `feature/dark-mode`**

I found 2 active baselines tied to this branch:

1.  **ID:** `bs_4ab` (Name: Nav Bar Base) - Created 3 days ago.
2.  **ID:** `bs_5cd` (Name: Mobile Hamburger Dark) - Created 3 days ago.

These look like they haven't been updated recently. Should I delete them if you confirm the feature is stable?
```

**Prompt:** 
```
Can you check the full details for batch b_991x?
```

**Response:** 
```
**Details: V2 Checkout Redesign (ID: b_991x)**

*   **Status:** Unresolved
*   **Total Sessions:** 10
*   **Failures Detected:** 4 sessions.
*   **Primary Issue Area:** 'Payment Modal' step.
*   **Mismatch Details:** Applitools AI flagged a significant 12% pixel drift in button alignment when comparing Chrome 114 (Win) vs Safari 16 (iOS).
```

## Capabilities

### Get status summaries for test batches
Retrieves quick counts of passed, failed, or unresolved sessions across an entire Applitools batch.

### Analyze detailed session failures
Drills down into specific test sessions to identify pixel drift and browser-specific differences between runs.

### Manage visual baselines by branch
Lists or deletes graphical baselines tied specifically to a Git branch, ensuring you only check the correct version history.

### List all configured baselines
Retrieves IDs and names of all existing visual baselines for an application.

### Inspect full test batch details
Gathers all information about a given test batch, including its overall status and associated sessions.

### Validate API connectivity
Runs a quick check to confirm the Applitools API key is working before triggering any tests.

## Use Cases

### Investigating an unstable release candidate
The QA Engineer notices test failures across multiple browsers. They ask the agent to list all recent batches, identify the failing ones using `list_batches`, and then dive into specific sessions via `get_session` to understand if it's a cross-browser alignment issue.

### PR review for design changes
The Frontend Developer commits code related to a new header component. Before merging, they ask the agent to list baselines specific to their feature branch using `list_branch_baselines` and confirm that no unintended visual regressions were introduced.

### Cleaning up test environments
The Engineering Manager realizes old testing data is cluttering the system. They ask the agent to list all baselines via `list_baselines`, identify outdated entries, and authorize their deletion using `delete_baseline`.

### Determining overall test readiness
The team needs a quick health check for the entire application. They ask the agent to get summary statistics (`get_batch_stats`) for the latest main branch batch, confirming that all critical paths have passed.

## Benefits

- Check test batch health instantly. Instead of navigating dashboards, ask your agent to use `get_batch_stats` for immediate passed/failed counts.
- Pinpoint visual bugs exactly. Use `list_results` or `get_session` to inspect specific failed step images and browser differences.
- Keep baselines clean. Easily manage outdated assets by running `delete_baseline` or deleting old batches with `delete_batch` when they're no longer needed.
- Target branch validation. Use `list_branch_baselines` to confirm the visual state of a feature branch without polluting your main baseline set.
- Verify connectivity upfront. Run `validate_key` first; it confirms your API key works before you waste time on actual testing cycles.

## How It Works

The bottom line is that your agent treats Applitools like a native tool, allowing it to read and write data directly from the testing platform via natural conversation.

1. Subscribe to this MCP and provide your Applitools API Key.
2. Your AI agent uses the connection to query test batches for summary statistics or detailed session failures.
3. You get actionable reports showing exactly where UI changes occurred, letting you validate frontend code without context switching.

## Frequently Asked Questions

**How does the Applitools MCP help me check visual bugs without opening the dashboard?**
You can ask your agent to run reports and analyze test results directly. The agent pulls failure data, shows you pixel drift percentages, and identifies the exact step where the UI deviated from the expected baseline.

**Can I use Applitools MCP to manage my different feature branches?**
Yes. You can ask the agent to list baselines tied specifically to a branch name (like 'feature/dark-mode'). This lets you validate that changes only affect their specific code path, keeping your main baseline clean.

**What if I need to delete an old test batch or baseline?**
The MCP gives you tools to manage clutter. You can list all baselines and then authorize the agent to delete outdated ones using `delete_baseline`, keeping your platform tidy.

**Does Applitools MCP only work on web browsers?**
No, it handles visual comparisons across multiple browser and OS combinations. It's designed to spot UI inconsistencies regardless of the underlying client environment you test against.

**How do I get a quick summary of my recent test run status?**
Instead of sifting through huge reports, ask your agent to get batch statistics. It instantly summarizes results for all active batches with simple counts of Passed, Failed, or Unresolved.

**What is the difference between listing baselines and getting branch baselines?**
Listing all baselines gives you a global view of every baseline. Listing branch baselines narrows that focus down, showing only the visual assets tied to one specific Git development branch.