mcp-playwright icon indicating copy to clipboard operation
mcp-playwright copied to clipboard

Playwright is asking for an specific browser version.

Open blackshot opened this issue 7 months ago • 6 comments

just added this to claude.

"playwright": {
      "command": "npx",
      "args": [
        "-y",
        "@executeautomation/playwright-mcp-server"
      ]
    }

It looks like the mcp server is asking for an specific version of the browser.

Image

i have installed various versions

Image

but npx playwright install doesn't install the mcp required version.

what to do?

Edit: i just copied the latest chromium and renamed the folder and it works, but its not optimal.

blackshot avatar Apr 22 '25 21:04 blackshot

Interesting, seems like the MCP Playwright is looking only for the default browser, as Playwright installation we are not passing the browser location, thats the reason why this is happening I guess.

executeautomation avatar Apr 22 '25 22:04 executeautomation

as i read in the Playwright documentation, each playwright version has its own browser default version, if the mcp playwright version is not the same of the npx playwright (which fetches the latest package version) command it won't install the same version required by your mcp.

blackshot avatar Apr 25 '25 00:04 blackshot

Thats correct!

executeautomation avatar Apr 27 '25 02:04 executeautomation

我也遇到了同样的问题,我想启动本地的Google chrome而不是Chromium,我该如何解决呢?

Yee1014 avatar May 15 '25 03:05 Yee1014

I can confirm this issue still exists on Windows 11. Here are the specific details:

Environment:

  • OS: Windows 11
  • Node.js: v21.7.3
  • @playwright/test: 1.55.0
  • MCP Server: @executeautomation/playwright-mcp-server

Problem Details:

  • MCP server looks for: chromium-1179\chrome-win\chrome.exe
  • Actual installation creates: chromium-1187\
  • Same issue occurs with both npm install -D @playwright/test && npx playwright install and npx --yes playwright install

Error Message: browserType.launch: Executable doesn't exist at C:\Users{USERNAME}\AppData\Local\npm-cache_npx{HASH}\node_modules\playwright-core.local-browsers\chromium-1179\chrome-win\chrome.exe

Verification:

  • npx playwright --version works fine (v1.55.0)
  • Direct Node.js Playwright scripts work perfectly
  • Only MCP server calls fail due to path resolution

Root Cause: The MCP server hardcodes specific browser version numbers that don't match the versions installed by the current Playwright distribution.

Suggestion: The MCP server should use Playwright's built-in browser detection instead of hardcoded paths, similar to how npx playwright test automatically finds the correct browser versions.

J-Soderberg avatar Sep 05 '25 13:09 J-Soderberg

still happens. I had to run

~/.bun/install/global/node_modules/@executeautomation/playwright-mcp-server/node_modules/.bin/playwright install chromium

genesiscz avatar Nov 14 '25 20:11 genesiscz