Playwright E2E MCP Server

An MCP server that lets AI agents run, debug, and inspect Playwright end-to-end tests — with structured results, actionable failure diagnostics, and live DOM inspection.

Local + remotestreamable-httpstdioMIT

What is the Playwright E2E MCP Server?

e2e is an MCP project maintained in the trajectiq-ai/e2e repository. The maintainer describes its purpose as “An MCP server that lets AI agents run, debug, and inspect Playwright end-to-end tests — with structured results, actionable failure diagnostics, and live DOM inspection”. Read the project documentation for the complete scope.

Local setup

The project provides a local client configuration using npx. Follow the repository’s build and installation steps before copying it, and replace example paths with the paths on your own computer.

Configuration values

The example declares PW_MCP_PROJECT_ROOT. Secret-looking values have been replaced with placeholders. Required and optional labels are shown only when the documentation states them.

Source

Project documentation · Repository · Discovery listing. This profile records the public documentation checked on 2026-10-08.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
run-testRun Playwright tests and return stats, failures, diagnostics and hints
get-failureDeep analysis of one failure: stack, expected/actual, DOM snapshot at failure (from the Playwright trace), next steps
inspect-pageOpen a URL headlessly and return the rendered DOM: selectors, visibility, boxes, text, console output, HTML
list-testsList available tests (file, line, full title, projects) with filtering
validate-selectorCheck a CSS selector against a live page: validity, match count, sample matches
generate-e2e-testScaffold a Playwright test from a description using the project's real selectors, discovered from recent file changes
compare-visual-stateVisual regression: screenshot before/after a change and report what moved and how colors shifted
diagnose-flakyRun a failing test 2–10 times with retries disabled and return an evidence verdict: CONSISTENTLY FAILING, FLAKY or NOT REPRODUCING

How to install the Playwright E2E MCP Server

{
  "mcpServers": {
    "playwright-e2e": {
      "command": "npx",
      "args": [
        "-y",
        "github:trajectiq-ai/E2E#v0.1.4"
      ],
      "env": {
        "PW_MCP_PROJECT_ROOT": "/absolute/path/to/your/project"
      }
    }
  }
}

From the project documentation. Replace placeholders and example paths before connecting.

Configuration

VariableDescriptionRequired
PW_MCP_PROJECT_ROOTDeclared in the maintainer’s client configuration.Check documentation