Run Playwright tests and surface structured results for AI agents doing test failure analysis.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
An MCP (Model Context Protocol) server for running Playwright tests and reading structured results, failed test details, and attachment content β designed for AI agents doing test failure analysis.
Playwright Report MCP gives an AI agent structured, token-efficient access to Playwright test outcomes. It runs your test suite, reads the JSON reporter output, and surfaces exactly what the agent needs: which tests failed, what the errors were, and the content of relevant attachments.
There are many Playwright MCP servers that control a browser β they navigate pages, click elements, fill forms, and take screenshots. Playwright Report MCP is not one of those.
| Browser automation MCPs | Playwright Report MCP | |
|---|---|---|
| Examples | microsoft/playwright-mcp, executeautomation/mcp-playwright | this project |
| Purpose | Let an AI agent drive a browser | Let an AI agent read test results |
| Runs tests | No | Yes |
| Returns pass/fail | No | Yes |
| Surfaces error messages | No | Yes |
| Reads attachment content | No | Yes |
Default reporters (list / dot) β Playwright's default reporters print human-readable output to stdout. Compact, but lossy: no attachment paths, no retry breakdown, no structured data.
HTML reporter (report.html) β A self-contained SPA bundle (typically 2β50 MB). Not machine-readable as text and exceeds any LLM context window.
Reading results.json directly β Works, but a full JSON report for even a small test suite is 10,000β20,000 tokens. For a failing test, most of that is passing test metadata you don't need.
results.json to only failed testsApproximate input token counts based on Claude tokenization (~3β4 characters per token for mixed JSON/text content).
| What you need | Without MCP β approach | Tokens (no MCP) | With MCP β tool calls | Tokens (MCP) | Savings |
|---|---|---|---|---|---|
| Error message only β live run | npx playwright test, read stdout (list/dot) | ~500β1,200 | run_tests + get_failed_tests | ~300β500 | ~2Γ |
| Error message only β existing results | Read full results.json | ~12,500β23,000 | get_failed_tests | ~300β500 | ~25β45Γ |
| + page state at failure | + read error-context file | ~15,000β26,000 | + get_test_attachment('error-context') | ~2,800β3,500 | ~4β7Γ |
| + custom text attachmentsΒΉ | + read attachment files | ~16,200β28,500 | + get_test_attachment Γ2 | ~3,300β5,500 | ~4β5Γ |
| + full page HTML snapshotΒ² | + read snapshot file | ~41,000β103,000 | + get_test_attachment | ~33,300β85,500 | ~1.2Γ |
ΒΉ Custom text attachments β e.g. AI diagnosis (~500β2,000 tokens) and console logs (~200β500 tokens) added via
testInfo.attach()in your own fixtures.Β² Full page HTML snapshot β a custom fixture that attaches the full rendered page HTML on failure. Large pages alone can reach 30,000β80,000 tokens and dominate cost regardless of whether MCP is used.
Key observations:
list/dot) is compact but gives the agent no path to attachment content β dead end for deeper analysisresults.json directly costs ~12,500β23,000 tokens even when only one test failed β most of it is passing test metadata the agent doesn't neederror-context is the single largest optimisation availableThe primary use case: your CI pipeline runs the tests, the agent picks up the results after the fact and diagnoses failures. get_failed_tests reads results.json regardless of who triggered the run. No re-run needed.
1. Install via npx (recommended)
No clone or build step needed β npx downloads and runs the server automatically:
Or build from source:
2. Add the JSON reporter to your Playwright project
3. Register in .mcp.json
4. Ask your AI agent
Run the Playwright tests and tell me what failed.
Tested with Claude Code (CLI). Should work with any MCP-compatible client that supports stdio transport, including Claude Desktop, Cursor, Cline, Windsurf, and Continue.dev β but these have not been verified.
The stdio server supports both MCP protocol eras from one entrypoint:
2026-07-28, selected by clients using version negotiation (for example, versionNegotiation: { mode: "auto" }).initialize handshake. This remains the default behavior in the MCP client SDK.The opening exchange pins one era for the connection lifetime. A client that pins an unsupported revision receives an explicit negotiation error; the server does not silently switch it to another era.
The project-scoped tools accept an optional workingDirectory parameter β see Multi-worktree support. get_run_status can use either a runId from run_tests with wait: false, or a workingDirectory lookup for the latest tracked run.
run_testsRuns the Playwright test suite and returns structured pass/fail results.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/playwright-report-mcp)<a href="https://allmcps.com/mcp/playwright-report-mcp"><img src="https://allmcps.com/api/badge/playwright-report-mcp?style=directory" alt="Playwright Report MCP on AllMCPs" /></a>