MCP Directory

How to add Playwright MCP Server to Claude Desktop

Microsoft's official browser-automation MCP using Playwright's accessibility tree (no vision model). Paste the config into ~/Library/Application Support/Claude/claude_desktop_config.json and restart Claude Desktop.

Last updated June 15, 2026 ยท 24kโ˜… ยท stdio ยท no auth ยท official

Claude Desktop config for Playwright MCP Server

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

Setup steps

  1. 1Open Claude Desktop โ†’ Settings โ†’ Developer โ†’ Edit Config (this opens ~/Library/Application Support/Claude/claude_desktop_config.json).
  2. 2Paste the Playwright MCP Server config below under the top-level "mcpServers" key.
  3. 3Fill in any placeholder secrets (API keys, paths) in the snippet.
  4. 4Save the file, then fully quit and reopen Claude Desktop.
  5. 5Open a chat and confirm Playwright MCP Server's tools appear under the ๐Ÿ”Œ tools menu.

Before you start

  • Node.js 18 or newer
  • An MCP-capable client (VS Code, Cursor, Windsurf, Claude Desktop, Claude Code, Goose, LM Studio, Codex, Gemini CLI, and many more)
  • Playwright browsers are downloaded on demand; for containerized use, the mcr.microsoft.com/playwright/mcp Docker image runs headless Chromium
  • No credential or auth required for the server itself

What Playwright MCP Server can do in Claude Desktop

browser_navigate

Navigate to a URL (with browser_navigate_back to go back).

browser_snapshot

Capture the page's accessibility tree snapshot used for deterministic, vision-free interaction.

browser_click

Click an element identified from the snapshot (plus browser_hover for hover).

browser_type

Type text into a focused element; browser_press_key sends individual keys.

browser_fill_form

Fill multiple form fields in one call (with browser_select_option for dropdowns).

browser_take_screenshot

Capture a screenshot of the page or an element.

browser_evaluate

Run JavaScript in the page context and return the result.

browser_tabs

List, create, select, and close browser tabs.

Security

The server can drive a real browser to any URL and submit forms, so it can reach internal sites and act with whatever session state the browser has; run it against trusted targets and consider an isolated browser profile.

Playwright MCP Server + Claude Desktop FAQ

Where is the Claude Desktop config file?

Claude Desktop reads MCP servers from ~/Library/Application Support/Claude/claude_desktop_config.json. Paste the Playwright MCP Server config there under the "mcpServers" key and restart the client.

Is Playwright MCP Server safe to use with Claude Desktop?

The server can drive a real browser to any URL and submit forms, so it can reach internal sites and act with whatever session state the browser has; run it against trusted targets and consider an isolated browser profile.

Does it use screenshots and a vision model?

No, by default it drives the browser from the page's accessibility tree (browser_snapshot), which is faster and deterministic. Coordinate/vision tools exist but are opt-in via --caps=vision.

Headed or headless by default?

Headed (a visible browser window) by default; pass --headless to run without a window, which is required for the Docker image.

How are logins/sessions handled?

By default a persistent profile stores login state between sessions; use --isolated for in-memory profiles or --user-data-dir to control the location.

View repo Full Playwright MCP Server page