Skip to main content
Glama

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.
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_BROWSERNobrowser or chrome channel to use, possible values: chrome, firefox, webkit, msedge.
PLAYWRIGHT_MCP_CODEGENNospecify the language to use for code generation, possible values: "typescript", "none". Default is "typescript".
PLAYWRIGHT_MCP_SANDBOXNoenable the sandbox for all process types that are normally not sandboxed.
PLAYWRIGHT_MCP_SECRETSNopath to a file containing secrets in the dotenv format
PLAYWRIGHT_MCP_ENDPOINTNoBound browser endpoint to connect to.
PLAYWRIGHT_MCP_HEADLESSNorun browser in headless mode, headed by default
PLAYWRIGHT_MCP_ISOLATEDNokeep the browser profile in memory, do not save it to disk.
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_CDP_HEADERNoCDP headers to send with the connect request, multiple can be specified.
PLAYWRIGHT_MCP_NO_SANDBOXNodisable the sandbox for all process types that are normally sandboxed.
PLAYWRIGHT_MCP_OUTPUT_DIRNopath to the directory for output files.
PLAYWRIGHT_MCP_USER_AGENTNospecify user agent string
PLAYWRIGHT_MCP_CDP_TIMEOUTNotimeout in milliseconds for connecting to CDP endpoint, defaults to 30000ms
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_OUTPUT_MODENowhether to save snapshots, console messages, network logs to a file or to the standard output. Can be "file" or "stdout". Default is "stdout".
PLAYWRIGHT_MCP_CDP_ENDPOINTNoCDP endpoint to connect to.
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" or "socks5://myproxy:8080"
PLAYWRIGHT_MCP_SAVE_SESSIONNoWhether to save the Playwright MCP session into the output directory.
PLAYWRIGHT_MCP_ALLOWED_HOSTSNocomma-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_LEVELNolevel of console messages to return: "error", "warning", "info", "debug". Each level includes the messages of more severe levels.
PLAYWRIGHT_MCP_SNAPSHOT_MODENowhen taking snapshots for responses, specifies the mode to use. Can be "full" or "none". Default is "full".
PLAYWRIGHT_MCP_STORAGE_STATENopath to the storage state file for isolated sessions.
PLAYWRIGHT_MCP_USER_DATA_DIRNopath to the user data directory. If not specified, a temporary directory will be created.
PLAYWRIGHT_MCP_VIEWPORT_SIZENospecify browser viewport size in pixels, for example "1280x720"
PLAYWRIGHT_MCP_TIMEOUT_ACTIONNospecify action timeout in milliseconds, defaults to 5000ms
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" or "omit", Defaults to "allow".
PLAYWRIGHT_MCP_GRANT_PERMISSIONSNoList of permissions to grant to the browser context, for example "geolocation", "clipboard-read", "clipboard-write".
PLAYWRIGHT_MCP_TEST_ID_ATTRIBUTENospecify the attribute to use for test ids, defaults to "data-testid"
PLAYWRIGHT_MCP_TIMEOUT_NAVIGATIONNospecify navigation timeout in milliseconds, defaults to 60000ms
PLAYWRIGHT_MCP_IGNORE_HTTPS_ERRORSNoignore https errors
PLAYWRIGHT_MCP_BLOCK_SERVICE_WORKERSNoblock service workers
PLAYWRIGHT_MCP_SHARED_BROWSER_CONTEXTNoreuse the same browser context between all connected HTTP clients.
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.

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
browser_closeB

Close the page

browser_resizeA

Resize the browser window

browser_console_messagesC

Returns all console messages

browser_handle_dialogB

Handle a dialog

browser_evaluateB

Evaluate JavaScript expression on page or element

browser_file_uploadA

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_fill_formB

Fill multiple form fields

browser_press_keyA

Press a key on the keyboard

browser_typeB

Type text into editable element

browser_navigateB

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 part is set. Use the number from browser_network_requests.

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_clickA

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

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

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/Hanato238/playwright-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server