Playwright E2E MCP logo

Playwright E2E MCP

Diagnoses Playwright failures, verifies locator fixes, audits pages, and ranks flaky tests through MCP tools.

Install Playwright E2E MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "playwright-e2e-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "playwright-e2e-mcp"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Install not yet sandbox-tested— the server itself is confirmed live (we called its tools/list endpoint). The stdio install command is a separate, ongoing check.

Overview

Playwright E2E MCP connects AI agents to a project's Playwright test suite and browser sessions for failure diagnosis, locator repair, accessibility checks, and visual comparisons. It can run tests in the foreground or background, inspect failure evidence, and record results for later history analysis. Browser-oriented tools accept authenticated state, headers, and actions for reaching specific page states. Reach for it when debugging broken end-to-end tests, checking selector reliability, investigating flakiness, or generating tests from recent application changes.

Use cases

  • Diagnose failed Playwright tests with trace, network, and console evidence
  • Repair drifted locators and verify the resulting patch
  • Rank flaky tests using repeated runs and local history
  • Audit authenticated pages for WCAG 2.2 AA violations
  • Generate end-to-end specs from recent application changes

Key features

  • Background test runs with progress and cancellation
  • Evidence-based failure and flakiness analysis
  • Verified locator discovery and repair
  • Authenticated page inspection and selector validation
  • Accessibility and visual regression checks
  • Local run-history pattern analysis

Tools12

What Playwright E2E MCP lets your agent do. Expand a tool for its parameters.

Verified live~5.0k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 3d ago

Recent health check succeeded.

6/6 checks healthy over the last 24d

What it can do

From the 12 tools this server returned when we ran it; 12 declare their own safety hints.

Can delete or modify data · 5Makes network requests · 8Read-only tools · 7
Network at startup3 connections
Files written at startupNone
Install scriptsprepare
npm provenanceSigned build
Package age16 days
Maintainers1

Observed 2026-10-22 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 8d ago via OSV.dev · playwright-e2e-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

npm downloads4.9kPackage downloads in the last 30 days.
Last commit17d agoMost recent push to the default branch.
Tools exposed12Callable tools this server registers over MCP.
Directory activity5 viewsConfig copies, upvotes, and views on AllMCPs.

How Playwright E2E MCP works

What Playwright E2E MCP does

Playwright E2E MCP gives an MCP client tools for operating on a Playwright project and inspecting live pages. It covers the test lifecycle from discovery and execution through failure analysis, repair, regression checks, and historical review.

The server can report failures with code frames, expected and actual values, stack traces, network errors, console output, and categorized causes. It also distinguishes likely application defects from locator drift: suggested locator changes are based on elements found in the DOM and can be verified by rerunning the test.

Beyond test failures, the toolset supports accessibility audits with axe-core, visual baseline comparisons, selector validation, page inspection, and scaffolding new tests from selectors found in recent source changes.

How it works

Use run-test to execute the project's Playwright tests. Long suites can run in the background and return a run ID; get-run-status reports progress or retrieves the completed result. A completed run becomes the source for get-failure, suggest-fix, and the default inputs for flaky-test diagnosis.

get-failure examines one failure in detail, while suggest-fix looks for a unique replacement locator in the failure trace or live page. Applying a suggested patch writes the change, reruns the test, and reverts it if the test remains failing. The tool declines this workflow when the target element is genuinely absent.

Browser inspection tools open pages headlessly. inspect-page returns proven locators, visibility, text, and console messages; validate-selector checks selector validity and match counts. Both can use storageState, headers, and scripted actions. audit-accessibility can perform the same authenticated or staged navigation before running an axe-core audit.

Flakiness analysis repeats failures with retries disabled and classifies them as consistently failing, flaky, or not reproducing. Optional isolation and randomized file order help identify parallel-state problems and ordering dependencies. Run results are stored in .playwright-e2e-mcp/history.jsonl, which analyze-history uses to rank unstable tests and group failure patterns.

Setup and configuration

Initialize the package in a project with:

Terminal
npx -y playwright-e2e-mcp init

The package can also be installed as a development dependency using the npm @latest tag:

Terminal
npm install -D playwright-e2e-mcp@latest

The package name remains playwright-e2e-mcp. Claude Desktop users can use the available .mcpb bundle. The MCP Registry identifier is io.github.xsignon-secure/E2E.

The original repository has moved to github.com/xsignon-secure/E2E; development and releases are maintained there rather than in the former repository.

Tools and capabilities

  • Run and monitor Playwright tests, including partial results after crashes, timeouts, dead servers, install problems, and syntax or configuration errors.
  • List tests with file, line, title, and project information, using a source scan when Playwright cannot load.
  • Inspect failures, network requests, console errors, traces, and code frames.
  • Propose verified locator patches, optionally apply them, rerun the test, and revert unsuccessful changes.
  • Inspect live pages and validate CSS, Playwright, and locator expressions.
  • Generate specs from descriptions using selectors found in recent working-tree or commit changes.
  • Audit pages against WCAG 2.2 AA by default with verified locators and regression-check suggestions.
  • Compare screenshots with stored baselines and produce highlighted diff images.
  • Diagnose flaky tests and analyze local run history by test, pattern, or stability changes.

Limitations and notes

Locator repair is intended for selector drift, not missing application elements. Visual comparisons require a stored baseline after the initial capture. Randomized test ordering requires Playwright 1.64 or newer. The package is open source under the MIT license.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Playwright E2E MCP

Playwright E2E MCP is an MCP server that connects AI agents to Playwright projects and live browser pages. Its main tools run and inspect tests, analyze failures, repair verified locators, diagnose flaky behavior, audit accessibility, compare visual states, validate selectors, and generate end-to-end test files.

Install it by running `npx -y playwright-e2e-mcp init` in the project, or add `playwright-e2e-mcp@latest` as a development dependency. The package name is unchanged, and Claude Desktop users can use the available `.mcpb` bundle.

Run the failing tests repeatedly with `diagnose-flaky` to classify them as consistently failing, flaky, or not reproducing. Use isolation to investigate parallelism problems, randomized file order to find ordering dependencies when supported, and `analyze-history` to rank prior pass/fail changes.

Yes, for locator drift. `suggest-fix` matches the failed locator against the DOM or live URL, returns a diff and confidence, and can apply the patch, rerun the test, and revert it if the test still fails. It refuses cases where the element is genuinely missing.

Pass `storageState` or headers to `inspect-page`, `validate-selector`, or `audit-accessibility`, and supply actions when navigation requires clicks or form input. These tools can then inspect the resulting page state, selectors, console messages, or accessibility findings.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewPlaywright E2E MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/playwright-e2e-mcp?style=directory)](https://allmcps.com/mcp/playwright-e2e-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/playwright-e2e-mcp"><img src="https://allmcps.com/api/badge/playwright-e2e-mcp?style=directory" alt="Playwright E2E MCP on AllMCPs" /></a>