{"_id":"@yahya_mahmudiy/playwright-report-mcp","_rev":"2-ec30c4d43bfc6fa93beadf37b06f185e","name":"@yahya_mahmudiy/playwright-report-mcp","dist-tags":{"latest":"0.1.0"},"versions":{"0.0.0-stage":{"name":"@yahya_mahmudiy/playwright-report-mcp","version":"0.0.0-stage","_id":"@yahya_mahmudiy/playwright-report-mcp@0.0.0-stage","stub":true,"maintainers":[{"name":"yahya_mahmudiy","email":"yahyomahmudovv@gmail.com"}],"dist":{"shasum":"4b50cce7320c268c32d355b2824f77e460fa5a58","tarball":"https://registry.npmjs.org/@yahya_mahmudiy/playwright-report-mcp/-/playwright-report-mcp-0.0.0-stage.tgz","fileCount":2,"integrity":"sha512-dudPAQKBfybneNG/vLV5dl9pfeCDN1DJqlbdGTgaQ+Fpug7F63S2YcHGSmdc/SQkPdyFEIegzlZAEOKjSIl2Mg==","signatures":[{"sig":"MEUCIC5L1zjrVbtqPb4netpAWR788xfAhxRWwboIUu3y5uQdAiEA6vOSjJmj4JGAWQZSxhRPnfe5QLdgXnBlaq8GoMi8mEk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":359},"_npmUser":{"name":"yahya_mahmudiy","email":"yahyomahmudovv@gmail.com"},"description":"Temporary package placeholder for staged publishing","directories":{}},"0.1.0":{"_id":"@yahya_mahmudiy/playwright-report-mcp@0.1.0","bin":{"playwright-report-mcp":"build/index.js"},"bugs":{"url":"https://github.com/YahyoMahmudov/QA-Agent-Hub/issues"},"dist":{"shasum":"b912ee462715c905f44fa93e1630af654ac2d325","tarball":"https://registry.npmjs.org/@yahya_mahmudiy/playwright-report-mcp/-/playwright-report-mcp-0.1.0.tgz","fileCount":7,"integrity":"sha512-dM7o0GM8Tug47Smsb22MuZhw9ofhxMkwYXxV02k62qhRb0ZxuR/7sGWgs5PM5/vHisVcVL2JNklv8WkLHOwupQ==","signatures":[{"sig":"MEYCIQD4KozHPKLmPXyhvwuvj8Ss1DO+31IpTt1NkjZ6D2n3JAIhALPh4vTMgOuB21VrwsLSbnpHWYUBJqgup4apjB6F3oSO","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCvY7xm39mJi5X0ACopIHwE8Q9ZEq0LDzRs9oTpC6qj5gIhAMBCtE/FlqRP0sH6z0QNoWo0NvzRuu9jn2UiUzbTMOlP"}],"unpackedSize":37198},"name":"@yahya_mahmudiy/playwright-report-mcp","type":"module","author":{"name":"Yahyo Mahmudov"},"engines":{"node":">=20"},"gitHead":"7110da67e5a4dd6c8c52df482846529458db0d24","license":"MIT","scripts":{"test":"npm run build && node --test","build":"tsc","start":"node build/index.js","prepublishOnly":"npm test"},"version":"0.1.0","_npmUser":{"name":"yahya_mahmudiy","email":"yahyomahmudovv@gmail.com"},"homepage":"https://github.com/YahyoMahmudov/QA-Agent-Hub#readme","keywords":["mcp","mcp-server","model-context-protocol","playwright","test-report","claude","cursor"],"repository":{"url":"git+https://github.com/YahyoMahmudov/QA-Agent-Hub.git","type":"git","directory":"packages/playwright-mcp-report"},"_npmVersion":"11.17.0","description":"MCP server that reads Playwright JSON reports and returns compact JSON answers (summary, failures, slowest tests, run comparison) so an AI agent never has to read the whole report.","directories":{},"maintainers":[{"name":"yahya_mahmudiy","email":"yahyomahmudovv@gmail.com"}],"_nodeVersion":"24.16.0","dependencies":{"zod":"^4.6.5","@modelcontextprotocol/server":"^2.3.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^7.0.2","@types/node":"^26.6.5"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/playwright-report-mcp_0.1.0_1791608151216_0.1464757979567355"}}},"time":{"created":"2026-10-10T04:55:16.195Z","modified":"2026-10-10T04:55:51.455Z","0.0.0-stage":"2026-10-10T04:55:16.195Z","0.1.0":"2026-10-10T04:55:51.303Z"},"description":"MCP server that reads Playwright JSON reports and returns compact JSON answers (summary, failures, slowest tests, run comparison) so an AI agent never has to read the whole report.","maintainers":[{"name":"yahya_mahmudiy","email":"yahyomahmudovv@gmail.com"}],"readme":"# @yahya_mahmudiy/playwright-report-mcp\n\nAn MCP server that reads a Playwright JSON report and answers questions about it in compact JSON, so an AI agent never has to load the whole report into its context.\n\nA seven-test report is about 20 KB of JSON, most of it stack traces repeated three times with terminal colour codes. `get_summary` answers from the same file in about 250 characters.\n\n- [Supported format](#supported-format)\n- [Add it to Claude Code](#add-it-to-claude-code)\n- [Add it to Cursor](#add-it-to-cursor)\n- [The six tools](#the-six-tools)\n- [Errors](#errors)\n- [Safety rules](#safety-rules)\n\n## Supported format\n\n**Playwright JSON reporter files only.** That is the file Playwright's built-in `json` reporter writes:\n\n```ts\n// playwright.config.ts\nreporter: [['json', { outputFile: 'test-results/report.json' }]],\n```\n\nor, without touching the config:\n\n```bash\n# macOS/Linux\nPLAYWRIGHT_JSON_OUTPUT_FILE=test-results/report.json npx playwright test --reporter=json\n```\n\n```powershell\n# Windows PowerShell\n$env:PLAYWRIGHT_JSON_OUTPUT_FILE = \"test-results/report.json\"; npx playwright test --reporter=json\n```\n\nNot supported: the HTML report, JUnit XML, blob reports, trace files, and JSON written by other test runners (Jest, Mocha, Cypress, CTRF). Anything else is refused with a `NOT_PLAYWRIGHT_REPORT` error rather than guessed at. A file counts as a Playwright JSON report when it has a `config` object and a `suites` array whose entries carry `specs`.\n\nDeveloped and tested against reports from Playwright 1.63. Requires Node.js 20 or later.\n\n## Add it to Claude Code\n\nRun this in your project folder:\n\n```bash\nclaude mcp add playwright-report -- npx -y @yahya_mahmudiy/playwright-report-mcp\n```\n\nOn native Windows (not WSL), `npx` has to go through `cmd /c`:\n\n```powershell\nclaude mcp add playwright-report -- cmd /c npx -y @yahya_mahmudiy/playwright-report-mcp\n```\n\nTo share the server with everyone who works on the repository, commit a `.mcp.json` file at the project root instead:\n\n```json\n{\n  \"mcpServers\": {\n    \"playwright-report\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@yahya_mahmudiy/playwright-report-mcp\"]\n    }\n  }\n}\n```\n\nCheck that it connected with `claude mcp list`, or `/mcp` inside Claude Code. Then ask something like *\"Summarise test-results/report.json\"* or *\"Compare report-run1.json with report-run2.json\"*.\n\n## Add it to Cursor\n\nCreate `.cursor/mcp.json` in your project (or `~/.cursor/mcp.json` to have it in every project):\n\n```json\n{\n  \"mcpServers\": {\n    \"playwright-report\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@yahya_mahmudiy/playwright-report-mcp\"],\n      \"env\": {\n        \"PW_REPORT_DIR\": \"${workspaceFolder}\"\n      }\n    }\n  }\n}\n```\n\nThen switch the server on under **Customize** in Cursor's sidebar. The tools become available to the agent in chat.\n\n### Report paths\n\nEvery tool takes the report path as an argument. It can be:\n\n- absolute, to read a report anywhere on disk, or\n- relative, resolved against `PW_REPORT_DIR` when that variable is set, otherwise against the directory the server was started in.\n\n`PW_REPORT_DIR` is the only setting, and it is optional. Set it when your client does not start servers in the project folder; in Claude Code, pass it with `--env` before the server name:\n\n```bash\nclaude mcp add --env PW_REPORT_DIR=/path/to/project playwright-report -- npx -y @yahya_mahmudiy/playwright-report-mcp\n```\n\n## The six tools\n\nAll six are read-only. Durations are in milliseconds. Values in parentheses are defaults.\n\n| Tool | Arguments | Returns |\n| --- | --- | --- |\n| `get_summary` | `reportPath` | `total`, `passed`, `failed`, `flaky`, `skipped`, `durationMs`, `testTimeMs`, `startTime`, `globalErrors` |\n| `list_failures` | `reportPath`, `includeFlaky` (false), `maxErrorChars` (500) | Each failed test: `name`, `title`, `project`, `result`, `durationMs`, `error`, `errorLocation` |\n| `slowest_test` | `reportPath`, `limit` (5) | The N slowest tests with `durationMs` |\n| `get_execution_times` | `reportPath`, `sort` (`report`, `slowest`, `fastest`, `name`), `limit` (200) | Every test with `durationMs`, plus `testTimeMs` and `averageMs` |\n| `get_test_details` | `reportPath`, `name`, `project` (optional) | One test in full: location, status, every attempt with its error, code snippet and attachments |\n| `compare_reports` | `baselinePath`, `currentPath`, `minDurationDeltaMs` (0), `limit` (50), `maxErrorChars` (500) | Both paths, a `summary` of both runs with the delta, `newlyFailed`, `newlyPassed`, `stillFailing`, `otherStatusChanges`, `added`, `removed`, `durationChanges` |\n\n### `get_summary`\n\nThe headline numbers for one run.\n\n```json\n{\n  \"reportPath\": \"/project/test-results/report-run1.json\",\n  \"total\": 7,\n  \"passed\": 5,\n  \"failed\": 2,\n  \"flaky\": 0,\n  \"skipped\": 0,\n  \"durationMs\": 10763,\n  \"testTimeMs\": 36303,\n  \"startTime\": \"2026-10-10T03:51:17.354Z\",\n  \"globalErrors\": 0\n}\n```\n\n`durationMs` is the wall-clock time of the run. `testTimeMs` is the sum of every test's own time, which is larger when tests run in parallel. `globalErrors` counts errors raised outside any test, such as a spec file that fails to load.\n\n### `list_failures`\n\nEvery failed test with its name, title and error message.\n\n```json\n{\n  \"reportPath\": \"/project/test-results/report-run1.json\",\n  \"count\": 2,\n  \"failures\": [\n    {\n      \"name\": \"saucedemo.spec.ts › SauceDemo › inventory page lists all products\",\n      \"title\": \"inventory page lists all products\",\n      \"project\": \"chromium\",\n      \"status\": \"failed\",\n      \"result\": \"failed\",\n      \"durationMs\": 10050,\n      \"error\": \"Error: inventory should list the full product catalogue\\n\\nexpect(locator).toHaveCount(expected) failed\\n\\nLocator:  getByTestId('inventory-item')\\nExpected: 7\\nReceived: 6\\nTimeout:  5000ms\",\n      \"errorLocation\": \"saucedemo.spec.ts:38:7\"\n    }\n  ],\n  \"globalErrors\": []\n}\n```\n\nError messages have their colour codes removed and stop before Playwright's `Call log:` section. `result` is the raw status of the failing attempt (`failed`, `timedOut`, `interrupted`), which tells a timeout from an assertion failure. Set `includeFlaky` to also list tests that failed and then passed on retry.\n\n### `slowest_test`\n\nThe N slowest tests, slowest first. `limit` is N.\n\n```json\n{\n  \"reportPath\": \"/project/test-results/report-run1.json\",\n  \"total\": 7,\n  \"count\": 2,\n  \"tests\": [\n    { \"name\": \"saucedemo.spec.ts › SauceDemo › inventory page lists all products\", \"project\": \"chromium\", \"status\": \"failed\", \"durationMs\": 10050 },\n    { \"name\": \"saucedemo.spec.ts › SauceDemo › locked out user sees a locked-out error\", \"project\": \"chromium\", \"status\": \"failed\", \"durationMs\": 10004 }\n  ]\n}\n```\n\n### `get_execution_times`\n\nEvery test with its execution time, in report order unless `sort` says otherwise. Each entry has the same shape as in `slowest_test`; the answer also carries `durationMs`, `testTimeMs` and `averageMs` for the run.\n\n### `get_test_details`\n\nEverything the report holds about one test. `name` can be the title, the full name, or any case-insensitive fragment of it. Each attempt comes with its full error message, error location, code snippet and attachment paths (screenshots, traces).\n\nIf several tests match, up to five are returned in full and the rest are listed by name. If none match, the answer lists the test names that are available.\n\n### `compare_reports`\n\nWhat changed between a baseline run and a current run.\n\n```json\n{\n  \"baselinePath\": \"/project/test-results/report-run1.json\",\n  \"currentPath\": \"/project/test-results/report-run2.json\",\n  \"summary\": {\n    \"baseline\": { \"total\": 7, \"passed\": 5, \"failed\": 2, \"flaky\": 0, \"skipped\": 0, \"durationMs\": 10763, \"testTimeMs\": 36303 },\n    \"current\": { \"total\": 7, \"passed\": 5, \"failed\": 2, \"flaky\": 0, \"skipped\": 0, \"durationMs\": 8593, \"testTimeMs\": 20562 },\n    \"delta\": { \"total\": 0, \"passed\": 0, \"failed\": 0, \"flaky\": 0, \"skipped\": 0, \"durationMs\": -2170, \"testTimeMs\": -15741 }\n  },\n  \"newlyFailed\": [\n    {\n      \"name\": \"saucedemo.spec.ts › SauceDemo › adding a product updates the cart badge\",\n      \"project\": \"chromium\",\n      \"baselineStatus\": \"passed\",\n      \"currentStatus\": \"failed\",\n      \"error\": \"Error: cart badge should show the number of items added ...\"\n    }\n  ],\n  \"newlyPassed\": [\n    {\n      \"name\": \"saucedemo.spec.ts › SauceDemo › inventory page lists all products\",\n      \"project\": \"chromium\",\n      \"baselineStatus\": \"failed\",\n      \"currentStatus\": \"passed\"\n    }\n  ],\n  \"stillFailing\": [\n    { \"name\": \"saucedemo.spec.ts › SauceDemo › locked out user sees a locked-out error\", \"project\": \"chromium\" }\n  ],\n  \"otherStatusChanges\": [],\n  \"added\": [],\n  \"removed\": [],\n  \"durationChangeCount\": 7,\n  \"durationChanges\": [\n    {\n      \"name\": \"saucedemo.spec.ts › SauceDemo › inventory page lists all products\",\n      \"project\": \"chromium\",\n      \"baselineMs\": 10050,\n      \"currentMs\": 1572,\n      \"deltaMs\": -8478,\n      \"deltaPct\": -84\n    }\n  ]\n}\n```\n\n`added` and `removed` are tests present in only one of the two reports. `durationChanges` is sorted by the size of the change, largest first, and trimmed here to one entry.\n\n## How the report is read\n\n- **Test names** are `file › describe › title`, with nested `describe` blocks included. Line numbers are left out so a test keeps its name when the code above it moves.\n- **Matching tests between two reports** uses project, file and title path. A renamed test shows up as one removed and one added.\n- **Status** comes from Playwright's own per-test verdict: `expected` is `passed`, `unexpected` is `failed`, and `flaky` and `skipped` keep their names. A test marked `test.fail()` that fails therefore counts as passed, as it does in Playwright's own output.\n- **A test's duration** is the total across all of its attempts, retries included.\n- UTF-8, UTF-8 with a byte order mark and UTF-16 LE files are accepted. The last two are what Windows PowerShell writes when output is redirected to a file.\n\n## Errors\n\nEvery failure is a JSON document with a message and a stable code, returned with `isError` set:\n\n```json\n{\n  \"error\": \"Not a Playwright JSON report (no \\\"suites\\\" array): /project/package.json. Only files written by Playwright's \\\"json\\\" reporter are supported.\",\n  \"code\": \"NOT_PLAYWRIGHT_REPORT\"\n}\n```\n\n| Code | Meaning |\n| --- | --- |\n| `INVALID_ARGUMENTS` | An argument is missing, of the wrong type or out of range |\n| `NOT_JSON_FILE` | The path does not end in `.json` |\n| `FILE_NOT_FOUND` | No file at that path |\n| `FILE_TOO_LARGE` | The file is larger than 100 MB |\n| `READ_FAILED` | The file exists but could not be read |\n| `INVALID_JSON` | The file is not valid JSON |\n| `NOT_PLAYWRIGHT_REPORT` | Valid JSON, but not a Playwright JSON reporter file |\n| `INTERNAL_ERROR` | Anything unexpected |\n\n## Safety rules\n\n- **Read-only.** No tool writes, moves or deletes anything.\n- **JSON files only.** A path that does not end in `.json` is refused before the file is opened.\n- **JSON answers only.** Every tool result, success or failure, is a single JSON document.\n- **No API keys.** The server needs no credentials and reads no secrets.\n- **No network calls.** It reads the files it is given and nothing else.\n- **Nothing on stdout but the protocol.** stdout carries the MCP JSON-RPC stream, so the code never calls `console.log`. Errors are logged to stderr with `console.error`.\n- Test `stdout` and `stderr` captured in the report are never returned.\n\n## Development\n\n```bash\nnpm install\nnpm test          # builds, then drives the server over stdio against real reports\nnpm run build     # compile src/ to build/ only\n```\n\n```\nsrc/index.ts    server setup and the six tool registrations\nsrc/report.ts   loading, validation and normalization of a report file\nsrc/tools.ts    the answer each tool builds from a normalized report\nsrc/types.ts    raw report shape and the normalized model\ntest/           stdio tests and two real Playwright reports as fixtures\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md","homepage":"https://github.com/YahyoMahmudov/QA-Agent-Hub#readme","keywords":["mcp","mcp-server","model-context-protocol","playwright","test-report","claude","cursor"],"repository":{"url":"git+https://github.com/YahyoMahmudov/QA-Agent-Hub.git","type":"git","directory":"packages/playwright-mcp-report"},"author":{"name":"Yahyo Mahmudov"},"bugs":{"url":"https://github.com/YahyoMahmudov/QA-Agent-Hub/issues"},"license":"MIT"}