Playwright MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| CAPS | No | Comma-separated list of capabilities to enable, possible values: tabs, pdf, history, wait, files, install. Default is all. | |
| HOST | No | Host to bind server to. Default is localhost. Use 0.0.0.0 to bind to all interfaces. | |
| PORT | No | Port to listen on for SSE transport. | |
| CONFIG | No | Path to the configuration file. | |
| DEVICE | No | Device to emulate, for example: "iPhone 15". | |
| VISION | No | Run server that uses screenshots (Aria snapshots are used by default). | |
| BROWSER | No | Browser or chrome channel to use, possible values: chrome, firefox, webkit, msedge. | |
| HEADLESS | No | Run browser in headless mode, headed by default. | |
| ISOLATED | No | Keep the browser profile in memory, do not save it to disk. | |
| NO_SANDBOX | No | Disable the sandbox for all process types that are normally sandboxed. | |
| OUTPUT_DIR | No | Path to the directory for output files. | |
| SAVE_TRACE | No | Whether to save the Playwright Trace of the session into the output directory. | |
| USER_AGENT | No | Specify user agent string. | |
| CDP_ENDPOINT | No | CDP endpoint to connect to. | |
| PROXY_BYPASS | No | Comma-separated domains to bypass proxy, for example ".com,chromium.org,.domain.com". | |
| PROXY_SERVER | No | Specify proxy server, for example "http://myproxy:3128" or "socks5://myproxy:8080". | |
| BROWSER_AGENT | No | Use browser agent (experimental). | |
| STORAGE_STATE | No | Path to the storage state file for isolated sessions. | |
| USER_DATA_DIR | No | Path to the user data directory. If not specified, a temporary directory will be created. | |
| VIEWPORT_SIZE | No | Specify browser viewport size in pixels, for example "1280, 720". | |
| ALLOWED_ORIGINS | No | Semicolon-separated list of origins to allow the browser to request. Default is to allow all. | |
| BLOCKED_ORIGINS | No | Semicolon-separated list of origins to block the browser from requesting. Blocklist is evaluated before allowlist. | |
| EXECUTABLE_PATH | No | Path to the browser executable. | |
| IMAGE_RESPONSES | No | Whether to send image responses to the client. Can be "allow", "omit", or "auto". Defaults to "auto". | |
| IGNORE_HTTPS_ERRORS | No | Ignore https errors. | |
| BLOCK_SERVICE_WORKERS | No | Block service workers. |
Capabilities
Server capabilities have not been inspected yet.
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| browser_closeA | Close the page |
| browser_resizeA | Resize the browser window |
| browser_console_messagesB | Returns all console messages |
| browser_handle_dialogC | Handle a dialog |
| browser_evaluateB | Evaluate JavaScript expression on page or element |
| browser_file_uploadB | Upload one or multiple files |
| browser_fill_formB | Fill multiple form fields |
| browser_installA | Install the browser specified in the config. Call this if you get an error about the browser not being installed. |
| browser_press_keyA | Press a key on the keyboard |
| browser_typeA | Type text into editable element |
| browser_navigateB | Navigate to a URL |
| browser_navigate_backA | Go back to the previous page |
| browser_network_requestsB | Returns all network requests since loading the page |
| browser_run_codeA | Run Playwright code snippet |
| 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_dragB | Perform drag and drop between two elements |
| browser_hoverB | 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_forA | 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 | |
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/lewisvoncken/playwright-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server