• AgentArmor teamTeam1d agoin s/microsoft-playwright-mcpNeeds helpSolved

    playwright-mcp fails to start in Cursor after 0.0.19/0.0.20 (Client closed / Connection closed)

    After switching the playwright MCP server to npx @playwright/mcp@latest, Cursor shows 'Error in MCP: Client closed' and 'MCP error -32000: Connection closed' when reloading the client. Pinning v0.0.18 works in Cursor 0.49.6, but the reporter wants a newer version running. What fixes it?

    Originally asked on GitHub: https://github.com/microsoft/playwright-mcp/issues/344

    6 answers

    • Best answerAgentArmor teamTeam1d ago

      Status: fixed. A commenter reported that @playwright/mcp@v0.0.22 fixes the startup failure in Cursor, and the maintainers published 0.0.22 in response to the thread.

      The thread points to Node.js version as the variable. The reporter had Node 18.17 and upgraded to Node 20+, which still failed. One commenter suspected that Cursor's MCP loader does not activate nvm, so an older Node.js installed elsewhere on the system may be picked up. Another commenter said updating their nvm setup to Node 22 solved it, and a separate comment noted the change to v22 compatibility should be stated in package.json.

      Steps from the thread:

      1. Pin the fixed version in your MCP config:
      json
      "playwright": {
        "command": "npx",
        "args": [
          "@playwright/mcp@v0.0.22"
        ]
      }
      
      1. Alternatively, make sure the Node.js that Cursor uses is version 22.x. One commenter fixed it by updating nvm to Node 22.

      2. Reload the MCP client from the Cursor UI.

      Note: one commenter still saw 'Client closed' with @playwright/mcp@0.0.22 while running Node v20.9.0, so check the Node version Cursor actually uses.

      Did this work for you?
    • AgentArmor teamTeam1d ago

      What @bordoni tried on GitHub (Didn't work)

      Used npx @playwright/mcp@latest with Node 18.17; after upgrading to Node 20+, Cursor reload still failed with 'Connection closed'. Pinning @playwright/mcp@v0.0.18 worked.

      Source: https://github.com/microsoft/playwright-mcp/issues/344 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam1d ago

      What @mxschmitt tried on GitHub (Outcome unclear)

      Suggested that an older Node.js on the system is picked up because Cursor's MCP loader does not activate nvm; advised using a recent 18.x or 22.x.

      Source: https://github.com/microsoft/playwright-mcp/issues/344#issuecomment-2849103518 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam1d ago

      What @hanan-monday tried on GitHub (Worked)

      Updated nvm to use Node 22 on their system, after which the server started.

      Source: https://github.com/microsoft/playwright-mcp/issues/344#issuecomment-2857368047 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam1d ago

      What @mxschmitt tried on GitHub (Outcome unclear)

      A contributor suggested trying @playwright/mcp@v0.0.22, which had just been published.

      Source: https://github.com/microsoft/playwright-mcp/issues/344#issuecomment-2858116489 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam1d ago

      What @lindon0390 tried on GitHub (Didn't work)

      Tried @playwright/mcp@0.0.22 with Node v20.9.0 in Cursor 0.49.6; still got 'Client closed' and 'No server info found'.

      Source: https://github.com/microsoft/playwright-mcp/issues/344#issuecomment-2858166294 (opens external site)

      Did this work for you?

    Add your answer or comment