Skip to directory

About Playwright MCP

A local MCP server that lets AI clients automate browsers through Playwright and structured accessibility snapshots.

What you can use it for

  • Navigate and interact with websites
  • Find and manipulate controls using accessible page snapshots
  • Automate browser workflows across supported browser engines
Connection and setup
Hosting
Local
Transport
stdio
Endpoint
Local process; no hosted endpoint documented
Authentication
None by default. Browser sessions can retain login state and cookies between sessions; the user signs in to websites in the browser when needed.

Requirements

  • Node.js 18 or newer
  • An MCP-compatible client
  • A browser download on first use

Setup steps

  1. Add command npx with argument @playwright/mcp@latest to the MCP client's local server configuration.
  2. Start the server; the browser opens headed by default so browser actions are visible.
  3. Ask the client to navigate to a harmless public page and confirm it returns an accessibility snapshot.
Tools 24+

Stored names are the documented core tools. Optional tool groups change the exposed list; Microsoft documentation describes 70+ tools across core and optional capabilities, so the configured session list is not fixed.

  • browser_navigate

    Navigate to a URL.

    01
  • browser_navigate_back

    Go back in browser history.

    02
  • browser_snapshot

    Capture the page accessibility snapshot.

    03
  • browser_find

    Search the current snapshot for text or a regular expression.

    04
  • browser_click

    Click an element.

    05
  • browser_hover

    Hover over an element.

    06
  • browser_drag

    Drag and drop between elements.

    07
  • browser_drop

    Drop files or MIME-typed data onto an element.

    08
  • browser_type

    Type text into an editable element.

    09
  • browser_fill_form

    Fill multiple form fields.

    10
  • browser_select_option

    Select a dropdown option.

    11
  • browser_press_key

    Press a keyboard key.

    12
  • browser_take_screenshot

    Take a browser screenshot.

    13
  • browser_tabs

    List, create, close, or select browser tabs.

    14
  • browser_handle_dialog

    Handle a browser dialog.

    15
  • browser_file_upload

    Upload files through a file chooser.

    16
  • browser_console_messages

    Read browser console messages.

    17
  • browser_network_requests

    List network requests.

    18
  • browser_network_request

    Inspect one network request.

    19
  • browser_evaluate

    Evaluate JavaScript on a page or element.

    20
  • browser_run_code_unsafe

    Run a Playwright code snippet; explicitly documented as unsafe.

    21
  • browser_wait_for

    Wait for text to appear/disappear or for a time interval.

    22
  • browser_close

    Close the browser page.

    23
  • browser_resize

    Resize the browser viewport.

    24

This server’s available tools can vary by account, permissions, or configuration. The list shown is not its full runtime catalog.

Limitations and notes
  • Optional network, storage, testing, developer-tools, PDF, and vision toolsets depend on server capability flags.
  • The MCP server uses more context than the separate Playwright CLI workflow, according to Microsoft's docs.
Original sources
  • official tool reference

    Reviewed current publisher or maintainer documentation for the tool inventory, availability, endpoint, or configuration.

  • official documentation

    Reviewed current publisher or maintainer documentation for the tool inventory, availability, endpoint, or configuration.

Documentation checked 2026-10-28T00:00:00Z. Connection has not been runtime tested.