Skip to main content
Glama
doucej

playwright-mcp-server

by doucej

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
STATE_DIRNoOverride the state directory for session persistence. Defaults to 'state/' in the project directory.state/

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
open_pageA

Navigate to a URL. Waits for DOMContentLoaded before returning.

go_backA

Navigate back in the browser history.

go_forwardA

Navigate forward in the browser history.

reloadA

Reload the current page.

get_urlA

Return the URL of the current page.

clickB

Click the first element matching the given selector.

typeA

Type text into a focusable element, appending to any existing value. Use fill to replace the existing value instead.

fillA

Set the value of an input or textarea, replacing any existing content.

pressA

Focus an element and press a keyboard key (e.g. Enter, Tab, Escape, ArrowDown).

hoverC

Move the mouse over an element.

select_optionA

Select an option in a element by value.

get_textA

Return the visible text content of the first element matching the selector.

get_attributeB

Return the value of an attribute on the first element matching the selector.

get_htmlA

Return the inner HTML of the first matching element. Defaults to when no selector is provided.

evaluateA

Execute a JavaScript expression in the page context and return the result as JSON. The expression may return any serialisable value.

wait_for_selectorA

Wait until an element matching the selector is present.

screenshotA

Capture a PNG screenshot of the current page or a specific element.

save_stateA

Persist the current browser session (cookies, localStorage, active URL) to disk. The state is reloaded automatically on server restart.

load_stateA

Reload the browser session from the last state saved on disk. Closes the current browser and opens a fresh one with the persisted cookies and URL.

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

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