Skip to content
MCP Shelf

Pod to App: Cursor

How to install the Playwright MCP server in Cursor

By Sophie Filer · Updated 10 Nov 2026 · Steps checked against Playwright's own docs on 10 Nov 2026

The short answer

Use the Install in Cursor button in the Playwright MCP README, or go to Cursor Settings, MCP, Add new MCP Server and enter the command npx @playwright/mcp@latest. Nothing else to set up: Cursor starts the browser when the agent needs it.

~/.cursor/mcp.json
{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": ["@playwright/mcp@latest"]
    }
  }
}
Needs
Node.js 18 or newer
Install
One-click button
Sign-in
None
Browser
Chrome, visible by default

Three ways to add it

RouteHowPick it when
One-clickPress Install in Cursor in the Playwright MCP README and confirm in CursorYou just want it working
SettingsCursor Settings, MCP, Add new MCP Server: give it a name, choose the command type, enter npx @playwright/mcp@latestYou like to see what is being added
FilePaste the block at the top of this page into ~/.cursor/mcp.json, or .cursor/mcp.json for one projectYou want to share the setup in a repo

Check it and run a first test

  1. Step 1: Open Cursor Settings and the MCP section. playwright should be enabled with a list of browser tools such as browser_navigate, browser_click and browser_take_screenshot.
  2. Step 2: Start your app locally, for example with npm run dev.
  3. Step 3: In an Agent chat, ask: "Open http://localhost:3000, try the login with a wrong password, and tell me what the error says."
  4. Step 4: Approve the tool calls when Cursor asks. A Chrome window opens and you can watch each step.

Adding arguments in Cursor

In Settings, click Edit on the playwright entry to change the command. In the file, put each flag as its own item in args. This version runs headless and as a phone:

~/.cursor/mcp.json
{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": ["@playwright/mcp@latest", "--headless", "--device", "iPhone 15"]
    }
  }
}
  • --browser msedge (or firefox, webkit) changes the browser.
  • --isolated starts every session with an empty profile.
  • --extension drives your own Chrome or Edge with your logins, once the Playwright Extension is installed there.
  • --caps vision adds tools that click by screen position, for canvas apps the snapshot cannot read.

Cursor and Claude Code in the same folder

The server keeps a saved browser profile per workspace, and only one browser can hold it at once. If Cursor's agent and another tool both open the same project with Playwright, the second one fails to start its browser. Give one of them --isolated, or a separate --user-data-dir, and both can run.

Troubleshooting

What you seeWhat to do
Red dot on playwright in SettingsCursor could not run npx. Install Node.js 18 or newer and restart Cursor so it picks up the new path.
Tools are listed but the agent never opens a browserUse Agent mode and give a URL. In Ask mode, tools are not called.
Browser starts, then closes straight awayAnother session holds the profile. Add --isolated to the args.
Cursor warns about too many toolsTurn off servers you are not using in this chat; Playwright alone brings over twenty tools.

MCP Shelf take

Is Playwright worth adding to Cursor?

Inside Cursor, Playwright MCP turns the agent from "I think this works" into "I clicked it and it works". It is worth installing if you build anything with a UI, because the agent can reproduce a bug in a real browser before it edits code, then check the fix. It is less good as a test suite: snapshots are large and runs are slow. Use it to explore and debug, and ask the agent to turn what it found into proper Playwright tests you can keep in the repo.

Sophie Filer

Questions

Is the one-click Cursor install safe?

It writes the same npx @playwright/mcp@latest entry you would type yourself. You can check it afterwards in Cursor Settings under MCP, or in ~/.cursor/mcp.json.

Can Cursor test my site on a phone screen with Playwright?

Yes. Add --device with a device name such as "iPhone 15" to the args, and the browser uses that screen size and user agent.

Why does the Playwright browser in Cursor not have my logins?

It uses its own profile, not your everyday Chrome. Sign in once inside its window and the profile remembers it, or use --extension to drive your real browser.

Sources: the steps on this page are written in our own words from Playwright MCP's own install docs, the README. If they disagree with this page, the project's docs win; please tell us from the server page.