playwright-mcp: [Windows] Error: chrome' is not found

When I executed playwright-mcp via Claude Desktop installed on my Windows 11, the following error occurred:

{
  `url`: `https://www.google.com/search?q=Azure+Microsoft+cloud+services`
}
Error: browserType.launch: Chromium distribution 'chrome' is not found at C:\Users\<user name>\AppData\Local\Google\Chrome\Application\chrome.exe
Run "npx playwright install chrome"

Chrome on my PC is installed in “C:\Program Files\Google\Chrome\Application”. Therefore, I believe the error occurred because Chrome doesn’t exist in the folder that Playwright expects.

I think the cause is the following code in “context.ts”:

return await playwright.chromium.launch({ channel: 'chrome', ...this._launchOptions });

Can we modify the MCP execution parameters to specify the browser to use and its path?

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 11
  • Comments: 17 (8 by maintainers)

Most upvoted comments

Should be fixed, awaiting publish.

Thanks folks. It is a bug in Claude that does not propagate environment variables. We’ll work around it shortly.

It seems that it’s not recognizing the chromium installation.

Image

The CMD I used: /bin/sh -c "npx -y @playwright/mcp@latest --headless --port 3001 --browser chromium"

But I am able to use /bin/sh -c "npx -y @playwright/mcp@latest --headless --port 3001 --executable-path /ms-playwright/chromium-1161/chrome-linux/chrome" to run it.

The Docker image doesn’t come with Chrome, only with Chromium, Firefox and Webkit. Specify --browser chromium to use Chromium.

@pavelfeldman Thank you! It is working!

https://github.com/microsoft/playwright-mcp/issues/37

Can you check if regular Playwright works for you? Yes.

Also, which MCP client is that? Using Claude Desktop.