home / mcp / playwright mcp server

Playwright MCP Server

Provides browser automation via Playwright using structured accessibility snapshots for deterministic, text-based interaction.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "microsoft-playwright-mcp": {
      "url": "http://localhost:8931/mcp"
    }
  }
}

Available tools

browser_click

Perform click on a web page

browser_close

Close the page

browser_console_messages

Returns all console messages

browser_drag

Perform drag and drop between two elements

browser_evaluate

Evaluate JavaScript expression on page or element

browser_file_upload

Upload one or multiple files

browser_fill_form

Fill multiple form fields

browser_handle_dialog

Handle a dialog

browser_hover

Hover over element on page

browser_navigate

Navigate to a URL

browser_navigate_back

Go back to the previous page in the history

browser_network_requests

List network requests

browser_press_key

Press a key on the keyboard

browser_resize

Resize the browser window

browser_run_code

Run Playwright code snippet

browser_select_option

Select an option in a dropdown

browser_snapshot

Capture accessibility snapshot of the current page

browser_take_screenshot

Take a screenshot of the current page

browser_type

Type text into editable element

browser_wait_for

Wait for text to appear or disappear or a time to pass

browser_tabs

Manage tabs: list, create, close, or select

browser_install

Install the browser specified in the config

browser_mouse_click_xy

Click left mouse button at a given position

browser_mouse_down

Press mouse down

browser_mouse_drag_xy

Drag left mouse button to a given position

browser_mouse_move_xy

Move mouse to a given position

browser_mouse_up

Press mouse up

browser_mouse_wheel

Scroll mouse wheel

browser_pdf_save

Save page as PDF

browser_generate_locator

Create locator for element

browser_verify_element_visible

Verify element is visible on the page

browser_verify_list_visible

Verify list is visible on the page

browser_verify_text_visible

Verify text is visible on the page

browser_verify_value

Verify element value

browser_start_tracing

Start tracing

browser_stop_tracing

Stop tracing