ExecuteAutomation Playwright MCP

ExecuteAutomation Playwright MCP

Playwright Model Context Protocol Server - Tool to automate Browsers and APIs in Claude Desktop, Cline, Cursor IDE and More 🔌.

264

0

32 Tools

Signed
Built by Docker
Add to Docker Desktop

Version 4.43 or later needs to be installed to add the server automatically

About

ExecuteAutomation Playwright MCP MCP Server

Playwright Model Context Protocol Server - Tool to automate Browsers and APIs in Claude Desktop, Cline, Cursor IDE and More 🔌.

What is an MCP Server?

Characteristics

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

Available Tools (32)

Tools provided by this ServerShort Description
clear_codegen_sessionClear a code generation session without generating a test
end_codegen_sessionEnd a code generation session and generate the test file
get_codegen_sessionGet information about a code generation session
playwright_assert_responseWait for and validate a previously initiated HTTP response wait operation.
playwright_clickClick an element on the page
playwright_click_and_switch_tabClick a link and switch to the newly opened tab
playwright_closeClose the browser and release all resources
playwright_console_logsRetrieve console logs from the browser with filtering options
playwright_custom_user_agentSet a custom User Agent for the browser
playwright_deletePerform an HTTP DELETE request
playwright_dragDrag an element to a target location
playwright_evaluateExecute JavaScript in the browser console
playwright_expect_responseAsk Playwright to start waiting for a HTTP response.
playwright_fillfill out an input field
playwright_getPerform an HTTP GET request
playwright_get_visible_htmlGet the HTML content of the current page.
playwright_get_visible_textGet the visible text content of the current page
playwright_go_backNavigate back in browser history
playwright_go_forwardNavigate forward in browser history
playwright_hoverHover an element on the page
playwright_iframe_clickClick an element in an iframe on the page
playwright_iframe_fillFill an element in an iframe on the page
playwright_navigateNavigate to a URL
playwright_patchPerform an HTTP PATCH request
playwright_postPerform an HTTP POST request
playwright_press_keyPress a keyboard key
playwright_putPerform an HTTP PUT request
playwright_save_as_pdfSave the current page as a PDF file
playwright_screenshotTake a screenshot of the current page or a specific element
playwright_selectSelect an element on the page with Select tag
playwright_upload_fileUpload a file to an input[type='file'] element on the page
start_codegen_sessionStart a new code generation session to record Playwright actions

Tools Details

Tool: clear_codegen_session

Clear a code generation session without generating a test

ParametersTypeDescription
sessionIdstringID of the session to clear

Tool: end_codegen_session

End a code generation session and generate the test file

ParametersTypeDescription
sessionIdstringID of the session to end

Tool: get_codegen_session

Get information about a code generation session

ParametersTypeDescription
sessionIdstringID of the session to retrieve

Tool: playwright_assert_response

Wait for and validate a previously initiated HTTP response wait operation.

ParametersTypeDescription
idstringIdentifier of the HTTP response initially expected using Playwright_expect_response.
valuestringoptionalData to expect in the body of the HTTP response. If provided, the assertion will fail if this value is not found in the response body.

Tool: playwright_click

Click an element on the page

ParametersTypeDescription
selectorstringCSS selector for the element to click

Tool: playwright_click_and_switch_tab

Click a link and switch to the newly opened tab

ParametersTypeDescription
selectorstringCSS selector for the link to click

Tool: playwright_close

Close the browser and release all resources

Tool: playwright_console_logs

Retrieve console logs from the browser with filtering options

ParametersTypeDescription
clearbooleanoptionalWhether to clear logs after retrieval (default: false)
limitnumberoptionalMaximum number of logs to return
searchstringoptionalText to search for in logs (handles text with square brackets)
typestringoptionalType of logs to retrieve (all, error, warning, log, info, debug, exception)

Tool: playwright_custom_user_agent

Set a custom User Agent for the browser

ParametersTypeDescription
userAgentstringCustom User Agent for the Playwright browser instance

Tool: playwright_delete

Perform an HTTP DELETE request

ParametersTypeDescription
urlstringURL to perform DELETE operation

Tool: playwright_drag

Drag an element to a target location

ParametersTypeDescription
sourceSelectorstringCSS selector for the element to drag
targetSelectorstringCSS selector for the target location

Tool: playwright_evaluate

Execute JavaScript in the browser console

ParametersTypeDescription
scriptstringJavaScript code to execute

Tool: playwright_expect_response

Ask Playwright to start waiting for a HTTP response. This tool initiates the wait operation but does not wait for its completion.

ParametersTypeDescription
idstringUnique & arbitrary identifier to be used for retrieving this response later with Playwright_assert_response.
urlstringURL pattern to match in the response.

Tool: playwright_fill

fill out an input field

ParametersTypeDescription
selectorstringCSS selector for input field
valuestringValue to fill

Tool: playwright_get

Perform an HTTP GET request

ParametersTypeDescription
urlstringURL to perform GET operation

Tool: playwright_get_visible_html

Get the HTML content of the current page. By default, all <script> tags are removed from the output unless removeScripts is explicitly set to false.

ParametersTypeDescription
cleanHtmlbooleanoptionalPerform comprehensive HTML cleaning (default: false)
maxLengthnumberoptionalMaximum number of characters to return (default: 20000)
minifybooleanoptionalMinify the HTML output (default: false)
removeCommentsbooleanoptionalRemove all HTML comments (default: false)
removeMetabooleanoptionalRemove all meta tags from the HTML (default: false)
removeScriptsbooleanoptionalRemove all script tags from the HTML (default: true)
removeStylesbooleanoptionalRemove all style tags from the HTML (default: false)
selectorstringoptionalCSS selector to limit the HTML to a specific container

Tool: playwright_get_visible_text

Get the visible text content of the current page

Tool: playwright_go_back

Navigate back in browser history

Tool: playwright_go_forward

Navigate forward in browser history

Tool: playwright_hover

Hover an element on the page

ParametersTypeDescription
selectorstringCSS selector for element to hover

Tool: playwright_iframe_click

Click an element in an iframe on the page

ParametersTypeDescription
iframeSelectorstringCSS selector for the iframe containing the element to click
selectorstringCSS selector for the element to click

Tool: playwright_iframe_fill

Fill an element in an iframe on the page

ParametersTypeDescription
iframeSelectorstringCSS selector for the iframe containing the element to fill
selectorstringCSS selector for the element to fill
valuestringValue to fill

Tool: playwright_navigate

Navigate to a URL

ParametersTypeDescription
urlstringURL to navigate to the website specified
browserTypestringoptionalBrowser type to use (chromium, firefox, webkit). Defaults to chromium
headlessbooleanoptionalRun browser in headless mode (default: false)
heightnumberoptionalViewport height in pixels (default: 720)
timeoutnumberoptionalNavigation timeout in milliseconds
waitUntilstringoptionalNavigation wait condition
widthnumberoptionalViewport width in pixels (default: 1280)

Tool: playwright_patch

Perform an HTTP PATCH request

ParametersTypeDescription
urlstringURL to perform PUT operation
valuestringData to PATCH in the body

Tool: playwright_post

Perform an HTTP POST request

ParametersTypeDescription
urlstringURL to perform POST operation
valuestringData to post in the body
headersobjectoptionalAdditional headers to include in the request
tokenstringoptionalBearer token for authorization

Tool: playwright_press_key

Press a keyboard key

ParametersTypeDescription
keystringKey to press (e.g. 'Enter', 'ArrowDown', 'a')
selectorstringoptionalOptional CSS selector to focus before pressing key

Tool: playwright_put

Perform an HTTP PUT request

ParametersTypeDescription
urlstringURL to perform PUT operation
valuestringData to PUT in the body

Tool: playwright_save_as_pdf

Save the current page as a PDF file

ParametersTypeDescription
outputPathstringDirectory path where PDF will be saved
filenamestringoptionalName of the PDF file (default: page.pdf)
formatstringoptionalPage format (e.g. 'A4', 'Letter')
marginobjectoptionalPage margins
printBackgroundbooleanoptionalWhether to print background graphics

Tool: playwright_screenshot

Take a screenshot of the current page or a specific element

ParametersTypeDescription
namestringName for the screenshot
downloadsDirstringoptionalCustom downloads directory path (default: user's Downloads folder)
fullPagebooleanoptionalStore screenshot of the entire page (default: false)
heightnumberoptionalHeight in pixels (default: 600)
savePngbooleanoptionalSave screenshot as PNG file (default: false)
selectorstringoptionalCSS selector for element to screenshot
storeBase64booleanoptionalStore screenshot in base64 format (default: true)
widthnumberoptionalWidth in pixels (default: 800)

Tool: playwright_select

Select an element on the page with Select tag

ParametersTypeDescription
selectorstringCSS selector for element to select
valuestringValue to select

Tool: playwright_upload_file

Upload a file to an input[type='file'] element on the page

ParametersTypeDescription
filePathstringAbsolute path to the file to upload
selectorstringCSS selector for the file input element

Tool: start_codegen_session

Start a new code generation session to record Playwright actions

ParametersTypeDescription
optionsobjectCode generation options

Use this MCP Server

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

Why is it safer to run MCP Servers with Docker?

Manual installation

You can install the MCP server using:

Installation for

Related servers