Playwright MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PLAYWRIGHT_MCP_LOG_LEVEL | No | debug, info, warn, or error. | |
| PLAYWRIGHT_MCP_MAX_PAGES | No | Page cap. Default: 32. | 32 |
| PLAYWRIGHT_MCP_HTTP_TOKEN | No | Require Authorization: Bearer <token> for HTTP mode. | |
| PLAYWRIGHT_MCP_ARTIFACT_DIR | No | Screenshots, traces, PDFs, downloads, and storage state directory. Default: ./artifacts. | ./artifacts |
| PLAYWRIGHT_MCP_MAX_CONTEXTS | No | Browser context cap. Default: 8. | 8 |
| PLAYWRIGHT_MCP_ALLOW_UPLOADS | No | Enable upload tools. Default: false. | false |
| PLAYWRIGHT_MCP_ALLOW_EVALUATE | No | Enable the dangerous evaluate tool. Default: false. | false |
| PLAYWRIGHT_MCP_ALLOWED_ORIGINS | No | Comma-separated browser navigation allowlist. | |
| PLAYWRIGHT_MCP_ALLOW_DOWNLOADS | No | Enable download tools and accepting downloads. Default: false. | false |
| PLAYWRIGHT_MCP_BLOCKED_ORIGINS | No | Comma-separated browser navigation blocklist. | |
| PLAYWRIGHT_MCP_DEFAULT_TIMEOUT_MS | No | Default Playwright timeout. Default: 30000. | 30000 |
| PLAYWRIGHT_MCP_HTTP_ALLOWED_ORIGINS | No | Comma-separated CORS allowlist. |
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_launchB | Launch a Playwright browser lazily. Other tools also launch Chromium automatically when needed. |
| browser_stateB | List active browser, contexts, pages, and current active page. |
| browser_closeA | Close the browser and release all contexts/pages. |
| context_newC | Create an isolated browser context and make it active. |
| context_closeC | Close a browser context. Defaults to the active context. |
| page_newC | Create a new page in a context and make it active. |
| page_switchC | Make an existing page active. |
| page_closeC | Close a page. Defaults to the active page. |
| navigateC | Navigate a page to a URL and return status, title, and final URL. |
| reloadC | Reload the current page. |
| go_backC | Navigate back in page history. |
| wait_forC | Wait for selector, text, URL regex, timeout, load state, or network idle. |
| clickC | Click an element by selector, text, role, label, test id, or xpath. |
| fillC | Fill an input, textarea, contenteditable, or labelled field. |
| pressC | Press a key, optionally scoped to a selector. |
| select_optionC | Select options in a element. |
| set_checkedB | Check or uncheck a checkbox/radio control. |
| hoverC | Hover an element. |
| snapshotB | Return title, URL, capped visible text, interactive elements, console errors, and network failures. |
| screenshotC | Capture a page or element screenshot as PNG image content. |
| element_infoB | Return text, attributes, bounding box, visibility, and enabled state for an element. |
| assertC | Run a browser assertion and return a pass/fail result with failure context. |
| telemetryC | Return recent console, page error, response, and failed request telemetry. |
| evaluateB | Evaluate JavaScript in the page. Use for diagnostics when dedicated tools are insufficient. |
| storage_stateB | Return cookies and local storage for the active page context. |
| storage_state_saveB | Save cookies and local storage for the active page context into the artifact directory. |
| set_viewportC | Set viewport dimensions for a page. |
| trace_startC | Start Playwright tracing for the active page context. |
| trace_stopA | Stop tracing and return trace zip bytes as base64. |
| pdfC | Export the current page as a PDF artifact. Chromium only. |
| upload_filesA | Set files on an input[type=file]. File paths must be inside the artifact directory. |
| download_by_clickB | Click an element, wait for a download, and save it into the artifact directory. |
| network_blockC | Block requests whose URL matches a regular expression for the active page. |
| network_mock_jsonC | Fulfill matching requests with a JSON response for the active page. |
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 34 tools
Most tools have distinct purposes: lifecycle management (browser/context/page), interactions (click, fill, press), inspection (snapshot, element_info, telemetry), and artifact/network utilities. There is some potential overlap between snapshot, element_info, telemetry, evaluate, and assert, but the descriptions make the intended boundaries reasonably clear.
Everything uses snake_case, which is good, but conventions are mixed: noun_verb lifecycle names (browser_launch, page_new), bare action verbs (navigate, click), verb_noun actions (set_viewport, upload_files), and noun-only tools (pdf, storage_state). It remains readable, but an agent cannot fully predict the naming pattern.
34 tools is well above the comfortable range and feels heavy for a browser automation surface. While Playwright is feature-rich, several areas could be consolidated (e.g., storage_state/storage_state_save, trace_start/trace_stop, browser_launch versus implicit launch), making the set harder to navigate than necessary.
The surface covers the core browser automation lifecycle very broadly: launch/state/close, contexts, pages, navigation, interactions, waits, assertions, screenshots, PDFs, tracing, storage, uploads/downloads, and network mocking. Minor gaps remain around dialogs, iframes, drag-and-drop, forward history, and direct cookie/localStorage mutation, but evaluate can work around many of those.