OfficialVerified

Playwright MCP Server

Automate browser interaction via structured accessibility snapshots for LLM agents.

Data last scanned yesterday · Reviewed 2 months ago

462 dangerous tools25 tools35,509TypeScriptApache-2.0

Overview

The Playwright MCP Server provides a direct interface for AI agents to interact with web pages using structured accessibility snapshots. By focusing on the DOM structure rather than pixels or screenshots, it enables deterministic browser automation without requiring vision-capable models, making it ideal for persistent, iterative reasoning tasks or autonomous workflows. Designed to integrate with platforms like VS Code, Claude Desktop, and Cursor, this server maintains a continuous browser context. While efficient for deep, multi-step explorations, users should distinguish this from the Playwright CLI+SKILLS approach, which is often preferred for high-throughput coding agents requiring lower token consumption.

Our verdict

This server carries a high-risk profile with a security score of 56/100, primarily due to the lack of built-in authentication and a total absence of read-only operating modes. Because any configured agent gains full write access to the browser environment, it should only be used in trusted, local development environments by experienced users who can mitigate the risks of unauthenticated execution.

  • Maintained by official Playwright vendor
  • Uses accessibility trees for deterministic LLM input
  • Minimal dependency chain with only two direct requirements
  • High community adoption with 35,000+ GitHub stars
  • No authentication method allows unauthorized local access
  • Lacks a read-only mode for restricted operations
  • Full write access granted by default upon installation

Setup

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

Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows), then restart Claude Desktop. Some servers require API keys or tokens as environment variables — check the project's README and add an "env" object if needed.

  • No read-only mode — running this grants full read/write access.
  • No built-in authentication — anyone with access to this config can invoke every tool it exposes.

Tools

ToolDescriptionRisk
browser_clickPerform click on a web pagemedium
browser_closeClose the pagemedium
browser_console_messagesReturns all console messageslow
browser_dragPerform drag and drop between two elementsmedium
browser_dropDrop files or MIME-typed data onto an element, as if dragged from outside the page. At least one of "paths" or "data" must be provided.medium
browser_evaluateEvaluate JavaScript expression on page or elementhigh
browser_file_uploadUpload one or multiple filesmedium
browser_fill_formFill multiple form fieldsmedium
browser_findSearch the accessibility snapshot of the current page for text or a regular expression. Returns matching snapshot nodes with a few lines of surrounding context (like search snippets), each shown under its path from the root of the tree, which is cheaper than capturing the whole snapshot when you only need to locate an element and its ref.low
browser_handle_dialogHandle a dialogmedium

Compatibility

ClientLocalDockerRemoteRead-only
ChatGPT
Claude Desktop
Cursor
VS Code
Windsurf

Frequently asked questions

What are the system requirements for running the Playwright MCP server?

You must have Node.js version 18 or newer installed on your machine.

Does this server require a vision-capable LLM to function?

No, it operates using structured accessibility trees instead of screenshots, so vision models are not required.

Is this server better than the Playwright CLI for coding agents?

The Playwright CLI is generally more token-efficient and better suited for high-throughput coding agents, whereas the MCP server is better for workflows requiring persistent state and deep introspection.

Which MCP clients are supported?

The server supports common clients including VS Code, Cursor, Windsurf, Claude Desktop, Goose, Grok, and Junie.

Alternatives

Changelog

Pair it with a skill

Badge

Playwright MCP Server security score, rated on RepoAI

Maintain this server? Add the live badge to your README.