Data as of

Playwright MCP Server for Cursor: Setup & Config

Cursor: ExecuteAutomation’s Playwright MCP Server lets AI clients automate real browsers, capture screenshots, scrape pages, and generate tests.

What you can do with Playwright in Cursor

Pick it for Playwright automation with device presets, test generation, and automatic browser setup.

  • Generate browser test code from an AI workflow.
  • Scrape page content or run JavaScript in a real browser.

Before you start: Playwright in Cursor

  • An MCP-compatible client
  • npm/npx tooling
  • Playwright browser binaries, installed automatically if missing

This is the documented stdio configuration. HTTP mode uses --port 8931 and requires type: http in the client. The server binds to localhost; the README describes SSH tunneling for remote access.

Playwright Cursor configuration

  1. Choose Cursor configuration scope

    For Playwright MCP Server, open Project: .cursor/mcp.json User: ~/.cursor/mcp.json. Merge into mcpServers at project or user scope.

  2. Add Playwright MCP Server to Cursor

    Use the mcp-playwright entry below in mcpServers. Keep Playwright MCP Server's documented stdio connection fields and your other Cursor entries.

  3. Check Playwright MCP Server in Cursor

    Playwright MCP Server: Enable in Cursor’s MCP settings; inspect tools.

Config file · Project: .cursor/mcp.json

User: ~/.cursor/mcp.json

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

Playwright tools available to Cursor

Playwright's stored tool list documents 1 tool; compare it with Cursor's connected tool list, because the stored list is not a live check.

playwright_resize

Find playwright_resize under Playwright in Cursor's MCP settings; inspect its arguments when the agent requests a call.

Change browser dimensions or select a device preset and orientation.

Playwright: full stored tool descriptions

Troubleshooting Playwright in Cursor

  • Cursor must find npx @executeautomation/playwright-mcp-server (Node.js/npm) for Playwright MCP Server. Enable the project/user entry in MCP settings and inspect its tools.
  • Playwright MCP Server uses stdio here: Cursor must keep the configured process running; protocol output belongs on stdout and diagnostics on stderr.
  • Known limitation: HTTP clients must explicitly set their transport type correctly.
  • Known limitation: The HTTP service binds locally; remote access needs an additional approach such as SSH tunneling.
  • General Cursor troubleshooting lives in the /clients/cursor guide.

Playwright MCP Server — details. Cursor guide

Frequently asked questions

Cursor's Playwright MCP Server entry belongs under mcpServers in .cursor/mcp.json (project) or ~/.cursor/mcp.json (user). Confirm the active scope in MCP settings.

Cursor's mcp-playwright example uses stdio.

Playwright MCP Server's Cursor configuration invokes npx @executeautomation/playwright-mcp-server (Node.js/npm).

Playwright MCP Server's stored list contains 1 tool, including playwright_resize. Compare those names with Cursor's connected tool list; the stored list is not a live check.

Yes. It documents 143 device presets, including phone, tablet, and desktop profiles, with orientation support.

The README recommends stdio for Claude Desktop and HTTP for compatible alternatives such as VS Code or custom clients.