
Playwright Report Mcp
Let your coding agent run Playwright from an allowed directory and read structured JSON failures for faster triage.
Overview
Playwright Report MCP is an MCP server for the Ship phase that runs Playwright tests and returns structured JSON results so agents can analyze failures systematically.
What is this MCP server?
- Runs Playwright tests from a per-call workingDirectory with sandboxed PW_ALLOWED_DIRS
- Structured JSON results for AI-driven test failure analysis
- Optional PW_RESULTS_FILE override for reporter output path
- npm stdio package playwright-report-mcp (v3.2.2)
- Server version 3.2.2
- Default results path pattern <workingDirectory>/test-results/results.json
- PW_ALLOWED_DIRS defaults to launch directory only when unset
What problem does it solve?
Agents cannot reliably debug flaky UI tests from unstructured logs, so shipping slows when every failure needs a human to re-run and copy output.
Who is it for?
Solo builders with Playwright suites who want the agent in the loop for failing specs before release.
Skip if: Projects with no Playwright setup or teams that forbid automated test execution from agent tooling.
What do I get? / Deliverables
After install, your agent can execute Playwright within allowed dirs and reason over structured test results to propose targeted fixes.
- Per-run Playwright execution from an authorized workingDirectory
- Structured JSON test results at default or PW_RESULTS_FILE path
- Agent-readable failure context for faster fix suggestions
Recommended MCP Servers
Journey fit
End-to-end and UI tests belong in Ship when you are proving releases stable before launch, not when you are still scoping the idea. Testing subphase is where Playwright execution and machine-readable reports directly support failure analysis and fix loops.
How it compares
Test-runner MCP with JSON reporting, not a browser automation skill that only scrapes pages.
Common Questions / FAQ
Who is Playwright Report MCP for?
It is for developers using AI agents alongside Playwright who need structured pass/fail data instead of raw console dumps.
When should I use Playwright Report MCP?
Use it in the Ship phase when tests are failing and you want the agent to run suites and interpret JSON results inside authorized project folders.
How do I add Playwright Report MCP to my agent?
Install playwright-report-mcp from npm, set PW_ALLOWED_DIRS to path-delimiter-separated allowed roots, optionally set PW_RESULTS_FILE, and add the stdio MCP entry to your client config.