Playwright

Cross-browser automation server with Chromium, Firefox, and WebKit.

Works with: Claude DesktopClaude CodeCursorWindsurfCline
Quick install
npx -y @playwright/mcp

How to install the Playwright MCP server

Add this to your Claude Desktop MCP configuration:

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

Add this to your Claude Code MCP configuration:

npx -y @playwright/mcp

Add this to your Cursor MCP configuration:

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

Add this to your Windsurf MCP configuration:

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

Add this to your Cline MCP configuration:

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

The Playwright MCP server is Microsoft’s official browser-automation server. It gives Claude full control of headless or headed browsers across Chromium, Firefox, and WebKit, with the same API on each. For end-to-end testing, modern web scraping, and any agentic workflow that touches a real browser, this is the gold standard.

Why use it

Many sites need a real browser. Logins, JavaScript-heavy SPAs, infinite scroll, and any anti-bot stack mean simple HTTP fetches fail. Playwright handles all of it. Auto-waits for elements. Captures network traffic. Records traces you can replay.

For solo founders and engineers, it’s the right tool when you want Claude to do something that mimics a human user across multiple browsers.

What it actually does

A rich tool surface mirroring the Playwright Node API: navigate, click, type, fill, wait for selector, evaluate JavaScript, take screenshot, capture network, record video. Plus context isolation so multiple sessions can run in parallel.

Practical patterns:

  • “Test our signup flow in Chromium, Firefox, and WebKit. Report any errors.”
  • “Scrape the pricing pages of the top 10 SaaS companies in our space.”
  • “Open my staging site, fill out every form with valid test data, and screenshot the success states.”

Gotchas

Browser engines are heavy. Each session consumes RAM. For high-throughput workflows, use Browserbase for hosted Playwright instances or scope your concurrency carefully.

JavaScript evaluation runs in the page context. Don’t navigate to untrusted sites and execute custom scripts on a machine with sensitive credentials.

For simpler “fetch a URL and read it” tasks, the Fetch server is lighter. Reach for Playwright when you actually need to click and interact.

Playwright MCP server: FAQs

How does it differ from Puppeteer?

Playwright supports three browser engines (Chromium, Firefox, WebKit), Puppeteer is Chromium-only. Playwright is also better at modern web app automation: auto-waiting, network interception, and tracing built in.

Do I need separate API keys?

No. The server runs locally and drives the browser engines installed on your machine. Run npx playwright install once to get all three browsers.

Can it run headed for debugging?

Yes. Set PLAYWRIGHT_HEADLESS=false. For most automation tasks, headless is faster.

Does it support mobile emulation?

Yes. Playwright ships device descriptors for hundreds of phones and tablets. Claude can run automation against the iPhone 15 viewport, for example, without you configuring breakpoints.

How does it compare to Browser Use or Browserbase?

Playwright is the lower-level driver. Browser Use is an LLM-friendly wrapper over Playwright. Browserbase is hosted Playwright with persistent sessions and stealth capabilities.