mcp/playwright

Verified Publisher

By mcp

Updated 15 days ago

Playwright MCP server

Image
Machine learning & AI
34

1M+

mcp/playwright repository overview

Playwright MCP Server

Playwright MCP server.

What is an MCP Server?

MCP Info

Image Building Info

AttributeDetails
Dockerfilehttps://github.com/microsoft/playwright-mcp/blob/ae27b8638aaf3a6be17d378964ae683864d20440/Dockerfile
Commitae27b8638aaf3a6be17d378964ae683864d20440
Docker Image built byDocker Inc.
Docker Scout Health ScoreDocker Scout Health Score
Verify SignatureCOSIGN_REPOSITORY=mcp/signatures cosign verify mcp/playwright --key https://raw.githubusercontent.com/docker/keyring/refs/heads/main/public/mcp/latest.pub
LicenceApache License 2.0

Available Tools (23)

Tools provided by this ServerShort Description
browser_clickClick
browser_closeClose browser
browser_console_messagesGet console messages
browser_dragDrag mouse
browser_dropDrop files or data onto an element
browser_evaluateEvaluate JavaScript
browser_file_uploadUpload files
browser_fill_formFill form
browser_handle_dialogHandle a dialog
browser_hoverHover mouse
browser_navigateNavigate to a URL
browser_navigate_backGo back
browser_network_requestShow network request details
browser_network_requestsList network requests
browser_press_keyPress a key
browser_resizeResize browser window
browser_run_code_unsafeRun Playwright code (unsafe)
browser_select_optionSelect option
browser_snapshotPage snapshot
browser_tabsManage tabs
browser_take_screenshotTake a screenshot
browser_typeType text
browser_wait_forWait for

Tools Details

Tool: browser_click

Perform click on a web page

ParametersTypeDescription
targetstringExact target element reference from the page snapshot, or a unique element selector
buttonstring optionalButton to click, defaults to left
doubleClickboolean optionalWhether to perform a double click instead of a single click
elementstring optionalHuman-readable element description used to obtain permission to interact with the element
modifiersarray optionalModifier keys to press

This tool may perform destructive updates.

This tool interacts with external entities.


Tool: browser_close

Close the page

Tool: browser_console_messages

Returns all console messages

ParametersTypeDescription
levelstringLevel of the console messages to return. Each level includes the messages of more severe levels. Defaults to "info".
allboolean optionalReturn all console messages since the beginning of the session, not just since the last navigation. Defaults to false.
filenamestring optionalFilename to save the console messages to. If not provided, messages are returned as text.

This tool is read-only. It does not modify its environment.

This tool interacts with external entities.


Tool: browser_drag

Perform drag and drop between two elements

ParametersTypeDescription
endTargetstringExact target element reference from the page snapshot, or a unique element selector
startTargetstringExact target element reference from the page snapshot, or a unique element selector
endElementstring optionalHuman-readable target element description used to obtain the permission to interact with the element
startElementstring optionalHuman-readable source element description used to obtain the permission to interact with the element

This tool may perform destructive updates.

This tool interacts with external entities.


Tool: browser_drop

Drop files or MIME-typed data onto an element, as if dragged from outside the page. At least one of "paths" or "data" must be provided.

ParametersTypeDescription
targetstringExact target element reference from the page snapshot, or a unique element selector
dataobject optionalData to drop, as a map of MIME type to string value (e.g. {"text/plain": "hello", "text/uri-list": "https://example.com"}).
elementstring optionalHuman-readable element description used to obtain permission to interact with the element
pathsarray optionalAbsolute paths to files to drop onto the element.

This tool may perform destructive updates.

This tool interacts with external entities.


Tool: browser_evaluate

Evaluate JavaScript expression on page or element

ParametersTypeDescription
functionstring() => { /* code / } or (element) => { / code */ } when element is provided
elementstring optionalHuman-readable element description used to obtain permission to interact with the element
filenamestring optionalFilename to save the result to. If not provided, result is returned as text.
targetstring optionalExact target element reference from the page snapshot, or a unique element selector

This tool may perform destructive updates.

This tool interacts with external entities.


Tool: browser_file_upload

Upload one or multiple files

ParametersTypeDescription
pathsarray optionalThe absolute paths to the files to upload. Can be single file or multiple files. If omitted, file chooser is cancelled.

This tool may perform destructive updates.

This tool interacts with external entities.


Tool: browser_fill_form

Fill multiple form fields

ParametersTypeDescription
fieldsarrayFields to fill in

This tool may perform destructive updates.

This tool interacts with external entities.


Tool: browser_handle_dialog

Handle a dialog

ParametersTypeDescription
acceptbooleanWhether to accept the dialog.
promptTextstring optionalThe text of the prompt in case of a prompt dialog.

This tool may perform destructive updates.

This tool interacts with external entities.


Tool: browser_hover

Hover over element on page

ParametersTypeDescription
targetstringExact target element reference from the page snapshot, or a unique element selector
elementstring optionalHuman-readable element description used to obtain permission to interact with the element

This tool may perform destructive updates.

This tool interacts with external entities.


Tool: browser_navigate

Navigate to a URL

ParametersTypeDescription
urlstringThe URL to navigate to

This tool may perform destructive updates.

This tool interacts with external entities.


Tool: browser_navigate_back

Go back to the previous page in the history

Tool: browser_network_request

Returns full details (headers and body) of a single network request, or a single part if part is set. Use the number from browser_network_requests.

ParametersTypeDescription
indexinteger1-based index of the request, as printed by browser_network_requests.
filenamestring optionalFilename to save the result to. If not provided, output is returned as text.
partstring optionalReturn only this part of the request. Omit to return full details.

This tool is read-only. It does not modify its environment.

This tool interacts with external entities.


Tool: browser_network_requests

Returns a numbered list of network requests since loading the page. Use browser_network_request with the number to get full details.

ParametersTypeDescription
staticbooleanWhether to include successful static resources like images, fonts, scripts, etc. Defaults to false.
filenamestring optionalFilename to save the network requests to. If not provided, requests are returned as text.
filterstring optionalOnly return requests whose URL matches this regexp (e.g. "/api/.*user").

This tool is read-only. It does not modify its environment.

This tool interacts with external entities.


Tool: browser_press_key

Press a key on the keyboard

ParametersTypeDescription
keystringName of the key to press or a character to generate, such as ArrowLeft or a

This tool may perform destructive updates.

This tool interacts with external entities.


Tool: browser_resize

Resize the browser window

ParametersTypeDescription
heightnumberHeight of the browser window
widthnumberWidth of the browser window

This tool may perform destructive updates.

This tool interacts with external entities.


Tool: browser_run_code_unsafe

Run a Playwright code snippet. Unsafe: executes arbitrary JavaScript in the Playwright server process and is RCE-equivalent.

ParametersTypeDescription
codestring optionalA JavaScript function containing Playwright code to execute. It will be invoked with a single argument, page, which you can use for any page interaction. For example: async (page) => { await page.getByRole('button', { name: 'Submit' }).click(); return await page.title(); }
filenamestring optionalLoad code from the specified file. If both code and filename are provided, code will be ignored.

This tool may perform destructive updates.

This tool interacts with external entities.


Tool: browser_select_option

Select an option in a dropdown

ParametersTypeDescription
targetstringExact target element reference from the page snapshot, or a unique element selector
valuesarrayArray of values to select in the dropdown. This can be a single value or multiple values.
elementstring optionalHuman-readable element description used to obtain permission to interact with the element

This tool may perform destructive updates.

This tool interacts with external entities.


Tool: browser_snapshot

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

ParametersTypeDescription
boxesboolean optionalInclude each element's bounding box as [box=x,y,width,height] in the snapshot. Coordinates are viewport-relative, in CSS pixels (Element.getBoundingClientRect)
depthnumber optionalLimit the depth of the snapshot tree
filenamestring optionalSave snapshot to markdown file instead of returning it in the response.
targetstring optionalExact target element reference from the page snapshot, or a unique element selector

This tool is read-only. It does not modify its environment.

This tool interacts with external entities.


Tool: browser_tabs

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

ParametersTypeDescription
actionstringOperation to perform
indexnumber optionalTab index, used for close/select. If omitted for close, current tab is closed.
urlstring optionalURL to navigate to in the new tab, used for new.

This tool may perform destructive updates.

This tool interacts with external entities.


Tool: browser_take_screenshot

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

ParametersTypeDescription
typestringImage format for the screenshot. Default is png.
elementstring optionalHuman-readable element description used to obtain permission to interact with the element
filenamestring optionalFile name to save the screenshot to. Defaults to `page-{timestamp}.{png
fullPageboolean optionalWhen true, takes a screenshot of the full scrollable page, instead of the currently visible viewport. Cannot be used with element screenshots.
targetstring optionalExact target element reference from the page snapshot, or a unique element selector

This tool is read-only. It does not modify its environment.

This tool interacts with external entities.


Tool: browser_type

Type text into editable element

ParametersTypeDescription
targetstringExact target element reference from the page snapshot, or a unique element selector
textstringText to type into the element
elementstring optionalHuman-readable element description used to obtain permission to interact with the element
slowlyboolean optionalWhether to type one character at a time. Useful for triggering key handlers in the page. By default entire text is filled in at once.
submitboolean optionalWhether to submit entered text (press Enter after)

This tool may perform destructive updates.

This tool interacts with external entities.


Tool: browser_wait_for

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

ParametersTypeDescription
textstring optionalThe text to wait for
textGonestring optionalThe text to wait for to disappear
timenumber optionalThe time to wait in seconds

This tool is read-only. It does not modify its environment.

This tool interacts with external entities.


Use this MCP Server

{
  "mcpServers": {
    "playwright": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "mcp/playwright"
      ]
    }
  }
}

Why is it safer to run MCP Servers with Docker?

Install from MCP:Hub

Tag summary

Content type

Image

Digest

sha256:097d97843

Size

389.1 MB

Last updated

15 days ago

Requires Docker Desktop 4.37.1 or later.

This week's pulls

Pulls:

73,596

Last week