MCP Directory

How to add Playwright MCP (ExecuteAutomation) to Cursor

Popular community Playwright + API testing MCP server with codegen, screenshots, and device emulation. Paste the config into ~/.cursor/mcp.json and restart Cursor.

Last updated June 15, 2026 · 4.5k · stdio · no auth

Cursor config for Playwright MCP (ExecuteAutomation)

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

Setup steps

  1. 1Open Cursor → Settings → MCP → Add new MCP server (or edit ~/.cursor/mcp.json directly).
  2. 2Paste the Playwright MCP (ExecuteAutomation) config below into the "mcpServers" object.
  3. 3Fill in placeholder secrets, then save.
  4. 4Cursor reloads MCP servers automatically — check Settings → MCP for a green status dot.
  5. 5Ask Cursor to use one of Playwright MCP (ExecuteAutomation)'s tools to confirm it's connected.

Before you start

  • Node.js 18+ (run via npx or a global install)
  • Playwright browsers — installed automatically on first use, or manually with `npx playwright install`
  • No API key or authentication required (local stdio server)

What Playwright MCP (ExecuteAutomation) can do in Cursor

playwright_navigate

Open a URL in a Playwright-controlled browser, with optional headless/viewport options

playwright_screenshot

Capture a full-page or element screenshot of the current page

playwright_click

Click an element by selector

playwright_iframe_click

Click an element located inside an iframe

playwright_fill

Type text into an input field

playwright_select

Select an option in a dropdown by value

playwright_hover

Hover the mouse over an element

playwright_evaluate

Execute arbitrary JavaScript in the page context

Security

Can execute arbitrary JavaScript in pages and generate/run test code, so treat target URLs and any generated scripts as untrusted. The browser shares whatever profile it launches with, so avoid pointing it at sites holding sensitive logged-in sessions.

Playwright MCP (ExecuteAutomation) + Cursor FAQ

Where is the Cursor config file?

Cursor reads MCP servers from ~/.cursor/mcp.json. Paste the Playwright MCP (ExecuteAutomation) config there under the "mcpServers" key and restart the client.

Is Playwright MCP (ExecuteAutomation) safe to use with Cursor?

Can execute arbitrary JavaScript in pages and generate/run test code, so treat target URLs and any generated scripts as untrusted. The browser shares whatever profile it launches with, so avoid pointing it at sites holding sensitive logged-in sessions.

Is this the official Microsoft Playwright MCP server?

No. This is a community server maintained by ExecuteAutomation. Microsoft publishes a separate official server, @playwright/mcp, which has a different toolset (accessibility-tree driven). They are not the same project.

Does it need an API key?

No. It runs locally over stdio and requires no authentication. It controls browsers on your own machine.

Why does it fail to launch a browser on first run?

Playwright's browser binaries may not be installed. Run `npx playwright install` to download Chromium/Firefox/WebKit, then retry.

View repo Full Playwright MCP (ExecuteAutomation) page