Playwright MCP logo

Playwright MCP

by microsoft

Automates web pages through Playwright using structured accessibility snapshots and MCP tools.

Install Playwright MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "microsoft-playwright-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@playwright/mcp@latest"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Automated check passed— started and listed 25 tools correctly (24d ago).

Overview

The microsoft/playwright-mcp MCP server lets language models control web pages through Playwright and structured accessibility snapshots. It supports navigation, page interaction, form entry, tabs, dialogs, screenshots, network inspection, JavaScript evaluation, and file operations through MCP tools. Reach for it when an agent needs persistent, iterative browser automation without relying on screenshots or a vision model.

Use cases

  • Automate multi-step web workflows
  • Inspect pages through accessibility snapshots
  • Fill and submit web forms
  • Monitor browser network requests
  • Run exploratory browser sessions

Key features

  • Structured accessibility snapshots
  • Playwright browser control
  • Form filling and file uploads
  • Tab, dialog, and keyboard controls
  • Network request inspection
  • WebMCP tool discovery and calls

Tools25

What Playwright MCP lets your agent do. Expand a tool for its parameters.

Verified live~4.1k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

16/16 checks healthy over the last 30d

Supply-chain signal

1 high-severity advisory on record for this package. Most advisories affect transitive dependencies and may not be exploitable in this server's actual usage — this is a directional signal, not a security audit.

Critical 0High 1Medium 0Low 0

Scanned 9d ago via OSV.dev · @playwright/mcp@latest (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars38kStargazers on the source repository.
npm downloads25MPackage downloads in the last 30 days.
Last commit4d agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed25Callable tools this server registers over MCP.
Directory activity8 viewsConfig copies, upvotes, and views on AllMCPs.

How Playwright MCP works

What microsoft/playwright-mcp does

The microsoft/playwright-mcp MCP server exposes Playwright browser automation through the Model Context Protocol. Agents can inspect a page’s accessibility snapshot, locate elements by text or regular expression, and perform actions against referenced nodes. This makes the interaction model based on structured page data rather than pixel coordinates or visual interpretation.

It can navigate to URLs, move backward in browser history, click, hover, drag between elements, select dropdown options, fill forms, type text, press keys, and wait for page state changes. Browser tabs can be listed, created, closed, or selected. The server also supports screenshots, console message retrieval, dialog handling, file uploads, and dropping files or MIME-typed data onto an element.

The tool set includes network request listing and detailed request inspection. Agents can evaluate JavaScript on a page or element, run Playwright code through an explicitly unsafe tool, and inspect or call WebMCP tools registered by the page.

How it works

The server uses Playwright to control the browser and returns accessibility-oriented page representations to the MCP client. browser_snapshot is the primary inspection tool for actions, while browser_find searches the current snapshot and returns matching nodes with surrounding context and their paths.

This approach fits exploratory automation, iterative browser workflows, and tasks that need ongoing browser state. It does not require a vision model to identify page controls. The MCP connection allows an agent to combine inspection, action, waiting, and verification steps within one browser session.

Setup and configuration

The microsoft/playwright-mcp MCP server requires Node.js 18 or newer and an MCP-compatible client. The standard local configuration starts it with npx:

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

The repository documents setup paths for clients including VS Code, Cursor, Windsurf, Claude Desktop, and Cline. Cursor can add it from MCP settings or use the equivalent npx @playwright/mcp@latest command. Cline’s example uses a local STDIO server configuration and adds -y to the npx arguments. Claude Desktop uses the standard MCP configuration format.

Tools and capabilities

Available operations include:

  • Navigate, go back, resize the browser, and manage tabs.
  • Capture accessibility snapshots or screenshots and search snapshots.
  • Click, hover, drag, type, press keys, select options, and fill multiple fields.
  • Upload files or drop paths and data onto page elements.
  • Handle dialogs, wait for text or time, and read console messages.
  • List network requests and retrieve details for an individual request.
  • Evaluate page or element JavaScript and run Playwright code.
  • List and call WebMCP tools exposed by the current page.

Limitations and notes

The microsoft/playwright-mcp MCP server is an MCP interface, while the repository notes that Playwright CLI with skills may suit coding-agent workflows where lower token usage is important. MCP is positioned for workflows that benefit from persistent state, introspection, and repeated reasoning over page structure.

browser_run_code_unsafe executes arbitrary JavaScript in the Playwright server process and is equivalent to remote-code execution in terms of risk. Use it only when that level of access is acceptable. WebMCP tool output is provided by the page and should be treated as untrusted. Screenshots cannot be used as the action basis according to the tool guidance; use browser_snapshot for page actions.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Playwright MCP

Install it in an MCP client using Node.js 18 or newer and the command `npx @playwright/mcp@latest`. The standard configuration defines `npx` as the command and `@playwright/mcp@latest` as its argument.

Yes. The repository documents Claude Desktop setup using the standard MCP configuration.

Yes. Cursor is listed as a supported client, with installation available from Cursor MCP settings or through the documented `npx @playwright/mcp@latest` command.

Yes. Its tools include filling multiple form fields, typing into editable elements, selecting dropdown options, uploading files, and dropping files or MIME-typed data onto page elements.

No. It is designed around structured accessibility snapshots. Screenshots are available, but the tool guidance says to use snapshots for actions.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewPlaywright MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/microsoft-playwright-mcp?style=directory)](https://allmcps.com/mcp/microsoft-playwright-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/microsoft-playwright-mcp"><img src="https://allmcps.com/api/badge/microsoft-playwright-mcp?style=directory" alt="Playwright MCP on AllMCPs" /></a>