playwright-mcp-internal

Playwright MCP server

testingtesting
31,251 stars🍴 2,555 forks📦 v0.0.70📄 Apache-2.0

🔌 Transport

Standard I/O

📦 Installation

Docker

Claude Desktop Configuration

Add this to your claude_desktop_config.json:

{
  "mcpServers": {
    "playwright-mcp-internal": {
      "args": [
        "index.js"
      ],
      "command": "node"
    }
  }
}

🛠️ Available Tools (66)

body

(string, optional): Response body (text or JSON string)

promptText

(string, optional): The text of the prompt in case of a prompt dialog.

status

(number, optional): HTTP status code to return (default: 200)

Tools

generated by update-readme.js -->

selector

(string, optional): CSS or role selector for the target element, when "ref" is not available

target

(string): Exact target element reference from the page snapshot

submit

(boolean, optional): Whether to submit entered text (press Enter after)

deltaY

(number): Y delta

modifiers

(array, optional): Modifier keys to press

description

(string, optional): Chapter description

startX

(number): Start X coordinate

clickCount

(number, optional): Number of clicks, defaults to 1

delay

(number, optional): Time to wait between mouse down and mouse up in milliseconds, defaults to 0

all

(boolean, optional): Return all console messages since the beginning of the session, not just since the last navigation. Defaults to false.

domain

(string, optional): Cookie domain

startRef

(string): Exact source element reference from the page snapshot

contentType

(string, optional): Content-Type header (e.g., "application/json", "text/html")

endRef

(string): Exact target element reference from the page snapshot

removeHeaders

(string, optional): Comma-separated list of header names to remove from request

httpOnly

(boolean, optional): Whether the cookie is HTTP only

endElement

(string, optional): Human-readable target element description used to obtain the permission to interact with the element

sameSite

(string, optional): Cookie SameSite attribute

type

(string): Image format for the screenshot. Default is png.

size

(object, optional): Video size

NOTE

This has been generated via update-readme.js -->

requestHeaders

(boolean): Whether to include request headers. Defaults to false.

ref

(string): Exact target element reference from the page snapshot

startTarget

(string): Exact target element reference from the page snapshot, or a unique element selector

duration

(number, optional): Duration in milliseconds to show the chapter card

endTarget

(string): Exact target element reference from the page snapshot, or a unique element selector

slowly

(boolean, optional): Whether to type one character at a time. Useful for triggering key handlers in the page. By default entire text is filled in at once.

index

(number, optional): Tab index, used for close/select. If omitted for close, current tab is closed.

x

(number): X coordinate

headers

(array, optional): Headers to add in "Name: Value" format

filter

(string, optional): Only return requests whose URL matches this regexp (e.g. "/api/.*user").

accessibleName

(string): ACCESSIBLE_NAME of the element. Can be found in the snapshot like this: `- role "{ACCESSIBLE_NAME}"`

startSelector

(string, optional): CSS or role selector for the source element, when ref is not available

height

(number): Height of the browser window

endSelector

(string, optional): CSS or role selector for the target element, when ref is not available

style

(string, optional): Additional inline CSS applied to the highlight overlay, e.g. "outline: 2px dashed red".

Title

Verify value

element

(string): Human-readable element description

location

(string, optional): Pause execution at a specific <file>:<line>, e.g. "example.spec.ts:42".

End

of tools generated section -->

secure

(boolean, optional): Whether the cookie is secure

fullPage

(boolean, optional): When true, takes a screenshot of the full scrollable page, instead of the currently visible viewport. Cannot be used with element screenshots.

values

(array): Array of values to select in the dropdown. This can be a single value or multiple values.

path

(string, optional): Cookie path

Description

Verify element value

Parameters

- `type` (string): Type of the element

value

(string): Value to verify. For checkbox, use "true" or "false".

doubleClick

(boolean, optional): Whether to perform a double click instead of a single click

requestBody

(boolean): Whether to include request body. Defaults to false.

text

(string, optional): The text to wait for

textGone

(string, optional): The text to wait for to disappear

expires

(number, optional): Cookie expiration as Unix timestamp

depth

(number, optional): Limit the depth of the snapshot tree

url

(string, optional): URL to navigate to in the new tab, used for new.

filename

(string, optional): File name to save the screenshot to. Defaults to `page-{timestamp}.{png|jpeg}` if not specified. Prefer relative file names to stay within the output directory.

button

(string, optional): Button to click, defaults to left

items

(array): Items to verify

startY

(number): Start Y coordinate

endX

(number): End X coordinate

endY

(number): End Y coordinate

function

(string): () => { /* code */ } or (element) => { /* code */ } when element is provided

y

(number): Y coordinate

Capabilities

66
Tools
0
Resources
0
Prompts