playwright-e2e-mcp
Runs Playwright end-to-end tests against Firefox: the browser argument selects Firefox (matched against the Playwright config project names), and Firefox can be launched headed or headless for test runs, failure diagnoses, live DOM inspection (inspect-page/validate-selector) and visual comparisons.
Reads the project's Git working tree (git status, falling back to git diff HEAD~1 and recent mtimes) to discover the agent's recent changes and extract the locators those files actually declare, so generated Playwright tests are built from the project's real selectors.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@playwright-e2e-mcp run my checkout e2e tests and tell me why they failed"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
playwright-e2e-mcp has moved
This repository is no longer maintained. playwright-e2e-mcp now lives at github.com/xsignon-secure/E2E.
The latest release is 0.4.2. To set it up in your project:
npx -y playwright-e2e-mcp initThe npm package name is unchanged, so existing installs keep working; run the command above
(or npm install -D playwright-e2e-mcp@latest) to pick up the newest version.
Issues, pull requests, releases and the .mcpb Claude Desktop bundle are all at the new home:
Repository: https://github.com/xsignon-secure/E2E
MCP Registry name:
io.github.xsignon-secure/E2E
playwright-e2e-mcp is, and stays, fully open source and free under the MIT license.
Available Tools
11 toolsanalyze-historyAnalyze run historyARead-onlyIdempotentInspect
Analyze the local run history (.playwright-e2e-mcp/history.jsonl, written by every run): 'flaky' ranks tests that flip pass/fail and lists broken or regressed ones; 'patterns' groups failures by cause; 'test' shows one test's timeline.
Inputs: test, view, limit, lastRuns, +1 more.
compare-visual-stateCompare visual stateADestructiveIdempotentInspect
Visual regression check: screenshot a live page (or element), compare it to a stored baseline, and report how many pixels changed, WHERE they changed (bounding regions), and the average color shift ("blue → red"). First call saves the baseline; later calls compare. Writes a red-highlighted diff image for review.
Inputs: url (required), name (required), action, actions, +11 more.
diagnose-flakyDiagnose flaky testADestructiveIdempotentInspect
Run a failing test multiple times with retries disabled and return an evidence-based verdict: CONSISTENTLY FAILING (real bug), FLAKY (intermittent — includes pass/fail counts and error-signature variance) or NOT REPRODUCING (one-off). Defaults to the tests that failed in the most recent run.
Inputs: runs, config, headed, browser, +4 more.
generate-e2e-testGenerate an E2E testADestructiveInspect
Scaffold a Playwright test from a description using the project's REAL selectors. Scans the agent's recent file changes (git working tree / last commit, mtime fallback), extracts data-testid / role / label / placeholder / id locators with their source locations, optionally cross-checks them against the live page, writes a ready-to-run spec, and returns next steps.
Inputs: description (required), file, write, config, +5 more.
get-failureAnalyze a test failureARead-onlyIdempotentInspect
Analyze one failure from the most recent run-test execution: full message and code frame, expected vs actual, stack trace, failed network requests (4xx/5xx and dead endpoints), console errors, failure kind (assertion/timeout/browser-crash/syntax/config/server-unreachable) and concrete next steps. Use run-test first.
Inputs: index, projectRoot.
get-run-statusCheck a background runAIdempotentInspect
Progress (tests done/total, failures so far) or the final result of a run-test background run; the result becomes the last run for get-failure. waitSeconds waits; cancel stops it. Default: the latest run.
Inputs: runId, cancel, waitSeconds.
inspect-pageInspect live page DOMARead-onlyIdempotentInspect
Open a URL headlessly and return its elements with Playwright locators proven unique on the page (role + name first), CSS selectors, visibility, text and console messages. storageState/headers open it signed in; actions click/fill first to reach a state. view 'locators' is the compact map.
Inputs: url (required), view, actions, headers, +9 more.
list-testsList available testsARead-onlyIdempotentInspect
List the Playwright tests available in the project (file, line, full title, projects), with optional filtering. Uses playwright test --list when Playwright works and falls back to a source scan when the install or config is broken, reporting why.
Inputs: limit, config, filter, testDir, +1 more.
run-testRun E2E testsADestructiveIdempotentInspect
Run the project's Playwright tests: stats plus each failure's file:line, kind and message. Diagnoses missing installs, dead dev servers, syntax errors, crashes and timeouts (kills the tree, keeps partial results). Reports progress; background: true returns a run id for long suites. Runs are recorded for analyze-history.
Inputs: args, grep, config, headed, +10 more.
suggest-fixSuggest (and apply) a fixADestructiveInspect
Patch a failure from the last run: a drifted locator is matched against the DOM at failure (trace, or live url) and replaced with one proven unique; changed copy gets the new expected text. Returns a diff and confidence; apply: true writes it, re-runs the test and reverts if still red. Refuses when the element is truly missing (app bug).
Inputs: url, apply, index, config, +6 more.
validate-selectorValidate selector or locatorARead-onlyIdempotentInspect
Check a CSS selector, Playwright selector or locator (getByRole/getByTestId…, .first(), .filter()) on a live page: validity, match count (actions need exactly 1), sample matches and a sturdier verified locator for each. Accepts storageState/headers/actions.
Inputs: url (required), selector (required), actions, headers, +4 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Tools map to distinct stages of the Playwright workflow: listing, running, monitoring, failure analysis, fixing, generation, visual comparison, selector validation, flaky diagnosis, and history. Overlap exists between diagnose-flaky and analyze-history, and between get-failure and get-run-status, but descriptions clarify the boundaries.
All tool names use kebab-case with a consistent verb-first pattern (run-test, get-failure, list-tests, validate-selector, etc.). Minor variation in noun length does not break the convention.
11 tools is well within the ideal 3–15 range. Each tool addresses a distinct aspect of Playwright E2E testing without obvious redundancy.
The core lifecycle is well covered: list tests, run tests, monitor runs, analyze failures, suggest fixes, generate tests, validate selectors, compare visual state, diagnose flakiness, and analyze history. Minor gaps include running a specific test or reading a single test's code, but agents can work around these.
Maintenance
Related MCP Connectors
Approved test intent, reviewed Playwright automation and run evidence, inside your editor.
Agentic AI quality engineering: run, debug and triage tests on real browsers and devices
Direct access to Cypress tests results and accessibility reports in your AI workflow.
Write, run and check natural-language browser tests of your web app from your AI assistant.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables AI assistants to inspect, debug, and test web pages using Playwright. Provides comprehensive DOM inspection, visibility debugging, layout validation, and element finding capabilities in real browser environments.3471 npm5MIT
- AlicenseNot gradedqualityDmaintenanceEnables automated end-to-end testing powered by Playwright where test cases are defined in natural language and executed by AI. Uses lightweight snapshot analysis with vision mode fallback for sophisticated testing scenarios.3Apache 2.0
- AlicenseAqualityDmaintenanceRun real Playwright E2E tests from your AI coding agent.423 npmMIT
- AlicenseAqualityDmaintenanceEnables AI agents to run reusable Playwright test fixtures against live deployments, providing structured test results, screenshots, and assertions.3MIT