playwright-e2e-mcp 0.7.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/README.md +134 -25
  2. package/dist/cli/doctor.d.ts +12 -1
  3. package/dist/cli/doctor.js +34 -4
  4. package/dist/cli/doctor.js.map +1 -1
  5. package/dist/cli/upload.d.ts +6 -5
  6. package/dist/cli/upload.js +20 -17
  7. package/dist/cli/upload.js.map +1 -1
  8. package/dist/discovery.d.ts +61 -0
  9. package/dist/discovery.js +108 -0
  10. package/dist/discovery.js.map +1 -0
  11. package/dist/http.d.ts +9 -0
  12. package/dist/http.js +49 -3
  13. package/dist/http.js.map +1 -1
  14. package/dist/index.js +8 -3
  15. package/dist/index.js.map +1 -1
  16. package/dist/oauth.d.ts +2 -0
  17. package/dist/oauth.js +1 -1
  18. package/dist/oauth.js.map +1 -1
  19. package/dist/server.d.ts +23 -3
  20. package/dist/server.js +55 -10
  21. package/dist/server.js.map +1 -1
  22. package/dist/skills.d.ts +23 -0
  23. package/dist/skills.js +101 -0
  24. package/dist/skills.js.map +1 -0
  25. package/dist/tools/analyze-history.js +9 -9
  26. package/dist/tools/analyze-history.js.map +1 -1
  27. package/dist/tools/audit-accessibility.d.ts +6 -0
  28. package/dist/tools/audit-performance.d.ts +6 -0
  29. package/dist/tools/compare-visual-state.d.ts +6 -0
  30. package/dist/tools/diagnose-flaky.js +5 -1
  31. package/dist/tools/diagnose-flaky.js.map +1 -1
  32. package/dist/tools/generate-e2e-test.d.ts +3 -0
  33. package/dist/tools/generate-e2e-test.js +3 -0
  34. package/dist/tools/generate-e2e-test.js.map +1 -1
  35. package/dist/tools/get-failure.js +3 -1
  36. package/dist/tools/get-failure.js.map +1 -1
  37. package/dist/tools/inspect-page.d.ts +6 -0
  38. package/dist/tools/inspect-page.js +3 -1
  39. package/dist/tools/inspect-page.js.map +1 -1
  40. package/dist/tools/list-tests.js +16 -12
  41. package/dist/tools/list-tests.js.map +1 -1
  42. package/dist/tools/probe-script.js +88 -14
  43. package/dist/tools/probe-script.js.map +1 -1
  44. package/dist/tools/run-test.js +2 -1
  45. package/dist/tools/run-test.js.map +1 -1
  46. package/dist/tools/save-login.d.ts +3 -0
  47. package/dist/tools/shared.d.ts +25 -1
  48. package/dist/tools/shared.js +56 -5
  49. package/dist/tools/shared.js.map +1 -1
  50. package/dist/tools/suggest-fix.js +4 -0
  51. package/dist/tools/suggest-fix.js.map +1 -1
  52. package/dist/tools/validate-selector.d.ts +6 -0
  53. package/dist/tools/validate-selector.js +10 -2
  54. package/dist/tools/validate-selector.js.map +1 -1
  55. package/dist/types/index.d.ts +1 -1
  56. package/dist/utils/history-client.d.ts +32 -0
  57. package/dist/utils/{pro-client.js → history-client.js} +27 -20
  58. package/dist/utils/history-client.js.map +1 -0
  59. package/dist/utils/live-reporter.d.ts +29 -0
  60. package/dist/utils/live-reporter.js +145 -0
  61. package/dist/utils/live-reporter.js.map +1 -0
  62. package/dist/utils/playwright-runner.js +36 -14
  63. package/dist/utils/playwright-runner.js.map +1 -1
  64. package/dist/utils/pytest-runner.d.ts +102 -0
  65. package/dist/utils/pytest-runner.js +715 -0
  66. package/dist/utils/pytest-runner.js.map +1 -0
  67. package/dist/utils/test-change-guard.d.ts +21 -0
  68. package/dist/utils/test-change-guard.js +128 -3
  69. package/dist/utils/test-change-guard.js.map +1 -1
  70. package/dist/utils/update-check.d.ts +50 -0
  71. package/dist/utils/update-check.js +75 -0
  72. package/dist/utils/update-check.js.map +1 -0
  73. package/examples/github-actions/playwright-e2e.yml +81 -0
  74. package/examples/gitlab-ci/playwright-e2e.yml +71 -0
  75. package/package.json +2 -2
  76. package/skill/playwright-e2e-mcp/SKILL.md +10 -4
  77. package/skill/playwright-e2e-mcp/references/setup.md +7 -2
  78. package/skill/playwright-e2e-mcp/references/tools.md +1 -1
  79. package/dist/utils/pro-client.d.ts +0 -29
  80. package/dist/utils/pro-client.js.map +0 -1
package/README.md CHANGED
@@ -17,6 +17,12 @@ Your Playwright test fails. Your AI finds out why, fixes it, and proves the fix
17
17
 
18
18
  </p>
19
19
 
20
+ <p align="center">
21
+ <img src="https://raw.githubusercontent.com/xsignon-secure/E2E/main/docs/demo.gif" alt="An agent runs the failing checkout test, suggest-fix proposes a locator proven on the page at failure, and the applied fix is re-run and verified green" width="760">
22
+ </p>
23
+
24
+ <p align="center">⭐ <b>If it saves you a debugging session, <a href="https://github.com/xsignon-secure/E2E">a star</a> helps other Playwright users find it.</b></p>
25
+
20
26
  <p align="center">
21
27
  <a href="#getting-started">Getting started</a> ·
22
28
  <a href="#tools">Tools</a> ·
@@ -56,10 +62,12 @@ red at HEAD ─▶ bisect-failure (runs it across git history, names the breakin
56
62
  - **Fixes are proven, not guessed.** Every fix is re-run before it's kept, and undone if the test is still red.
57
63
  - **Honest.** It won't paper over a real bug to make a test pass.
58
64
  - **Works on CI failures too.** Load a CI job's report and traces and get the same diagnosis and fixes.
65
+ - **TypeScript and Python.** Works on `@playwright/test` suites and on `pytest-playwright` ones, with the same failure diagnosis and traces.
59
66
  - **Flakiness with evidence.** Names the flaky test, whether it's a race, shared state or test order, and the seed that reproduces it.
60
- - **Lean.** Finding and fixing a broken locator took about **5,300 tokens** versus about **7,400**
61
- with Playwright MCP plus a shell ([benchmark](#benchmark)).
62
- - **Free and open source.** MIT, no account, no API key, no telemetry. Every tool is free; an optional paid Pro only adds hosted CI history.
67
+ - **Lean.** With the `core` tool set, finding and fixing a broken locator took about **5,500 tokens**
68
+ versus about **7,900** with Playwright MCP plus a shell. All 19 tools add about 16k tokens of
69
+ definitions to every request, so load only the [profiles](#configuration) you use ([benchmark](#benchmark)).
70
+ - **Free and open source.** MIT, no account, no API key, no telemetry. Every tool and feature is free, including the shared team history server you can host yourself.
63
71
 
64
72
  ## 🚀 What only this MCP does
65
73
 
@@ -101,12 +109,16 @@ keeps your suite green.
101
109
  | 🛡️ | "Did that fix cheat?" | Compares the changed tests with git and blocks a fix that passes by deleting assertions or skipping tests. |
102
110
  | 🧊 | "Quarantine this flaky test" | Keeps it running and reported, stops it failing the build, with an owner and an expiry date. |
103
111
  | 🔐 | "Test the page after login" | Works behind sign-in with saved sessions, headers and click/fill steps, in Chromium, Firefox or WebKit, and can record or replay network traffic from a HAR file. |
112
+ | 🗂️ | "Check the page that opens in a new tab" | Follows popups and new tabs with a `switchTab` step and lists every open tab. |
113
+ | 🔒 | "Look, but don't change anything" | `blockWrites` stops POST, PUT, PATCH and DELETE requests from reaching the real backend while the AI inspects a page. |
114
+ | 🐍 | "Run my pytest suite" | Runs `pytest-playwright` projects with the same tools: failures with the test's own file and line, the code frame and the trace. |
104
115
  | 🤖 | "Do it in CI" | A [GitHub Action and `ci` command](#ci-github-action-and-ci-command) post the diagnosis, flaky verdict and fix diffs on your PR. |
105
116
 
106
117
  ## Requirements
107
118
 
108
119
  - Node.js 22 or newer
109
- - A project that uses `@playwright/test`, with a browser installed (`npx playwright install chromium`)
120
+ - A project that uses `@playwright/test`, with a browser installed (`npx playwright install chromium`),
121
+ or a Python project that uses `pytest-playwright` ([see below](#python-projects-pytest-playwright))
110
122
  - Claude Code, Claude Desktop, Cursor, VS Code, Windsurf, Codex, Gemini CLI or any other MCP client
111
123
 
112
124
  ## Getting started
@@ -117,7 +129,7 @@ other servers alone:
117
129
 
118
130
  ```bash
119
131
  npx -y playwright-e2e-mcp init # --client all | cursor,vscode … · --dry-run
120
- npx -y playwright-e2e-mcp doctor # checks Node, Playwright, browsers and client setup
132
+ npx -y playwright-e2e-mcp doctor # checks Node, Playwright, browsers, client setup and updates
121
133
  ```
122
134
 
123
135
  **Or let your agent do it.** Paste this into any coding agent:
@@ -177,6 +189,9 @@ Click [Install in Cursor](https://cursor.com/en/install-mcp?name=playwright-e2e&
177
189
  or go to **Settings → MCP → Add new MCP server** and paste the standard config. For one
178
190
  project only, put it in `.cursor/mcp.json`.
179
191
 
192
+ Only fixing failing tests? [Install the core tools only](https://cursor.com/en/install-mcp?name=playwright-e2e&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsInBsYXl3cmlnaHQtZTJlLW1jcCIsIi0tdG9vbHM9Y29yZSJdfQ==): the seven-tool fix loop
193
+ (`--tools=core`), about 5k tokens of tool definitions instead of 16k.
194
+
180
195
  </details>
181
196
 
182
197
  <details>
@@ -258,8 +273,8 @@ Running and fixing your own tests needs your project, so use the local install f
258
273
  | --- | --- |
259
274
  | Skill only, any agent | `npx skills add xsignon-secure/E2E` |
260
275
  | MCP Registry | `io.github.xsignon-secure/E2E` ([listing](https://registry.modelcontextprotocol.io/)); registry-aware clients find it there |
261
- | Straight from GitHub, no npm | `npx -y github:xsignon-secure/E2E#v0.7.0` (pin a release tag) |
262
- | Release tarball | `npm install -D https://github.com/xsignon-secure/E2E/releases/download/v0.7.0/playwright-e2e-mcp-0.7.0.tgz` |
276
+ | Straight from GitHub, no npm | `npx -y github:xsignon-secure/E2E#v0.9.0` (pin a release tag) |
277
+ | Release tarball | `npm install -D https://github.com/xsignon-secure/E2E/releases/download/v0.9.0/playwright-e2e-mcp-0.9.0.tgz` |
263
278
  | Docker | `docker run -i --rm -v "$PWD:/work" ghcr.io/xsignon-secure/playwright-e2e-mcp` (published on each release; see [Development](docs/development.md#docker)) |
264
279
  | Local checkout | `"command": "node", "args": ["/path/to/E2E/dist/index.js"]` |
265
280
 
@@ -276,6 +291,79 @@ Run my Playwright tests and fix whatever fails.
276
291
  Your agent should run the suite, read the failure, and propose a fix it has re-run. To check the
277
292
  setup without your own tests, ask it to run `examples/sample-test.spec.ts` from this repo.
278
293
 
294
+ ### Updating
295
+
296
+ How you get a new release depends on how you installed it:
297
+
298
+ | Installed with | To update |
299
+ | --- | --- |
300
+ | `npx -y playwright-e2e-mcp` (the setup above, and what `init` writes) | Restart your MCP client. npx (npm 10, which comes with Node 22) asks npm for the latest version on each launch and fetches it. |
301
+ | `npm install -D playwright-e2e-mcp` in the project | `npm install -D playwright-e2e-mcp@latest` |
302
+ | `npm install -g playwright-e2e-mcp` | `npm install -g playwright-e2e-mcp@latest` |
303
+ | GitHub Action `uses: xsignon-secure/E2E@v0.x.y` | Change the tag (Dependabot's `github-actions` updates do it for you) |
304
+ | Docker | `docker pull ghcr.io/xsignon-secure/playwright-e2e-mcp:latest` |
305
+ | Claude Desktop bundle (`.mcpb`) | Download the new bundle from the [latest release](https://github.com/xsignon-secure/E2E/releases/latest) and open it |
306
+ | Git clone | `git pull && npm ci` |
307
+ | Agent skill copied by `init` or `npx skills add` | Run the same command again |
308
+
309
+ `npx -y playwright-e2e-mcp doctor` tells you whether a newer version is out and prints the
310
+ command for your setup. Upgrade notes for each release are on the
311
+ [releases page](https://github.com/xsignon-secure/E2E/releases).
312
+
313
+ ## Python projects (pytest-playwright)
314
+
315
+ The same server works on Python suites. When the project has no Node Playwright but has a
316
+ `pytest.ini`, a `[tool.pytest…]` table in `pyproject.toml`, `setup.cfg` / `tox.ini` pytest
317
+ settings or a `conftest.py`, the tools run `python -m pytest` instead:
318
+
319
+ - **`run-test`** runs the suite, a file, `tests/test_cart.py::TestCart::test_add` or
320
+ `tests/test_cart.py:42` (the test at that line). `grep` becomes `-k`, `browser` becomes
321
+ `--browser`, `retries` uses pytest-rerunfailures. Failures that finished are kept even when
322
+ the run is killed.
323
+ - **`get-failure`** shows the message, the code frame, expected vs actual and, from the trace
324
+ pytest-playwright keeps (`--tracing retain-on-failure` is added for you), the failed action,
325
+ the DOM at failure, network and console.
326
+ - **`list-tests`**, **`analyze-history`**, **`quarantine`** and the **`ci`** command work as for Node.
327
+ - Not yet for Python: **`suggest-fix`** points at the DOM at failure but does not patch `.py`
328
+ files, **`diagnose-flaky`** says so and suggests re-running, and **`audit-tests`**,
329
+ **`check-test-change`** and **`generate-e2e-test`** read and write TypeScript/JavaScript specs
330
+ only. The page tools (`inspect-page`, `validate-selector`, …) launch the browser with Node
331
+ Playwright, so they need `@playwright/test` installed in the project.
332
+
333
+ Results come from a small pytest plugin the server loads with `-p` from its temp folder; nothing
334
+ is installed in your project. It uses your Python: `PW_MCP_PYTHON`, else `.venv`, `venv` or `env`
335
+ in the project, else `python3` / `python`.
336
+
337
+ ```bash
338
+ pip install pytest-playwright && playwright install chromium
339
+ ```
340
+
341
+ ## What's new in 0.9
342
+
343
+ - **Everything is free, including team history.** The CI history service that used to be a
344
+ paid add-on is now in this repo as a [self-hosted history server](history-server/README.md)
345
+ (MIT): one `docker run`, plain Node, or a free Vercel or Azure account. You hand out the
346
+ tokens; there is no account or billing anywhere.
347
+ - **New names:** `PW_MCP_HISTORY_URL` / `PW_MCP_HISTORY_TOKEN` and the Action's `history-url` /
348
+ `history-token`. The old `PW_MCP_PRO_*`, `pro-url` and `pro-key` names keep working.
349
+
350
+ ## What's new in 0.8
351
+
352
+ - **Python suites:** projects that use `pytest-playwright` work with `run-test`, `get-failure`
353
+ and `list-tests`, traces included ([details](#python-projects-pytest-playwright)).
354
+ - **Popups and new tabs:** a `switchTab` step follows the page into a popup or new tab, and
355
+ results list every open tab.
356
+ - **Look without changing anything:** `blockWrites` (or `PW_MCP_BLOCK_WRITES=1`) stops the page
357
+ tools from sending POST, PUT, PATCH or DELETE requests to a real backend.
358
+ - **Crashed runs still report:** when Playwright dies before writing its report, the failures
359
+ that finished are kept and the run is marked partial.
360
+ - **Stricter heal guard:** an assertion inside a `try` whose `catch` swallows the error is
361
+ blocked, and a web-first assertion without `await` is flagged.
362
+ - **MCP 2026-07-28:** the new stateless protocol revision, cache hints, a server icon, the agent
363
+ skill served over the Skills extension, and a Server Card for discovery.
364
+ - **Update check:** `doctor` says when a newer version is out and how to update
365
+ ([Updating](#updating)).
366
+
279
367
  ## What's new in 0.7
280
368
 
281
369
  - **Log in once, safely:** `save-login` signs in (2FA codes included) with secrets read from the
@@ -333,8 +421,8 @@ Every argument and example output is in the **[tool reference](docs/tools.md)**.
333
421
  MCP tool annotations (`readOnlyHint`, `destructiveHint`, …), so clients can show accurate safety
334
422
  prompts.
335
423
 
336
- **Only need the fix loop?** `--tools=core` (or `PW_MCP_TOOLS=core`) exposes six tools and cuts the
337
- tool-definition context by about three quarters. Other profiles: `triage`, `inspect`, `author`.
424
+ **Only need the fix loop?** `--tools=core` (or `PW_MCP_TOOLS=core`) exposes seven tools and cuts the
425
+ tool-definition context by about three quarters ([one-click core install for Cursor](https://cursor.com/en/install-mcp?name=playwright-e2e&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsInBsYXl3cmlnaHQtZTJlLW1jcCIsIi0tdG9vbHM9Y29yZSJdfQ==)). Other profiles: `triage`, `inspect`, `author`.
338
426
 
339
427
  <details>
340
428
  <summary><b>Typical workflow</b></summary>
@@ -393,15 +481,25 @@ steps:
393
481
  - uses: actions/setup-node@v6
394
482
  with: { node-version: 24 }
395
483
  - run: npm ci && npx playwright install --with-deps chromium
396
- - uses: xsignon-secure/E2E@v0.7.0
484
+ - uses: xsignon-secure/E2E@v0.9.0
397
485
  with:
398
486
  flaky-runs: 3 # 0 skips the flaky verdict
399
487
  suggest: 2 # suggest-fix diffs for the first 2 failures
400
488
  # args: --browser chromium tests/checkout
401
489
  ```
402
490
 
491
+ A complete, ready-to-copy workflow is available in [`examples/github-actions/playwright-e2e.yml`](examples/github-actions/playwright-e2e.yml), including artifact upload and commented options for `guard: true` and a shared history server.
492
+
493
+ **GitLab CI:** [`examples/gitlab-ci/playwright-e2e.yml`](examples/gitlab-ci/playwright-e2e.yml) runs the heal guard on merge requests, the same `ci` diagnosis, and posts the report as a merge request comment when you give it a project access token. Any other CI (Jenkins, CircleCI, AWS CodeBuild) works the same way: run `npx -y playwright-e2e-mcp ci --output e2e-report.md` and keep the file.
494
+
495
+ **Team history across machines (free, self-hosted):** CI runs normally stay on the CI machine.
496
+ Run the [history server](history-server/README.md) from this repo (one `docker run`, or a free
497
+ Vercel, Azure or any Node host), give the Action `history-url` and `history-token`, and every
498
+ CI run lands in one history that `analyze-history` on your laptop and the server's dashboard
499
+ both read. No account, no billing; you hand out the tokens.
500
+
403
501
  Inputs: `project-root`, `args`, `flaky-runs`, `suggest`, `comment`, `review`,
404
- `verify-fixes`, `guard`, `pro-key`, `pro-url`, `fail-on-failure`, `version`, `github-token`. Outputs: `exit-code`,
502
+ `verify-fixes`, `guard`, `history-token`, `history-url`, `fail-on-failure`, `version`, `github-token`. Outputs: `exit-code`,
405
503
  `report`, `guard`.
406
504
 
407
505
  Quarantined tests (`playwright-quarantine.json`, see [`quarantine`](docs/tools.md#quarantine))
@@ -423,12 +521,17 @@ npx -y playwright-e2e-mcp guard --base origin/main # exit 1 on BLOCK; --strict
423
521
  | Environment variable | Default | Purpose |
424
522
  | --- | --- | --- |
425
523
  | `PW_MCP_PROJECT_ROOT` | server cwd | Default project root for every tool |
426
- | `PW_MCP_TOOLS` | all | Which tools to expose, as tool names and/or profiles, comma separated (same as the `--tools=` flag). Profiles: `core` (run, status, failure, fix, flaky, heal guard, list), `triage` (run, status, failure, CI report, flaky, history, test audit, bisect, quarantine, heal guard, list), `inspect` (page, selector, accessibility, performance, visual, login), `author` (list, page, selector, generate, run, login, heal guard). All nineteen tool definitions cost about 14k tokens of context per request; `core` costs about 4k (11k and 2.6k with `PW_MCP_OUTPUT_SCHEMAS=0`) |
524
+ | `PW_MCP_TOOLS` | all | Which tools to expose, as tool names and/or profiles, comma separated (same as the `--tools=` flag). Profiles: `core` (run, status, failure, fix, flaky, heal guard, list), `triage` (run, status, failure, CI report, flaky, history, test audit, bisect, quarantine, heal guard, list), `inspect` (page, selector, accessibility, performance, visual, login), `author` (list, page, selector, generate, run, login, heal guard). All nineteen tool definitions cost about 16k tokens of context per request; `core` costs about 5k (12k and 2.6k with `PW_MCP_OUTPUT_SCHEMAS=0`) |
427
525
  | `PW_MCP_OUTPUT_SCHEMAS` | on | `0` leaves the output schemas out of the tool list to save context. Results still carry `structuredContent` (see [Structured results](docs/tools.md#structured-results)) |
526
+ | `PW_MCP_PROTOCOL` | both | `legacy` stops offering the stateless 2026-07-28 MCP revision, for a client that trips over it. By default 2026 clients get it and 2025 clients get the old handshake |
527
+ | `PW_MCP_NO_UPDATE_CHECK` | off | `1` stops `doctor` from asking npm whether a newer version is out (same as `doctor --offline`) |
528
+ | `PW_MCP_SKILLS` | on | `0` stops serving the bundled agent skill over the MCP Skills extension (`skill://playwright-e2e-mcp/SKILL.md`) |
428
529
  | `PW_MCP_STORAGE_STATE` | — | Default `storageState` file (inside the project) for the page tools |
530
+ | `PW_MCP_PYTHON` | project venv, then `python3` | The Python that runs a pytest-playwright suite |
531
+ | `PW_MCP_BLOCK_WRITES` | off | `1` makes the page tools abort POST, PUT, PATCH and DELETE requests that no mock answers (same as `blockWrites: true`), so steps run against a real environment cannot change its data |
429
532
  | `PW_MCP_SHUFFLE_SEEDS` | random | Comma-separated seeds for `diagnose-flaky`'s `order` pass, to replay the orders a diagnosis reported |
430
533
  | `PW_MCP_LOGIN_ENV` | — | Extra environment variables `save-login` may type through `{{env:NAME}}`, comma separated. Without it only `E2E_*`, `TEST_*`, `PW_*`, `PLAYWRIGHT_*` and `LOGIN_*` are allowed |
431
- | `PW_MCP_PRO_KEY` / `PW_MCP_PRO_URL` | — | Optional, paid: Pro key and Pro Cloud address. CI runs are uploaded with `playwright-e2e-mcp upload` (or the Action's `pro-key` / `pro-url` inputs) and `analyze-history` merges them with local runs. Unset (the default), nothing is ever sent anywhere |
534
+ | `PW_MCP_HISTORY_URL` / `PW_MCP_HISTORY_TOKEN` | — | Optional: your team's [history server](history-server/README.md) (free, self-hosted) and a token from it. CI runs are uploaded with `playwright-e2e-mcp upload` (or the Action's `history-url` / `history-token` inputs) and `analyze-history` merges them with local runs. Unset (the default), nothing is ever sent anywhere. The 0.7/0.8 names `PW_MCP_PRO_KEY` / `PW_MCP_PRO_URL` still work |
432
535
  | `PW_MCP_HISTORY` | on | `0` stops recording runs to `.playwright-e2e-mcp/history.jsonl` |
433
536
  | `PW_MCP_ALLOWED_ROOTS` | — | Extra directories a caller may pass as `projectRoot` (`:`-separated, `;` on Windows). Anything outside these and the default root is rejected |
434
537
  | `PW_MCP_HTTP_TOKEN` | — | HTTP bridge only: bearer token that unlocks all tools: 16+ characters, 32+ recommended (see [Hosted endpoint](docs/hosted-endpoint.md)) |
@@ -461,16 +564,21 @@ on a storefront page and fixes it two ways: with this server (`run-test` → `su
461
564
  apply) and with Playwright MCP plus a shell (`playwright test`, `browser_navigate` +
462
565
  `browser_snapshot`, edit, re-run). Latest result ([full output](bench/RESULTS.md)):
463
566
 
464
- | Step | playwright-e2e-mcp | Playwright MCP + shell |
465
- | --- | ---: | ---: |
466
- | Tool definitions (sent with every request) | 4,565 | 4,726 |
467
- | Run the failing test | 246 | 325 |
468
- | Find the element / propose the fix | 260 | 2,286 |
469
- | Apply + verify (re-run) | 257 | 34 |
470
- | **Total for one fix** | 5,328 | 7,371 |
471
-
472
- Tokens are characters ÷ 4. The Playwright MCP route is a lower bound: it assumes the agent
473
- picks the right locator from the snapshot on the first try, which the server does for it here.
567
+ | Step | playwright-e2e-mcp (`core` tools) | playwright-e2e-mcp (all tools) | Playwright MCP + shell |
568
+ | --- | ---: | ---: | ---: |
569
+ | Tool definitions (sent with every request) | 4,826 | 16,121 | 5,225 |
570
+ | Run the failing test | 244 | 244 | 323 |
571
+ | Find the element / propose the fix | 232 | 232 | 2,286 |
572
+ | Apply + verify (re-run) | 230 | 230 | 34 |
573
+ | **Total for one fix** | 5,532 | 16,827 | 7,868 |
574
+
575
+ Tokens are characters ÷ 4. The work itself (run, diagnose, fix, verify) takes about 700 tokens
576
+ here versus about 2,600 with Playwright MCP, but tool definitions are sent with every request:
577
+ with all 19 tools loaded they outweigh that saving, so set `PW_MCP_TOOLS=core` (or another
578
+ profile) when you only fix failing tests. The Playwright MCP route is a lower bound: it assumes
579
+ the agent picks the right locator from the snapshot on the first try, which the server does for
580
+ it here. Run 2026-10-28 with 0.7.0 and Playwright 1.64.1; re-run with
581
+ `npm run build && node bench/token-benchmark.mjs`.
474
582
 
475
583
  ## Demo
476
584
 
@@ -481,9 +589,9 @@ A real `run-test` call served over stdio by `npx -y playwright-e2e-mcp` against
481
589
 
482
590
  ## Free and open source
483
591
 
484
- - **MIT licensed.** Use it, change it, ship it in commercial work; no fees, no feature held back. The optional Pro plan adds a hosted service (CI run history across machines), not tools; nothing here needs it.
592
+ - **MIT licensed.** Use it, change it, ship it in commercial work; no fees, no paid tier, no feature held back. That includes the [team history server](history-server/README.md) that collects CI runs from every machine: it is in this repo, and you host it yourself for free.
485
593
  - **No account, no API key, no sign-up.** `npx -y playwright-e2e-mcp init` is the whole setup.
486
- - **No telemetry.** It never phones home; your tests, traces and run history stay on your machine unless you set a Pro key and upload them.
594
+ - **No telemetry.** It never phones home; your tests, traces and run history stay on your machine unless you point it at your own history server and upload them. The only other request is `doctor` asking npm for the latest version number when you run it (`--offline` or `PW_MCP_NO_UPDATE_CHECK=1` skips it).
487
595
  - **Free dependencies only:** the MCP SDK (Apache-2.0), zod (MIT), axe-core (MPL-2.0) and the Playwright your project already has (Apache-2.0).
488
596
  - **Free to host yourself**, too: the HTTP bridge deploys to a free Vercel account (see [Hosted endpoint](docs/hosted-endpoint.md)).
489
597
 
@@ -495,6 +603,7 @@ browsing and this server for running, diagnosing and fixing the suite. They work
495
603
 
496
604
  - [Tool reference](docs/tools.md): every argument, example outputs, edge cases handled
497
605
  - [Hosted endpoint](docs/hosted-endpoint.md): the HTTP bridge for ChatGPT and claude.ai connectors
606
+ - [Architecture](ARCHITECTURE.md): how the server is built and the design decisions behind it
498
607
  - [Security](SECURITY.md): the security model and how to report a vulnerability
499
608
  - [Development](docs/development.md): building, tests, Docker, signing and releasing
500
609
  - [Contributing](CONTRIBUTING.md) · [Code of conduct](CODE_OF_CONDUCT.md)
@@ -9,6 +9,7 @@
9
9
  * Exit codes: 0 nothing failed (warnings allowed), 1 a check failed,
10
10
  * 2 bad arguments.
11
11
  */
12
+ import { type UpdateCheckOptions } from '../utils/update-check.js';
12
13
  export declare const DOCTOR_USAGE: string;
13
14
  /** Oldest Node major the server supports. */
14
15
  export declare const MIN_NODE_MAJOR = 22;
@@ -26,6 +27,16 @@ export interface DoctorReport {
26
27
  checks: DoctorCheck[];
27
28
  ok: boolean;
28
29
  }
29
- export declare function runDoctorChecks(projectRoot: string, home?: string): Promise<DoctorReport>;
30
+ /**
31
+ * The running version against the latest on npm. A newer release is a
32
+ * warning with the upgrade commands; an unreachable registry is not a
33
+ * problem with the setup, so it stays `ok` and says it could not check.
34
+ */
35
+ export declare function versionCheck(options?: UpdateCheckOptions): Promise<DoctorCheck>;
36
+ export interface DoctorOptions {
37
+ /** Options for the npm version check; `{ offline: true }` skips it. */
38
+ update?: UpdateCheckOptions;
39
+ }
40
+ export declare function runDoctorChecks(projectRoot: string, home?: string, options?: DoctorOptions): Promise<DoctorReport>;
30
41
  export declare function renderDoctorReport(report: DoctorReport): string;
31
42
  export declare function runDoctor(argv: string[], out?: (text: string) => void): Promise<number>;
@@ -17,6 +17,7 @@ import { parseArgs } from 'node:util';
17
17
  import { detectProject, findTestFiles } from '../utils/project-detector.js';
18
18
  import { SERVER_VERSION } from '../server.js';
19
19
  import { SERVER_NAME, SKILL_NAME } from './init.js';
20
+ import { checkForUpdate, UPGRADE_HINT } from '../utils/update-check.js';
20
21
  export const DOCTOR_USAGE = [
21
22
  'Usage: playwright-e2e-mcp doctor [options]',
22
23
  '',
@@ -25,8 +26,11 @@ export const DOCTOR_USAGE = [
25
26
  '',
26
27
  ' --project-root <dir> project directory (default: cwd)',
27
28
  ' --json print the checks as JSON',
29
+ ' --offline skip asking npm whether a newer version exists',
30
+ ' (also PW_MCP_NO_UPDATE_CHECK=1)',
28
31
  '',
29
32
  ].join('\n');
33
+ const REPO_URL = 'https://github.com/xsignon-secure/E2E';
30
34
  /** Oldest Node major the server supports. */
31
35
  export const MIN_NODE_MAJOR = 22;
32
36
  /** Where each client keeps its project-scoped MCP config (see init). */
@@ -100,8 +104,31 @@ function browserChecks(root, playwrightPackage) {
100
104
  }
101
105
  return [{ name: 'Browsers', status: 'ok', detail: `installed: ${installed.join(', ')}${missing.length ? ` (not installed: ${missing.join(', ')})` : ''}` }];
102
106
  }
103
- export async function runDoctorChecks(projectRoot, home = os.homedir()) {
104
- const checks = [nodeCheck()];
107
+ /**
108
+ * The running version against the latest on npm. A newer release is a
109
+ * warning with the upgrade commands; an unreachable registry is not a
110
+ * problem with the setup, so it stays `ok` and says it could not check.
111
+ */
112
+ export async function versionCheck(options = {}) {
113
+ const status = await checkForUpdate(SERVER_VERSION, options);
114
+ switch (status.state) {
115
+ case 'outdated':
116
+ return {
117
+ name: 'Version',
118
+ status: 'warn',
119
+ detail: `${status.current} is running; ${status.latest} is out (release notes: ${REPO_URL}/releases/tag/v${status.latest})`,
120
+ fix: UPGRADE_HINT,
121
+ };
122
+ case 'current':
123
+ return { name: 'Version', status: 'ok', detail: `${status.current} (latest)` };
124
+ case 'ahead':
125
+ return { name: 'Version', status: 'ok', detail: `${status.current} (newer than npm's ${status.latest})` };
126
+ default:
127
+ return { name: 'Version', status: 'ok', detail: `${status.current} (did not check for updates: ${status.reason})` };
128
+ }
129
+ }
130
+ export async function runDoctorChecks(projectRoot, home = os.homedir(), options = {}) {
131
+ const checks = [nodeCheck(), await versionCheck(options.update)];
105
132
  const detection = await detectProject(projectRoot);
106
133
  const root = detection.root;
107
134
  if (!detection.configPath) {
@@ -178,6 +205,9 @@ export function renderDoctorReport(report) {
178
205
  : warned
179
206
  ? `Ready, with ${warned} suggestion${warned === 1 ? '' : 's'} above.`
180
207
  : 'Everything is ready.');
208
+ // Only on a working setup: asking for a star while the tools can't run is no help to anyone.
209
+ if (!failed)
210
+ lines.push('', `Like it? A star helps other Playwright users find it: ${REPO_URL}`);
181
211
  return `${lines.join('\n')}\n`;
182
212
  }
183
213
  export async function runDoctor(argv, out = (t) => process.stdout.write(t)) {
@@ -186,14 +216,14 @@ export async function runDoctor(argv, out = (t) => process.stdout.write(t)) {
186
216
  ({ values } = parseArgs({
187
217
  args: argv,
188
218
  strict: true,
189
- options: { 'project-root': { type: 'string' }, json: { type: 'boolean' } },
219
+ options: { 'project-root': { type: 'string' }, json: { type: 'boolean' }, offline: { type: 'boolean' } },
190
220
  }));
191
221
  }
192
222
  catch (err) {
193
223
  out(`doctor: ${err.message}\n\n${DOCTOR_USAGE}`);
194
224
  return 2;
195
225
  }
196
- const report = await runDoctorChecks(path.resolve(values['project-root'] ?? '.'));
226
+ const report = await runDoctorChecks(path.resolve(values['project-root'] ?? '.'), os.homedir(), { update: { offline: values.offline } });
197
227
  out(values.json ? `${JSON.stringify(report, null, 2)}\n` : renderDoctorReport(report));
198
228
  return report.ok ? 0 : 1;
199
229
  }
@@ -1 +1 @@
1
- {"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../src/cli/doctor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEpD,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,4CAA4C;IAC5C,EAAE;IACF,8EAA8E;IAC9E,qEAAqE;IACrE,EAAE;IACF,2DAA2D;IAC3D,mDAAmD;IACnD,EAAE;CACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb,6CAA6C;AAC7C,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,CAAC;AAmBjC,wEAAwE;AACxE,SAAS,aAAa,CAAC,IAAY,EAAE,IAAY;IAC/C,OAAO;QACL,EAAE,MAAM,EAAE,aAAa,EAAE,IAA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ro
3
- * Cloud (PW_MCP_PRO_KEY + PW_MCP_PRO_URL), so CI runs from every machine
4
- * end up in one history that analyze-history and the dashboard read.
2
+ * `playwright-e2e-mcp upload`: send the project's recorded runs to the
3
+ * team's history server (PW_MCP_HISTORY_TOKEN + PW_MCP_HISTORY_URL), so CI
4
+ * runs from every machine end up in one history that analyze-history and
5
+ * the dashboard read.
5
6
  *
6
7
  * Only runs newer than the last upload are sent (remembered in
7
- * .playwright-e2e-mcp/pro-upload.json); the service also ignores
8
+ * .playwright-e2e-mcp/history-upload.json); the server also ignores
8
9
  * duplicates, so a repeated upload is harmless.
9
10
  *
10
11
  * Exit codes: 0 uploaded (or nothing new), 1 the upload failed,
11
- * 2 bad arguments or Pro not configured.
12
+ * 2 bad arguments or no history server configured.
12
13
  */
13
14
  export declare const UPLOAD_USAGE: string;
14
15
  export declare function runUpload(argv: string[]): Promise<number>;
@@ -1,33 +1,37 @@
1
1
  /**
2
- * `playwright-e2e-mcp upload`: send the project's recorded runs to Pro
3
- * Cloud (PW_MCP_PRO_KEY + PW_MCP_PRO_URL), so CI runs from every machine
4
- * end up in one history that analyze-history and the dashboard read.
2
+ * `playwright-e2e-mcp upload`: send the project's recorded runs to the
3
+ * team's history server (PW_MCP_HISTORY_TOKEN + PW_MCP_HISTORY_URL), so CI
4
+ * runs from every machine end up in one history that analyze-history and
5
+ * the dashboard read.
5
6
  *
6
7
  * Only runs newer than the last upload are sent (remembered in
7
- * .playwright-e2e-mcp/pro-upload.json); the service also ignores
8
+ * .playwright-e2e-mcp/history-upload.json); the server also ignores
8
9
  * duplicates, so a repeated upload is harmless.
9
10
  *
10
11
  * Exit codes: 0 uploaded (or nothing new), 1 the upload failed,
11
- * 2 bad arguments or Pro not configured.
12
+ * 2 bad arguments or no history server configured.
12
13
  */
13
14
  import { readFile, writeFile } from 'node:fs/promises';
14
15
  import path from 'node:path';
15
16
  import { parseArgs } from 'node:util';
16
17
  import { joinProjectPath, toNativePath } from '../utils/path-utils.js';
17
- import { proProjectName, proSettings, uploadRuns } from '../utils/pro-client.js';
18
+ import { historyProjectName, historySettings, uploadRuns } from '../utils/history-client.js';
18
19
  import { HISTORY_DIR, readHistory } from '../utils/run-history.js';
19
20
  export const UPLOAD_USAGE = [
20
21
  'Usage: playwright-e2e-mcp upload [options]',
21
22
  '',
22
- 'Uploads recorded runs to Pro Cloud. Needs PW_MCP_PRO_KEY and PW_MCP_PRO_URL.',
23
+ "Uploads recorded runs to your team's history server (history-server/ in the",
24
+ 'repo, free to self-host). Needs PW_MCP_HISTORY_TOKEN and PW_MCP_HISTORY_URL.',
23
25
  '',
24
- ' --project <name> name to file runs under (default: PW_MCP_PRO_PROJECT,',
26
+ ' --project <name> name to file runs under (default: PW_MCP_HISTORY_PROJECT,',
25
27
  ' the GitHub repository, or the folder name)',
26
28
  ' --project-root <dir> project directory (default: cwd)',
27
29
  ' --all send every recorded run, not only new ones',
28
30
  '',
29
31
  ].join('\n');
30
- const MARKER = 'pro-upload.json';
32
+ const MARKER = 'history-upload.json';
33
+ /** The marker's name in 0.7 and 0.8, still read so an upgrade does not resend everything. */
34
+ const OLD_MARKER = 'pro-upload.json';
31
35
  export async function runUpload(argv) {
32
36
  let values;
33
37
  try {
@@ -43,24 +47,23 @@ export async function runUpload(argv) {
43
47
  }
44
48
  let settings;
45
49
  try {
46
- settings = proSettings();
50
+ settings = historySettings();
47
51
  }
48
52
  catch (error) {
49
53
  process.stderr.write(`upload: ${error.message}\n`);
50
54
  return 2;
51
55
  }
52
56
  if (!settings) {
53
- process.stderr.write('upload: PW_MCP_PRO_KEY is not set. Pro Cloud is optional; without a key nothing is sent anywhere.\n');
57
+ process.stderr.write('upload: PW_MCP_HISTORY_TOKEN is not set. A shared history server is optional; without one nothing is sent anywhere.\n');
54
58
  return 2;
55
59
  }
56
60
  const root = path.resolve(values['project-root'] ?? process.cwd()).replace(/\\/g, '/');
57
- const project = values.project ?? (await proProjectName(root));
61
+ const project = values.project ?? (await historyProjectName(root));
58
62
  const marker = joinProjectPath(root, `${HISTORY_DIR}/${MARKER}`);
59
- const last = values.all
60
- ? ''
61
- : await readFile(toNativePath(marker), 'utf8')
62
- .then((text) => String(JSON.parse(text).lastAt ?? ''))
63
- .catch(() => '');
63
+ const readMarker = (file) => readFile(toNativePath(file), 'utf8')
64
+ .then((text) => String(JSON.parse(text).lastAt ?? ''))
65
+ .catch(() => '');
66
+ const last = values.all ? '' : (await readMarker(marker)) || (await readMarker(joinProjectPath(root, `${HISTORY_DIR}/${OLD_MARKER}`)));
64
67
  const runs = (await readHistory(root, 500)).filter((entry) => entry.at > last);
65
68
  if (runs.length === 0) {
66
69
  process.stdout.write(`Nothing new to upload for ${project}.\n`);
@@ -1 +1 @@
1
- {"version":3,"file":"upload.js","sourceRoot":"","sources":["../../src/cli/upload.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACjF,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEnE,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,4CAA4C;IAC5C,EAAE;IACF,8EAA8E;IAC9E,EAAE;IACF,gFAAgF;IAChF,qEAAqE;IACrE,2DAA2D;IAC3D,qEAAqE;IACrE,EAAE;CACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb,MAAM,MAAM,GAAG,iBAAiB,CAAC;AAEjC,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,IAAc;IAC5C,IAAI,MAAoE,CAAC;IACzE,IAAI,CAAC;QACH,CAAC,EAAE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AAG,KAAkC,CAAC;QAC/C,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;QACnF,OAAO,CAAC,CAAC;IACX,CAAC;AACH,CAAC"}
@@ -0,0 +1,61 @@
1
+ /**
2
+ * Who this server is and how clients find it, for the 2026-07-28 MCP
3
+ * revision and its official extensions:
4
+ *
5
+ * - `SERVER_IDENTITY`: the `serverInfo` every result and `server/discover`
6
+ * carry (title, description, website, icons), so clients can show the
7
+ * server properly instead of a bare package name.
8
+ * - `CACHE_HINTS`: `ttlMs` / `cacheScope` for the cacheable list results
9
+ * (SEP-2549). The tool, prompt and resource lists only change when the
10
+ * package is upgraded or restarted with other options, so clients may
11
+ * keep them for an hour instead of asking again on every turn.
12
+ * - `buildServerCard` / `buildAiCatalog`: the Server Card extension
13
+ * (SEP-2127) for the HTTP bridge, served at `<mcp-url>/server-card` and
14
+ * linked from `/.well-known/ai-catalog.json`, so registries and IDEs can
15
+ * discover and configure the hosted endpoint before connecting.
16
+ *
17
+ * The values here must agree with server.json (the MCP Registry entry) and
18
+ * with what `server/discover` returns; a test checks both.
19
+ */
20
+ import type { CacheHint } from '@modelcontextprotocol/server';
21
+ /** The MCP Registry name (package.json `mcpName`, server.json `name`). */
22
+ export declare const REGISTRY_NAME = "io.github.xsignon-secure/E2E";
23
+ export declare const REPOSITORY_URL = "https://github.com/xsignon-secure/E2E";
24
+ /** Display metadata shared by serverInfo, the Server Card and server.json. */
25
+ export declare const SERVER_IDENTITY: {
26
+ readonly title: 'Playwright E2E MCP';
27
+ /** At most 100 characters: the Server Card and registry limit. */
28
+ readonly description: 'Diagnose and fix Playwright tests (TS, pytest): CI reports, traces, verified fixes, flaky verdicts.';
29
+ readonly websiteUrl: "https://github.com/xsignon-secure/E2E#readme";
30
+ readonly icons: readonly [{
31
+ readonly src: 'https://raw.githubusercontent.com/xsignon-secure/E2E/main/docs/logo.png';
32
+ readonly mimeType: 'image/png';
33
+ readonly sizes: readonly ['400x400'];
34
+ }];
35
+ };
36
+ /** One hour: list results only change on an upgrade or a restart. */
37
+ export declare const LIST_TTL_MS: number;
38
+ /**
39
+ * Cache hints for the cacheable results. `private` because the bridge serves
40
+ * a different tool list with and without a token, so a shared cache must not
41
+ * hand one caller's list to another.
42
+ */
43
+ export declare const CACHE_HINTS: Record<'tools/list' | 'prompts/list' | 'resources/list' | 'resources/templates/list' | 'server/discover', CacheHint>;
44
+ export declare const SERVER_CARD_SCHEMA = "https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json";
45
+ export declare const SERVER_CARD_MEDIA_TYPE = "application/mcp-server-card+json";
46
+ export declare const AI_CATALOG_MEDIA_TYPE = "application/ai-catalog+json";
47
+ export interface ServerCardOptions {
48
+ /** Absolute URL of the streamable-HTTP endpoint, e.g. https://host/api/mcp. */
49
+ endpoint: string;
50
+ version: string;
51
+ /** Whether the endpoint wants `Authorization: Bearer <token>` for the full tool set. */
52
+ tokenProtected: boolean;
53
+ /** The protocol versions the endpoint serves (what server/discover reports). */
54
+ protocolVersions: string[];
55
+ }
56
+ /** The Server Card (SEP-2127) for one hosted endpoint. Public metadata only. */
57
+ export declare function buildServerCard(options: ServerCardOptions): Record<string, unknown>;
58
+ /** The AI Catalog (`/.well-known/ai-catalog.json`) pointing at the card. */
59
+ export declare function buildAiCatalog(cardUrl: string, host: string): Record<string, unknown>;
60
+ /** CORS headers the Server Card discovery spec requires on both documents. */
61
+ export declare const DISCOVERY_CORS_HEADERS: Record<string, string>;