playwright-mcp

microsoft/playwright-mcp

4.1

If you are the rightful owner of playwright-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

Playwright MCP is a Model Context Protocol server that provides browser automation capabilities using Playwright, enabling LLMs to interact with web pages through structured accessibility snapshots.

Tools

Functions exposed to the LLM to take actions

browser_close

Close the page

browser_resize

Resize the browser window

browser_console_messages

Returns all console messages

browser_handle_dialog

Handle a dialog

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_install

Install the browser specified in the config. Call this if you get an error about the browser not being installed.

browser_press_key

Press a key on the keyboard

browser_type

Type text into editable element

browser_navigate

Navigate to a URL

browser_navigate_back

Go back to the previous page

browser_network_requests

Returns all network requests since loading the page

browser_run_code

Run Playwright code snippet

browser_take_screenshot

Take a screenshot of the current page. You can't perform actions based on the screenshot, use browser_snapshot for actions.

browser_snapshot

Capture accessibility snapshot of the current page, this is better than screenshot

browser_click

Perform click on a web page

browser_drag

Perform drag and drop between two elements

browser_hover

Hover over element on page

browser_select_option

Select an option in a dropdown

browser_tabs

List, create, close, or select a browser tab.

browser_wait_for

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

Prompts

Interactive templates invoked by user choice

No prompts

Resources

Contextual data attached and managed by the client

Browser console logs

URI: console://logs

MIME: text/plain

Screenshot: cnn

URI: screenshot://cnn

MIME: image/png