Data as of

Playwright MCP for Claude Desktop: Setup & Config

Playwright MCP lets Claude Desktop operate browsers using structured accessibility data.

What you can do with Playwright in Claude Desktop

Choose structured browser interaction with persistent state and detailed inspection tools.

  • Explore a website through accessibility snapshots and iterative actions.
  • Fill forms and exercise interactive browser flows.

Before you start: Playwright in Claude Desktop

  • Node.js 18 or later
  • An MCP-compatible client

Add the command to your client's MCP configuration. Browser selection, headless operation, and connection settings are configurable through documented arguments.

Playwright Claude Desktop configuration

  1. Choose Claude Desktop configuration scope

    For Playwright MCP, open macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json. Merge under mcpServers via Settings → Developer → Edit Config when available.

  2. Add Playwright MCP to Claude Desktop

    Use the playwright-mcp entry below in mcpServers. Keep Playwright MCP's documented stdio connection fields and your other Claude Desktop entries.

  3. Check Playwright MCP in Claude Desktop

    Playwright MCP: Fully quit and reopen Claude Desktop; check developer diagnostics.

Config file · macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Windows: %APPDATA%\Claude\claude_desktop_config.json

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

Playwright tools available to Claude Desktop

Playwright's stored tool list documents 25 tools; compare it with Claude Desktop's connected tool list, because the stored list is not a live check.

browser_close

When Claude Desktop requests browser_close from Playwright, review the action before approving it.

Shut the active page.

browser_resize

When Claude Desktop requests browser_resize from Playwright, review the action before approving it.

Change the browser window dimensions.

browser_console_messages

When Claude Desktop requests browser_console_messages from Playwright, review the action before approving it.

Read messages emitted to the browser console.

browser_handle_dialog

When Claude Desktop requests browser_handle_dialog from Playwright, review the action before approving it.

Respond to a browser dialog.

browser_emulate_media

When Claude Desktop requests browser_emulate_media from Playwright, review the action before approving it.

Override CSS media settings such as the page color scheme.

browser_evaluate

When Claude Desktop requests browser_evaluate from Playwright, review the action before approving it.

Evaluate JavaScript against a page or element.

browser_file_upload

When Claude Desktop requests browser_file_upload from Playwright, review the action before approving it.

Supply files to an upload control.

browser_drop

When Claude Desktop requests browser_drop from Playwright, review the action before approving it.

Drop local files or MIME data onto a page element.

browser_find

When Claude Desktop requests browser_find from Playwright, review the action before approving it.

Find text or regex matches within the page accessibility snapshot.

browser_fill_form

When Claude Desktop requests browser_fill_form from Playwright, review the action before approving it.

Populate several form fields together.

browser_press_key

When Claude Desktop requests browser_press_key from Playwright, review the action before approving it.

Send a keyboard key press.

browser_type

When Claude Desktop requests browser_type from Playwright, review the action before approving it.

Enter text in an editable page element.

browser_navigate

When Claude Desktop requests browser_navigate from Playwright, review the action before approving it.

Open a specified web address.

browser_navigate_back

When Claude Desktop requests browser_navigate_back from Playwright, review the action before approving it.

browser_network_requests

When Claude Desktop requests browser_network_requests from Playwright, review the action before approving it.

browser_network_request

When Claude Desktop requests browser_network_request from Playwright, review the action before approving it.

browser_run_code_unsafe

When Claude Desktop requests browser_run_code_unsafe from Playwright, review the action before approving it.

browser_take_screenshot

When Claude Desktop requests browser_take_screenshot from Playwright, review the action before approving it.

browser_snapshot

When Claude Desktop requests browser_snapshot from Playwright, review the action before approving it.

browser_click

When Claude Desktop requests browser_click from Playwright, review the action before approving it.

browser_drag

When Claude Desktop requests browser_drag from Playwright, review the action before approving it.

browser_hover

When Claude Desktop requests browser_hover from Playwright, review the action before approving it.

browser_select_option

When Claude Desktop requests browser_select_option from Playwright, review the action before approving it.

browser_tabs

When Claude Desktop requests browser_tabs from Playwright, review the action before approving it.

browser_wait_for

When Claude Desktop requests browser_wait_for from Playwright, review the action before approving it.

Playwright: full stored tool descriptions

Troubleshooting Playwright in Claude Desktop

  • Fully quit and reopen Claude Desktop for Playwright MCP. If npx @playwright/mcp@latest (Node.js/npm) is missing, check the desktop process's PATH, which may differ from your terminal.
  • Playwright MCP uses stdio here: Claude Desktop must keep the configured process running; protocol output belongs on stdout and diagnostics on stderr.
  • Known limitation: Requires Node.js 18 or later.
  • Known limitation: Tool schemas and accessibility trees can use more context than the separate CLI workflow.
  • Known limitation: Origin filters are not a security boundary.
  • General Claude Desktop troubleshooting lives in the /clients/claude-desktop guide.

Playwright MCP — details. Claude Desktop guide

Frequently asked questions

Claude Desktop loads Playwright MCP from claude_desktop_config.json: ~/Library/Application Support/Claude/ on macOS, or %APPDATA%\Claude\ on Windows. Open it via Settings → Developer → Edit Config when available.

Claude Desktop's playwright-mcp example uses stdio.

Playwright MCP's Claude Desktop configuration invokes npx @playwright/mcp@latest (Node.js/npm).

Playwright MCP's stored list contains 25 tools, including browser_close, browser_resize, browser_console_messages. Compare those names with Claude Desktop's connected tool list; the stored list is not a live check.

No. Page interaction uses structured accessibility data rather than requiring screenshot interpretation.

Yes. The README documents a headless option; headed execution is the default.