Playwright Report MCP
Exposes two read-only MCP tools for inspecting the latest Playwright JSON test run.
get_test_summary— returns the latest run's outcome:passed,failed,skippedandflakycounts, plusstart_timeandduration_ms. Takes no arguments.get_failures— returns the failed tests from the latest run as a list of free-form objects (e.g.test_id,file,project,status, error message). Takes no arguments.Both are parameterless and read the configured report on each call, so an agent can ask "how did the run go?" and "what failed?" without parsing the JSON itself.
Note: the README documents five tools (failure patterns, unstable tests, per-test history); the schema as given exposes only these two.
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 Report MCP What failed in the latest test run?"
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 Argus
An MCP server that lets an LLM agent read Playwright test reports. A Playwright JSON report is tens of thousands of lines and mostly noise; these tools answer the questions you would otherwise scroll for — what failed, which failures share a cause, and whether a test has been failing for weeks or only started today.
> which tests are the least reliable?
rate test last pattern
1.00 checkout.spec.ts > TC-C02: order summary failed locator-ambiguous
1.00 dashboard.spec.ts > TC-D01: loads widgets failed timing-or-waiting
0.80 cart.spec.ts > TC-R01: persists the cart flaky assertion-failureFeatures
Tool | Answers |
| How the latest run went: counts, duration, plus |
| The failed tests, with |
| Those failures grouped by what their errors look like — |
| The tests that fail or flake most often across past runs, worst first. Where an investigation starts, since every other history question needs a |
| One test, run by run: how often it failed, how it failed each time, and whether it is still failing. |
Two details worth knowing: a test running on two browsers produces two results
per run, so total_runs and total_results are counted separately and rates
are out of the latter. And instability_rate counts flakes alongside failures,
because a test that only ever passes on a retry is not a healthy test.
Related MCP server: QA Copilot MCP Server
Prerequisites
Python ≥ 3.10
uv —
brew install uv, orcurl -LsSf https://astral.sh/uv/install.sh | shNode.js, only for
mcp dev(the MCP Inspector)
Install
uv syncThat is the whole setup. A sample report and five runs of history are bundled in
data/, so every tool answers immediately — no configuration, and no Playwright
project needed to try it.
Use it
With Claude Code
The repository ships a project-scoped .mcp.json, so there is nothing to write:
claude # from the repository root, then approve the server when promptedCheck it with /mcp in the session, or claude mcp list in a terminal, then
ask: "which tests are the least reliable?"
Servers load at startup, so restart the session if it was already running. To
register it globally instead, pass --directory so uv finds this project's
venv from anywhere:
claude mcp add playwright-argus -s user -- \
uv --directory /absolute/path/to/playwright-argus run playwright-argusWith Claude Desktop
Add to claude_desktop_config.json (~/Library/Application Support/Claude/ on
macOS), then quit with Cmd-Q and reopen:
{
"mcpServers": {
"playwright-argus": {
"command": "uv",
"args": ["--directory", "/absolute/path/to/playwright-argus",
"run", "playwright-argus"]
}
}
}Logs land in ~/Library/Logs/Claude/mcp-server-playwright-argus.log.
By hand
uv run mcp dev src/playwright_argus/server.py # Inspector, in a browser
uv run playwright-argus # plain stdio serverPoint it at your own project
Generate a report with the json reporter:
npx playwright test --reporter=json > results.jsonThen set two variables — REPORT_PATH for the latest run, HISTORY_DIR for a
directory of past ones named run-001.json, run-002.json, … Both default into
data/, both are re-read on every call, and relative paths resolve from the
repository root rather than the working directory.
Build history by copying each run in as the next number; anything matching
run-*.json is read. Three runs is where a trend starts to mean anything.
cp results.json data/history/run-006.jsonWhere you set the two variables depends on how the server was started:
Launched by | Configuration comes from |
Claude Code / Desktop | the |
Your shell ( | exported variables |
MCP Inspector ( | the Inspector's own Environment Variables fields |
The Inspector is the odd one out: it spawns servers with a fixed set of
variables (HOME, LOGNAME, PATH, SHELL, TERM, USER) and drops
everything else, so exporting REPORT_PATH before mcp dev has no effect.
Tests
uv run pytest58 tests, no mocking — every one reads a real report through the real parser.
File | Covers | |
| 20 | Parsing one report: stats, failure fields, flaky tests, ANSI stripping, pattern grouping, and the messages given for a missing, truncated or non-Playwright file |
| 26 | Aggregating many reports: counts and rates, run-vs-result counting, the instability ranking and its tie-breaks, ordering, empty and unknown cases |
| 7 | The MCP contract — each tool listed, called over an in-memory client, returning the expected shape |
| 5 | Path resolution: relative vs absolute, defaults, explicit overrides |
Fixtures in tests/fixtures/ hold the reports they read, including a run with
flaky tests and a run that died in global setup. Tests needing exact rates build
their runs in a tmp_path instead.
How the code is laid out
src/playwright_argus/
server.py the five MCP tools, and nothing else
config.py where REPORT_PATH and HISTORY_DIR resolve to
playwright_report.py the one place that knows Playwright's JSON shape
models/ the normalized shapes every analysis starts from
analysis/ failure classification, history, instability ranking
history/loader.py reads the stored runs, reusing playwright_report.py
data/
results.json sample report: the latest run
history/run-00N.json five past runs, for the history toolsA stored run and the latest run go through the same parser, so the history tools and the latest-run tools cannot disagree about what a test is.
Troubleshooting
Symptom | Cause |
Tools answer about the wrong tests |
|
| The path in the message is what |
| Not |
| A client ran |
Server missing from | Servers load at startup: restart the session, and approve the project-scoped server |
| Node.js is missing, so there is no |
Avoid uv run mcp install …: it registers the server with --with mcp[cli] in
an isolated environment and no --directory, so this package is never
importable.
License
MIT — see LICENSE.
Available Tools
2 toolsget_failuresA
Return failed tests of the latest Playwright test run.
Inputs: no named parameters. Returns: result
get_test_summaryA
Return summary of the latest Playwright test run.
Inputs: no named parameters. Returns: flaky, failed, passed, skipped, +2 more
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
get_failures and get_test_summary have clearly distinct purposes: one retrieves only failed tests, the other an aggregate summary. There is no overlap or ambiguity between them.
Both tools follow a consistent get_[noun] pattern, making the naming predictable and easy to infer. The convention is uniform across the entire set.
With only two tools, the set is on the thin side and falls into the borderline range. The tools are focused and justified, but the count is minimal for a server that could reasonably include more report-oriented operations.
For a server scoped to the latest Playwright test run, get_failures and get_test_summary cover the primary reporting needs. Minor gaps exist—such as retrieving test details or run history—but they do not create dead ends for the core use case.
Related MCP Connectors
Direct access to Cypress tests results and accessibility reports in your AI workflow.
Query your AI agent traces, root-cause verdicts and issues, and run investigations, from your agent.
Test analytics for AI agents: test history, flaky tests, failure clusters, coverage.
Approved test intent, reviewed Playwright automation and run evidence, inside your editor.
Related MCP Servers
- FlicenseBqualityDmaintenanceSupercharges AI-assisted debugging of Playwright tests by parsing trace files to extract failures, action history, network logs, screenshots, and suggesting fixes.6-
- AlicenseAqualityDmaintenanceEnables AI assistants to summarize Playwright test runs, identify flaky tests, heuristically triage failures, generate Playwright test stubs, and retrieve recent GitHub CI status through MCP tool calls.5MIT

failure-reportofficial
AlicenseNot gradedqualityDmaintenanceEnables querying Playwright test failure reports and execution results directly from AI assistants, allowing retrieval of test outcomes, failures, and report details.MIT- AlicenseNot gradedqualityBmaintenanceEnables coding agents to validate web pages and run repeatable JSON browser scenarios, returning pass/fail results with local Playwright evidence such as screenshots, traces, and JUnit XML.1Apache 2.0