Ad space · Your tool here
PluginStack
MCP Servers · by Microsoft

Playwright MCP

Playwright MCP official site ↗

Last checked against the official docs:

What it does

Microsoft's MCP server that gives an AI agent a real browser via Playwright. It works from the page's structured accessibility snapshot instead of screenshots, so no vision model is needed.

Who it's for

Vibe coders and QA folks who want the agent to test their web app or automate web tasks.

How to set it up

  1. Install Node.js 20 or newer.

  2. Add to your MCP client config:

    json
    {
      "mcpServers": {
        "playwright": {
          "command": "npx",
          "args": [
            "@playwright/mcp@latest"
          ]
        }
      }
    }
  3. Or via CLI: Claude Code / Codex:

    bash
    claude mcp add playwright npx @playwright/mcp@latest
    codex mcp add playwright npx "@playwright/mcp@latest"
  4. Optional flags include --headless, --isolated (in-memory profile) and --browser (chrome, firefox, webkit, msedge).

  5. Using a coding agent? Microsoft notes that Playwright CLI + Skills (github.com/microsoft/playwright-cli) can be more token-efficient than the MCP server.

Check the official Playwright MCP docs for the latest steps.

Install Playwright MCP in your client

Runs on your computer. Needs: Node.js 20 or newer. Sign-in or keys: None.

One-click install

These buttons open the app on your computer (it needs to be installed already). The app asks you to confirm before it adds the server: review the command or URL it shows and check it matches the snippet below before you approve.

Claude Code

Run in a terminal

bash
claude mcp add --transport stdio playwright -- npx @playwright/mcp@latest

Everything after -- is the server command. Run /mcp inside Claude Code to check it connected.

Claude Desktop

Settings → Developer → Edit Config (claude_desktop_config.json)

json
{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": [
        "@playwright/mcp@latest"
      ]
    }
  }
}

Fully quit and reopen Claude Desktop after saving.

Cursor

.cursor/mcp.json in a project, or ~/.cursor/mcp.json for all projects

json
{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": [
        "@playwright/mcp@latest"
      ]
    }
  }
}
VS Code

.vscode/mcp.json (note the top-level "servers" key)

json
{
  "servers": {
    "playwright": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "@playwright/mcp@latest"
      ]
    }
  }
}
Codex

Run in a terminal, or edit ~/.codex/config.toml

CLI

bash
codex mcp add playwright -- npx @playwright/mcp@latest

Or in ~/.codex/config.toml

toml
[mcp_servers.playwright]
command = "npx"
args = ["@playwright/mcp@latest"]

Checked against the official docs. Snippets use placeholders; keep real keys out of files you commit. Windsurf is not listed because we have not verified its format.

Set it up / Fixes

Step-by-step guides for getting Playwright MCP running and fixing common errors.

Example prompts

prompt
Open localhost:3000, sign up with a test email and tell me if anything breaks.
prompt
Go to my pricing page and check every link works.
prompt
Fill out the contact form on my site and report the confirmation message.

Demo

Official demo by Playwright on YouTube: “Let AI Explore Your Site & Write Tests with Playwright MCP!”

Made Playwright MCP? Add the badge

If you like, show that Playwright MCP is listed and hand-checked here. It's optional: listings are free and we never ask for a link back.

Hand-checked on PluginStack
Get the Markdown or HTML

Markdown (for a GitHub README)

markdown
[![Hand-checked on PluginStack](https://www.pluginstackai.com/badge/hand-checked.svg)](https://www.pluginstackai.com/plugins/playwright-mcp/)

HTML (for a website)

html
<a href="https://www.pluginstackai.com/plugins/playwright-mcp/"><img src="https://www.pluginstackai.com/badge/hand-checked.svg" alt="Hand-checked on PluginStack" width="226" height="28"></a>

About the badge

Free: MCP Starter Checklist

After you set this tool up, use the one-page checklist so your next MCP server doesn't fail on first connect.

Markdown download + occasional PluginStack updates. No spam. Privacy policy.

See all MCP Servers on PluginStack