Skip to main content
Glama
Playwright MCP
by snighut

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PLAYWRIGHT_MCP_CAPSNoComma-separated list of additional capabilities to enable. Possible values: vision, pdf, devtools.
PLAYWRIGHT_MCP_HOSTNoHost to bind server to. Default is localhost. Use 0.0.0.0 to bind to all interfaces.localhost
PLAYWRIGHT_MCP_PORTNoPort to listen on for SSE transport.
PLAYWRIGHT_MCP_CONFIGNoPath to the configuration file.
PLAYWRIGHT_MCP_DEVICENoDevice to emulate, for example iPhone 15.
PLAYWRIGHT_MCP_MOBILENoEmulate 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_WEBMCPNoWhether to collect and expose the tools that a page registers through the WebMCP API. Set to false to disable (--no-webmcp).true
PLAYWRIGHT_MCP_BROWSERNoBrowser or chrome channel to use. Possible values: chrome, firefox, webkit, msedge.
PLAYWRIGHT_MCP_CODEGENNoLanguage to use for code generation. Possible values: typescript, python, java, csharp, none. Default is typescript.typescript
PLAYWRIGHT_MCP_SANDBOXNoEnable or disable the browser sandbox. Set to false to disable the sandbox (--no-sandbox) or true to enable it (--sandbox).
PLAYWRIGHT_MCP_HEADLESSNoRun browser in headless mode; headed by default.false
PLAYWRIGHT_MCP_ISOLATEDNoKeep the browser profile in memory, do not save it to disk.false
PLAYWRIGHT_MCP_EXTENSIONNoConnect to a running browser instance (Edge/Chrome only). Requires the Playwright Extension to be installed.
PLAYWRIGHT_MCP_INIT_PAGENoPath to TypeScript file to evaluate on Playwright page object.
PLAYWRIGHT_MCP_BACKGROUNDNoDo not activate controlled tabs or focus the browser window when using --extension.false
PLAYWRIGHT_MCP_FILE_PATHSNoHow file paths are rendered in tool results: relative to the workspace root or absolute. Default is relative.relative
PLAYWRIGHT_MCP_OUTPUT_DIRNoPath 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_CDP_HEADERSNoCDP headers to send with the connect request; multiple can be specified.
PLAYWRIGHT_MCP_CDP_TIMEOUTNoTimeout in milliseconds for connecting to CDP endpoint. Defaults to 30000ms.30000
PLAYWRIGHT_MCP_INIT_SCRIPTNoPath 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_ENDPOINTNoCDP endpoint to connect to.
PLAYWRIGHT_MCP_IDLE_TIMEOUTNoClose 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_IGNORE_ROOTSNoDo not ask the client for its workspace roots, use the current working directory as the workspace root instead. Use this with clients that advertise roots, but cannot answer the roots request.false
PLAYWRIGHT_MCP_NO_TAB_GROUPNoDo not group controlled tabs when using --extension.false
PLAYWRIGHT_MCP_PROXY_BYPASSNoComma-separated domains to bypass proxy, for example .com,chromium.org,.domain.com.
PLAYWRIGHT_MCP_PROXY_SERVERNoSpecify proxy server, for example http://myproxy:3128, http://user:password@myproxy:3128 or socks5://myproxy:8080.
PLAYWRIGHT_MCP_SECRETS_FILENoPath to a file containing secrets in the dotenv format.
PLAYWRIGHT_MCP_SESSION_NAMENoName of the session. With --extension, it is the title of the tab group for controlled tabs.
PLAYWRIGHT_MCP_ALLOWED_HOSTSNoComma-separated list of hosts this server is allowed to serve from. Defaults to localhost, loopback IPs and the host passed via --host; other hosts must be listed explicitly. Pass '*' to disable the host check.
PLAYWRIGHT_MCP_CONSOLE_LEVELNoLevel of console messages to return: error, warning, info, debug. Each level includes the messages of more severe levels. Defaults to info.info
PLAYWRIGHT_MCP_SESSION_COLORNoColor of the session: blue, red, yellow, green, pink, purple, cyan or orange. With --extension, it is the color of the tab group for controlled tabs.
PLAYWRIGHT_MCP_STORAGE_STATENoPath to the storage state file for isolated sessions.
PLAYWRIGHT_MCP_TIMEOUT_ACTIONNoSpecify action timeout in milliseconds, defaults to 5000ms.5000
PLAYWRIGHT_MCP_ALLOWED_ORIGINSNoSemicolon-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_ORIGINSNoSemicolon-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_PATHNoPath to the browser executable.
PLAYWRIGHT_MCP_IMAGE_RESPONSESNoWhether 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.allow
PLAYWRIGHT_MCP_OUTPUT_MAX_SIZENoThreshold for evicting old output files, in bytes.
PLAYWRIGHT_MCP_PROFILE_DIR_NAMENoName 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_PERMISSIONSNoList of permissions to grant to the browser context, for example geolocation, clipboard-read, clipboard-write.
PLAYWRIGHT_MCP_REDACT_URL_PARAMSNoComma-separated list of URL query and fragment parameter names, for example access_token,code, whose values are replaced with <redacted> in the tool responses.
PLAYWRIGHT_MCP_TEST_ID_ATTRIBUTENoSpecify the attribute to use for test ids, defaults to data-testid.data-testid
PLAYWRIGHT_MCP_TIMEOUT_NAVIGATIONNoSpecify navigation timeout in milliseconds, defaults
PLAYWRIGHT_MCP_IGNORE_HTTPS_ERRORSNoIgnore HTTPS errors.false
PLAYWRIGHT_MCP_BLOCK_SERVICE_WORKERSNoBlock service workers.
PLAYWRIGHT_MCP_ALLOW_UNRESTRICTED_FILE_ACCESSNoAllow 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

Server capabilities have not been inspected yet.

Tools

Functions exposed to the LLM to take actions

NameDescription

No tools

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources