Official

Playwright MCP Server

Automate browser interaction via structured accessibility snapshots for LLM agents.

Data last scanned today · Reviewed yesterday

712 dangerous tools25 tools35,263TypeScriptApache-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
browser_hoverHover over element on pagemedium
browser_navigateNavigate to a URLmedium
browser_navigate_backGo back to the previous page in the historymedium
browser_network_requestReturns full details (headers and body) of a single network request, or a single part if `part` is set. Use the number from browser_network_requests.low
browser_network_requestsReturns a numbered list of network requests since loading the page. Use browser_network_request with the number to get full details.low
browser_press_keyPress a key on the keyboardmedium
browser_resizeResize the browser windowmedium
browser_run_code_unsafeRun a Playwright code snippet. Unsafe: executes arbitrary JavaScript in the Playwright server process and is RCE-equivalent.high
browser_select_optionSelect an option in a dropdownmedium
browser_snapshotCapture accessibility snapshot of the current page, this is better than screenshotlow
browser_take_screenshotTake a screenshot of the current page. You can't perform actions based on the screenshot, use browser_snapshot for actions.low
browser_typeType text into editable elementmedium
browser_wait_forWait for text to appear or disappear or a specified time to passmedium
browser_tabsList, create, close, or select a browser tab.medium
browser_get_configGet the final resolved config after merging CLI options, environment variables and config file.low

Compatibility

ClientLocalDockerRemoteRead-only
ChatGPT
Claude Desktop
Cursor
VS Code
Windsurf

Alternatives

Badge

Playwright MCP Server security score, rated on RepoAI

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