Back
Marketplace/Playwright

TL;DR

Playwright is a Browser Automation MCP server that lets Claude Code, Cursor, Windsurf and any MCP-compatible AI agent official Microsoft browser automation via accessibility. Install in 1 minute with mcpizy install playwright.

🎭

Playwright

Verified 7 tools

Browser Automation

Last updated May 30, 2026 · By MCPizy team

Official Microsoft browser automation via accessibility

Official homepage

Install Playwright

Via MCPizy CLI (recommended):
mcpizy install playwright
Or run directly:
npx -y @anthropic/mcp-playwright
View on GitHub

Tools exposed

7 tools available
browser_navigate

Navigate the browser to a URL

Inputs

  • urlstringrequired
browser_snapshot

Capture an accessibility snapshot of the page

browser_click

Click on an element by selector or role

Inputs

  • elementstringrequired
browser_type

Type text into an element

Inputs

  • elementstringrequired
  • textstringrequired
browser_take_screenshot

Take a screenshot of the page

browser_evaluate

Run JavaScript in the page

Inputs

  • functionstringrequired
browser_fill_form

Fill multiple fields in a form

Inputs

  • fieldsobject[]required

Configuration

Works identically across clients. Only the config file path differs.

Claude Code~/.claude.json
{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": [
        "-y",
        "@playwright/mcp@latest"
      ]
    }
  }
}
Cursor.cursor/mcp.json
{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": [
        "-y",
        "@playwright/mcp@latest"
      ]
    }
  }
}
Windsurf~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": [
        "-y",
        "@playwright/mcp@latest"
      ]
    }
  }
}

Authentication setup

  1. 1

    No authentication required — runs a local Chromium instance

    Get it

What you can do with Playwright MCP

Paste any of these prompts into Claude Code, Cursor or another MCP-compatible client.

“Open example.com, take a screenshot, and tell me what's on the page”

Uses: browser_navigate, browser_take_screenshot, browser_snapshot

“Fill the login form at app.local with email+password and click Sign in”

Uses: browser_navigate, browser_fill_form, browser_click

“Test the signup flow on my staging site end-to-end”

Uses: browser_navigate, browser_fill_form, browser_click, browser_snapshot

Why Playwright MCP matters

Playwright MCP exposes Playwright's browser automation as agent tools: `browser_navigate`, `browser_click`, `browser_fill`, `browser_snapshot`, `browser_take_screenshot`, `browser_evaluate`, `browser_network_requests`. The official Playwright MCP from Microsoft uses accessibility-tree snapshots (not pixel screenshots) for element targeting, which makes the agent's interactions reliable across renders — it clicks on "Sign in" by role/name, not by selector.

We use Playwright MCP for three workflows. First, end-to-end test authoring: the human walks through a flow, the agent records what was clicked and writes a Playwright test. Second, web scraping that needs JavaScript execution — many sites require login + form submission, which is trivial with Playwright but painful with `fetch`. Third, visual regression debugging: `browser_take_screenshot` after each step, the agent compares against a baseline. Token cost is high for accessibility snapshots — a typical page tree is 5-15k tokens — so agents should snapshot only when needed, not after every step.

Compared to Puppeteer MCP, Playwright wins on multi-browser support (Chromium + Firefox + WebKit), reliability of waits and selectors, and the accessibility-tree snapshot pattern. Puppeteer is leaner if you only need Chromium. Compared to Selenium MCP (community), Playwright wins on speed and developer experience by an order of magnitude. The honest trade-off: Playwright MCP binaries are large (~250 MB per browser), so cold-start latency on serverless agent runners is significant. Pre-warm the browser if you can.

Common pitfalls

Accessibility snapshots are large but selectors derived from them are robust. Agents that fall back to CSS selectors based on visible text often break on the next render. Prefer role + name-based targeting.

`browser_evaluate` runs arbitrary JavaScript in the page context — it can leak credentials, exfiltrate data, or invoke any DOM API. If your agent has any chance of prompt injection from page content, treat `browser_evaluate` as the highest-risk tool and require explicit allow-listing per script.

Headless Chromium downloads fonts and JS on every navigation by default. For repeat scraping of the same site, the MCP server should persist a user data dir to cache assets.

Network-request capture (`browser_network_requests`) is bounded by browser limits. Pages that make 500+ XHR calls (Google Maps, complex SPAs) will lose the oldest requests when the buffer wraps.

How Playwright MCP compares

Honest pros/cons against the closest browser automation MCP servers.

ServerStrengthsTrade-offs
Puppeteer MCPLighter, Chromium-only, simpler APISingle-browser, weaker selector strategies
Selenium MCP (community)Multi-language, ancient + battle-testedSlower, flakier, harder DX than Playwright
Browserbase MCPManaged cloud browsers, no infra to runCost per browser-minute, vendor lock

Works with

Claude Code
Claude Desktop
Cursor
Windsurf
VS Code + Copilot
Any MCP Client

More Browser Automation MCPs

🦊

Firefox

Firefox automation via WebDriver BiDi

📺

YouTube Transcript

Fetch YouTube subtitles and transcripts

🚀

Hyperbrowser

Next-generation platform for AI agents and browser automation. Headless browsing at scale.

🎭

GoLogin

Manage GoLogin browser profiles for multi-account automation and anti-detect browsing.

Alternatives to Playwright

If Playwright doesn't fit your stack, these Browser Automation MCP servers solve similar problems.

🌐

Browserbase

Cloud browser automation for web scraping

🖥️

BrowserMCP

Control your local Chrome browser directly

🧭

Safari

Native Safari automation on macOS

Key Takeaways

  • Playwright exposes 7 tools for browser automation workflows in Claude Code, Cursor and Windsurf.
  • Authentication: 1 step (see setup section above).
  • Install in 1 command: mcpizy install playwright — config written to your client automatically.
  • Free and open source (GitHub source linked above) — verified compatible with every MCP client (Claude Code, Claude Desktop, Cursor, Windsurf, VS Code + Copilot).
  • Best use case: "Open example.com, take a screenshot, and tell me what's on the page".

Frequently asked questions

What is the Playwright MCP server?

The Playwright MCP server is an Browser Automation Model Context Protocol server that lets Claude Code, Cursor, Windsurf, VS Code with Copilot, and other MCP-compatible AI agents official Microsoft browser automation via accessibility. It exposes Playwright's capabilities as tools the AI can call directly from your editor or CLI.

How do I install Playwright MCP with Claude Code?

The fastest way is the MCPizy CLI: run `mcpizy install playwright` and MCPizy will add the server to your `.claude.json` automatically. You can also install it manually by adding an entry under `mcpServers` in `.claude.json` with the command `npx -y @anthropic/mcp-playwright` and restarting Claude Code.

Is Playwright MCP free?

Yes. The Playwright MCP server is free and open source (see the GitHub repository linked on this page). You may still need a Playwright account or API key to connect the server to the underlying service, but the MCP layer itself has no MCPizy subscription cost.

Does Playwright MCP work with Cursor and Windsurf?

Yes. Any MCP-compatible client works — including Claude Code, Claude Desktop, Cursor (via `.cursor/mcp.json`), Windsurf, VS Code with Copilot Chat, and custom agents built on the MCP SDK. The same install command targets all of them; only the config file path differs.

What can I do with Playwright MCP?

Once installed, your AI agent can official Microsoft browser automation via accessibility directly inside your conversation. Typical use cases include asking Claude Code or Cursor to run Playwright operations, inspect results, chain Playwright with other MCP servers (see our Workflow Recipes), and automate repetitive browser automation tasks without leaving your editor.

Manage all your MCPs in one place

Monitor usage, track costs, and discover new MCPs.

Get Started Free