Skip to content

fix(mcp): say how to install Chromium when it is missing - #287

Merged
nucliweb merged 2 commits into
mainfrom
feat/mcp-missing-browser
Oct 21, 2026
Merged

nucliweb merged 2 commits into
mainfrom
feat/mcp-missing-browser

Conversation

@nucliweb

Copy link
Copy Markdown
Owner

Summary

Chapter 7a of the MCP server, before its publication: the CLI as a user installs it, with npx -y webperf-snippets mcp. npx installs the package and its peer playwright, not Chromium, so the first call of an agent failed with the error of Playwright.

  • run_snippet, run_workflow, open_page and the CLI answer Chromium for Playwright is not installed. Install it once with: npx playwright install chromium (cli/src/browser.js). The CLI prints it without a stack and exits with 1.
  • The sessions no longer keep a failed launch: after the install, open_page works without restarting the client.
  • npm run smoke:cli-package packs the CLI as the publish workflow does, installs it in an empty folder and checks the MCP server over stdio without Chromium and after installing it. It needs the network, so it runs by hand before a release (docs/RELEASING.md).

Test plan

  • cli/tests/e2e/missing-browser.test.js: the three tools over stdio and the CLI with an empty PLAYWRIGHT_BROWSERS_PATH, and open_page after a failed launch; the 5 cases failed before the change, locally
  • CLI e2e 512/512, unit 141/141, lint, locally
  • npm run smoke:cli-package, locally: npm installed playwright 1.64.1; without Chromium, list_snippets lists 56 snippets and run_snippet gives the install command; after npx playwright install chromium, run_snippet measures LCP (40 ms, ok)
  • CI

…it again once it is

npx installs the CLI and its peer playwright, not the browser, which Playwright downloads apart. Without it, run_snippet answered with the first line of the error of Playwright, the path of a missing executable, and lost its advice, which installs every browser. The tools that open Chromium (run_snippet, run_workflow, open_page) and the CLI say instead how to install the one browser the CLI uses: an error of the tool the model can act on, by running the command and calling again.

The sessions of the server kept the promise of the launch, also when it failed, so open_page kept failing after the install until the client restarted the server. A server with state keeps what it has, not a failure: the next page launches again.
…talls them

npm run smoke:cli-package packs cli/ with the snippets as the publish workflow does, installs the tarball in an empty folder and talks to webperf-snippets mcp over stdio: list_snippets answers without Chromium, run_snippet says how to install it, and after npx playwright install chromium it measures a local page. The install brings the latest playwright the peer range allows (1.64.1 today, while the repository tests with 1.63), so a user needs the Chromium of that version even with another one on the machine. It needs the network and runs by hand before a release of the CLI.
@vercel

vercel Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
webperf-snippets Ready Ready Preview Oct 21, 2026 10:42am UTC

@nucliweb
nucliweb merged commit 9f81f51 into main Oct 21, 2026
3 checks passed
@nucliweb
nucliweb deleted the feat/mcp-missing-browser branch October 21, 2026 12:44
@nucliweb nucliweb mentioned this pull request Oct 21, 2026
4 of 5 tasks

This branch was successfully deployed

1 active deployment
Preview — 84f24e0e Deployed Oct 21, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant