Playwright MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PLAYWRIGHT_MCP_CAPS | No | comma-separated list of additional capabilities to enable, possible values: vision, pdf, devtools. | |
| PLAYWRIGHT_MCP_HOST | No | host to bind server to. Default is localhost. Use 0.0.0.0 to bind to all interfaces. | |
| PLAYWRIGHT_MCP_PORT | No | port to listen on for SSE transport. | |
| PLAYWRIGHT_MCP_CONFIG | No | path to the configuration file. | |
| PLAYWRIGHT_MCP_DEVICE | No | device to emulate, for example: "iPhone 15" | |
| PLAYWRIGHT_MCP_MOBILE | No | emulate a generic mobile device (Pixel 10 for Chromium, iPhone 17 for WebKit). Mobile pages are usually lighter, which saves tokens. Cannot be combined with --device. | |
| PLAYWRIGHT_MCP_WEBMCP | No | do not collect or expose the tools that a page registers through the WebMCP API (set to false to disable). | |
| PLAYWRIGHT_MCP_BROWSER | No | browser or chrome channel to use, possible values: chrome, firefox, webkit, msedge. | |
| PLAYWRIGHT_MCP_CODEGEN | No | specify the language to use for code generation, possible values: "typescript", "python", "java", "csharp", "none". Default is "typescript". | |
| PLAYWRIGHT_MCP_SANDBOX | No | enable the sandbox for all process types that are normally not sandboxed. | |
| PLAYWRIGHT_MCP_ENDPOINT | No | Bound browser endpoint to connect to. | |
| PLAYWRIGHT_MCP_HEADLESS | No | run browser in headless mode, headed by default | |
| PLAYWRIGHT_MCP_ISOLATED | No | keep the browser profile in memory, do not save it to disk. | |
| PLAYWRIGHT_MCP_EXTENSION | No | Connect to a running browser instance (Edge/Chrome only). Requires the "Playwright Extension" to be installed. | |
| PLAYWRIGHT_MCP_INIT_PAGE | No | path to TypeScript file to evaluate on Playwright page object | |
| PLAYWRIGHT_MCP_FILE_PATHS | No | how file paths are rendered in tool results, "relative" to the workspace root or "absolute". Default is "relative". | |
| PLAYWRIGHT_MCP_NO_SANDBOX | No | disable the sandbox for all process types that are normally sandboxed. | |
| PLAYWRIGHT_MCP_OUTPUT_DIR | No | path to the directory for automatically named output files, for example a screenshot taken without an explicit file name. Files with an explicit name are resolved against the workspace root instead and are not affected by this option. | |
| PLAYWRIGHT_MCP_USER_AGENT | No | specify user agent string | |
| PLAYWRIGHT_MCP_CDP_HEADERS | No | CDP headers to send with the connect request, multiple can be specified. | |
| PLAYWRIGHT_MCP_CDP_TIMEOUT | No | timeout in milliseconds for connecting to CDP endpoint, defaults to 30000ms | |
| PLAYWRIGHT_MCP_INIT_SCRIPT | No | path to JavaScript file to add as an initialization script. The script will be evaluated in every page before any of the page's scripts. Can be specified multiple times. | |
| PLAYWRIGHT_MCP_CDP_ENDPOINT | No | CDP endpoint to connect to. | |
| PLAYWRIGHT_MCP_IDLE_TIMEOUT | No | close the browser after this many milliseconds without a completed tool call, the next tool call relaunches it. Defaults to one hour for headless browsers, never for headed ones, 0 disables. | |
| PLAYWRIGHT_MCP_PROXY_BYPASS | No | comma-separated domains to bypass proxy, for example ".com,chromium.org,.domain.com" | |
| PLAYWRIGHT_MCP_PROXY_SERVER | No | specify proxy server, for example "http://myproxy:3128" or "socks5://myproxy:8080" | |
| PLAYWRIGHT_MCP_SAVE_SESSION | No | Whether to save the Playwright MCP session into the output directory. | |
| PLAYWRIGHT_MCP_SECRETS_FILE | No | path to a file containing secrets in the dotenv format | |
| PLAYWRIGHT_MCP_ALLOWED_HOSTS | No | comma-separated list of hosts this server is allowed to serve from. Defaults to the host the server is bound to. Pass '*' to disable the host check. | |
| PLAYWRIGHT_MCP_CONSOLE_LEVEL | No | level of console messages to return: "error", "warning", "info", "debug". Each level includes the messages of more severe levels. | |
| PLAYWRIGHT_MCP_SNAPSHOT_MODE | No | when taking snapshots for responses, specifies the mode to use. Can be "full" or "none". Default is "full". | |
| PLAYWRIGHT_MCP_STORAGE_STATE | No | path to the storage state file for isolated sessions. | |
| PLAYWRIGHT_MCP_USER_DATA_DIR | No | path to the user data directory. If not specified, a temporary directory will be created. | |
| PLAYWRIGHT_MCP_SNAPSHOT_BOXES | No | include each element's bounding box as [box=x,y,width,height] in snapshots. Coordinates are viewport-relative, in CSS pixels. | |
| PLAYWRIGHT_MCP_TIMEOUT_ACTION | No | specify action timeout in milliseconds, defaults to 5000ms | |
| PLAYWRIGHT_MCP_TIMEOUT_SETTLE | No | how long to wait after each action for triggered work to settle, in milliseconds, defaults to 500ms | |
| PLAYWRIGHT_MCP_ALLOWED_ORIGINS | No | semicolon-separated list of TRUSTED origins to allow the browser to request. Default is to allow all. Important: does not serve as a security boundary and does not affect redirects. | |
| PLAYWRIGHT_MCP_BLOCKED_ORIGINS | No | semicolon-separated list of origins to block the browser from requesting. Blocklist is evaluated before allowlist. If used without the allowlist, requests not matching the blocklist are still allowed. Important: does not serve as a security boundary and does not affect redirects. | |
| PLAYWRIGHT_MCP_EXECUTABLE_PATH | No | path to the browser executable. | |
| PLAYWRIGHT_MCP_IMAGE_RESPONSES | No | whether to send image responses to the client. Can be "allow", "omit" or "only". With "only", a response that carries an image consists of the image parts alone, without the text part. Defaults to "allow". | |
| PLAYWRIGHT_MCP_OUTPUT_MAX_SIZE | No | Threshold for evicting old output files, in bytes. | |
| PLAYWRIGHT_MCP_PROFILE_DIR_NAME | No | name of the profile directory in the user data dir to connect to with --extension, for example "Profile 1". Defaults to the last used profile that has the extension installed. | |
| PLAYWRIGHT_MCP_GRANT_PERMISSIONS | No | List of permissions to grant to the browser context, for example "geolocation", "clipboard-read", "clipboard-write". | |
| PLAYWRIGHT_MCP_TEST_ID_ATTRIBUTE | No | specify the attribute to use for test ids, defaults to "data-testid" | |
| PLAYWRIGHT_MCP_TIMEOUT_NAVIGATION | No | specify navigation timeout in milliseconds, defaults to 60000ms | |
| PLAYWRIGHT_MCP_IGNORE_HTTPS_ERRORS | No | ignore https errors | |
| PLAYWRIGHT_MCP_BLOCK_SERVICE_WORKERS | No | block service workers | |
| PLAYWRIGHT_MCP_SHARED_BROWSER_CONTEXT | No | reuse the same browser context between all connected HTTP clients. | |
| PLAYWRIGHT_MCP_ALLOW_UNRESTRICTED_FILE_ACCESS | No | allow access to files outside of the workspace roots. Also allows unrestricted access to file:// URLs. By default access to file system is restricted to workspace root directories (or cwd if no roots are configured) only, and navigation to file:// URLs is blocked. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| browser_closeB | Close the page |
| browser_resizeB | Resize the browser window |
| browser_console_messagesC | Returns all console messages |
| browser_handle_dialogC | Handle a dialog |
| browser_emulate_mediaA | Emulate CSS media features for the page, for example switch between the light and dark color scheme. Omitted parameters are left unchanged; null clears an override. |
| browser_evaluateC | Evaluate JavaScript expression on page or element |
| browser_file_uploadB | Upload one or multiple files |
| browser_dropA | 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. |
| browser_findA | Search the accessibility snapshot of the current page for text or a regular expression. Returns matching snapshot nodes with a few lines of surrounding context (like search snippets), each shown under its path from the root of the tree, which is cheaper than capturing the whole snapshot when you only need to locate an element and its ref. |
| browser_fill_formB | Fill multiple form fields |
| browser_press_keyB | Press a key on the keyboard |
| browser_typeB | Type text into editable element |
| browser_navigateC | Navigate to a URL |
| browser_navigate_backA | Go back to the previous page in the history |
| browser_network_requestsA | Returns a numbered list of network requests since loading the page. Use browser_network_request with the number to get full details. |
| browser_network_requestA | Returns full details (headers and body) of a single network request, or a single part if |
| browser_run_code_unsafeA | Run a Playwright code snippet. Unsafe: executes arbitrary JavaScript in the Playwright server process and is RCE-equivalent. |
| browser_take_screenshotA | Take a screenshot of the current page. You can't perform actions based on the screenshot, use browser_snapshot for actions. |
| browser_snapshotA | Capture accessibility snapshot of the current page, this is better than screenshot |
| browser_clickB | Perform click on a web page |
| browser_dragA | Perform drag and drop between two elements |
| browser_hoverA | Hover over element on page |
| browser_select_optionB | Select an option in a dropdown |
| browser_tabsA | List, create, close, or select a browser tab. |
| browser_wait_forB | Wait for text to appear or disappear or a specified time to pass |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 25 tools
Most tools have clearly distinct purposes: navigation, interaction (click/hover/type), inspection (snapshot/find/console/network), and page-level operations are well separated. A few boundaries blur: browser_close vs browser_tabs (which also closes tabs), browser_evaluate vs browser_run_code_unsafe (both execute JS, differing mainly in scope/safety), and browser_take_screenshot explicitly defers to browser_snapshot for actions. These overlaps are minor and mostly clarified by descriptions.
All tools share a consistent browser_ snake_case prefix with predictable verb/noun forms (browser_navigate, browser_click, browser_select_option). Minor deviations exist where names are noun-only (browser_tabs, browser_snapshot, browser_console_messages, browser_network_requests) while sibling tools use verbs, but the pattern remains readable and predictable.
25 tools is at the heavy end for a single-purpose server, and the surface is large enough that an agent must choose carefully among many similar-sounding browser operations. Each tool does map to a real browser capability, but the count is borderline enough to feel dense rather than tightly scoped.
The surface covers the core browser automation lifecycle well: navigation, tab management, element interaction, forms, keyboard, dialogs, console/network inspection, screenshots, emulation, file upload, and drag-and-drop. Gaps remain around cookie/storage management (localStorage/sessionStorage) and download handling, which agents may need but can partially work around via evaluate.