playwright e2e mcp

    1

    Run, diagnose, and self-heal Playwright E2E tests with trace-level insights and flakiness analysis.

    Free

    2 usesSecurity scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    playwright e2e mcp

    Example session with this skill installed

    The checkout test in tests/checkout.spec.ts is failing in CI. Can you find out why and try to fix it?

    • Read your context and instructions
    • Compiled the playwright e2e mcp

    I have analyzed the failure in tests/checkout.spec.ts. The test failed due to a locator timeout because the "Complete Purchase" button was not found in the DOM.

    Triage Result

    Test CaseFailure KindRoot Cause
    checkout.spec.ts:42locator-timeoutgetByRole('button', { name: 'Complete Purchase' }) matched 0 elements.

    The failure occurred because the UI now uses the text "Place Order" instead of "Complete Purchase". I have generated and verified a fix.

    // tests/checkout.spec.ts
    - await page.getByRole('button', { name: 'Complete Purchase' }).click();
    + await page.getByRole('button', { name: 'Place Order' }).click();
    

    Next steps

    1. Review the locator change to ensure "Place Order" is the intended final label.
    2. Run analyze-history to check if this test has shown similar flakiness in other branches.
    3. Commit the changes to resolve the CI failure.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    End-to-end testing often fails silently or results in "flaky" red builds that are hard to reproduce. This skill drives the playwright-e2e-mcp server to automate the discovery, diagnosis, and repair of broken Playwright tests.

    What it does

    • Automated Triage executes tests and groups failures by root cause to avoid redundant debugging.
    • Trace-Based Diagnosis extracts the DOM state, failed network requests, and console logs at the exact moment of failure.
    • Self-Healing Fixes identifies broken locators and applies verified code changes that re-run automatically to confirm the fix.
    • Flakiness Analysis detects tests sensitive to execution order, parallelism, or timing races through isolated repetition.
    • CI Report Integration downloads and analyzes artifacts from GitHub Actions or GitLab to diagnose failures that only occur in remote environments.
    • Web Audits performs accessibility and performance checks against signed-in pages and complex user flows.

    How it works

    1. Run uses run-test to execute specific files or failing suites, returning structured results instead of raw logs.
    2. Analyze calls get-failure to inspect the trace, DOM snapshot, and failure kind for a specific test index.
    3. Repair invokes suggest-fix to generate a diff for a missing element or broken selector, then verifies the change.
    4. Monitor utilizes analyze-history to track regressions and pass/fail trends across different git commits.

    Frameworks & tools

    Specifically designed for Playwright (Node.js and Python) via the playwright-e2e-mcp server. It integrates with GitHub Actions, GitLab CI, axe-core for accessibility, and standard browser engines.

    Why this beats prompting it yourself

    Standard LLMs cannot see the live browser state or network traffic during a test failure. This skill bridges that gap by giving the agent direct access to traces, interactive page inspection, and the ability to verify its own fixes before committing them.

    Use cases

    • Fix a regression by bisecting git history to find the exact commit that broke a test.
    • Debug an intermittent failure that only happens when tests run in parallel.
    • Generate new E2E tests by recording a manual flow and converting it to verified locators.
    • Audit the accessibility and Web Vitals of a checkout flow behind a login wall.

    Known limitations

    Requires the playwright-e2e-mcp server to be installed and running. Accessibility and performance audits are restricted to Chromium-based engines. Locators and visual baselines require a local browser environment.

    Requires playwright-e2e-mcp server 0.2.0+. Performance audits are Chromium-only. Server must have access to project root and CI tokens for remote report downloads.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    2 uses

    Times used to date

    Free forever

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 14 days ago

    • Free with an Agensi account

    Requires

    Node.js
    playwright

    Permissions

    Browser
    Read Files
    Write Files
    Network Access
    Environment Variables
    Listed14 days ago

    What's inside

    Frequently Asked Questions

    This skill provides a bridge between your AI agent and the Playwright test runner, allowing the agent to view DOM snapshots, analyze network traces, and verify code fixes in real-time—capabilities standard LLMs lack without direct browser access.

    The skill is designed to work with any AI agent that supports the Model Context Protocol (MCP) and requires the `playwright-e2e-mcp` server to be installed in your environment.

    Yes, the 'analyze-history' tool can ingest artifacts from GitHub Actions and GitLab CI to help diagnose and resolve environment-specific failures that don't occur on your local machine.

    While the skill supports broad E2E testing for Node.js and Python Playwright suites, specific features like accessibility audits and visual baselines currently require a Chromium-based engine.

    The skill identifies the root cause of failures and generates code diffs to fix broken locators, which it then automatically re-runs to ensure the test passes before you commit the change.

    New in Testing & Debugging