
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
- 1Open Cursor → Settings → MCP → Add new MCP server (or edit ~/.cursor/mcp.json directly).
- 2Paste the Playwright MCP (ExecuteAutomation) config below into the "mcpServers" object.
- 3Fill in placeholder secrets, then save.
- 4Cursor reloads MCP servers automatically — check Settings → MCP for a green status dot.
- 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_navigateOpen a URL in a Playwright-controlled browser, with optional headless/viewport options
playwright_screenshotCapture a full-page or element screenshot of the current page
playwright_clickClick an element by selector
playwright_iframe_clickClick an element located inside an iframe
playwright_fillType text into an input field
playwright_selectSelect an option in a dropdown by value
playwright_hoverHover the mouse over an element
playwright_evaluateExecute 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.