mcp-agent-playwright
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MCP_PLAYWRIGHT_BROWSER | No | Browser to use: 'firefox' or 'webkit' (own-browser mode only). | chromium |
| MCP_PLAYWRIGHT_HEADLESS | No | Set to '0' for a visible browser window (own-browser mode). | 1 |
| MCP_PLAYWRIGHT_VIEWPORT | No | Browser viewport dimensions. | 1280,900 |
| MCP_PLAYWRIGHT_CDP_ENDPOINT | No | CDP URL to attach to instead of launching a browser. | |
| MCP_PLAYWRIGHT_SCREENSHOT_DIR | No | Directory where browser_screenshot saves files. | ./screenshots |
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": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| browser_statusA | Report browser state: current page URL, title, and open tab list. Use this first if you are unsure whether a browser is running. |
| browser_navigateA | Open a URL in the browser. Creates a page if none exists; otherwise navigates the active tab. |
| browser_snapshotA | Read the current page as a numbered accessibility tree. Interactive elements are prefixed with [ref] numbers. Pass a ref to any browser_* tool that accepts a target. Re-run after every action. |
| browser_clickB | Click an element: snapshot ref number or locator string. |
| browser_typeA | Type text into an input field, replacing its current content. |
| browser_press_keyA | Press a keyboard key on the page. For Enter after typing use browser_type(..., enter=True). |
| browser_hoverA | Move the mouse cursor over an element (for hover menus/tooltips). |
| browser_select_optionA | Select an option in a dropdown () by value or label. |
| browser_go_backA | Navigate the active tab back in history. |
| browser_go_forwardB | Navigate the active tab forward in history. |
| browser_wait_for_textA | Wait until a piece of text becomes visible on the page, or the timeout runs out. |
| browser_wait_for_timeoutB | Wait a fixed amount of time (page sleeps/progress bars). |
| browser_screenshotA | Take a screenshot of the current viewport and save it as a PNG file. Returns the absolute file path and image size. Does NOT show the image to the model — use browser_snapshot for content. |
| browser_tabsA | List open browser tabs with index, title and URL. |
| browser_tab_newB | Open a new browser tab and switch to it. |
| browser_tab_switchA | Switch to an existing tab by its index from browser_tabs(). |
| browser_tab_closeA | Close a browser tab. Defaults to the active tab. |
| browser_evaluateA | Run arbitrary JavaScript in the page and return the result. Example: |
| browser_console_messagesA | Return recent browser console messages (errors, warnings, logs). |
| browser_closeA | Shut down the browser and forget all state (tabs, refs, console log). In CDP mode this detaches from the attached browser without closing it. |
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 20 tools
Most tools map to distinct, well-separated browser actions like navigate, click, type, and tab management. The main overlap is between browser_status and browser_tabs, both reporting tab information, and between the two wait tools, but their descriptions are clear enough to guide correct selection.
All tools share a consistent browser_ prefix and mostly use a clear verb-action pattern such as browser_navigate, browser_click, and browser_tab_switch. A few query-style names like browser_status, browser_snapshot, and browser_tabs deviate slightly from strict verb_noun naming, but the pattern remains highly predictable.
Twenty tools is on the higher end but appropriate for browser automation, where atomic actions like clicking, typing, waiting, tab management, and screenshotting each need dedicated operations. The set could be slightly consolidated, but no tool feels redundant or out of place.
The toolset covers the core browser lifecycle well: navigation, interaction, waiting, tab management, JavaScript evaluation, console inspection, screenshots, and shutdown. Missing conveniences like explicit refresh or scroll are minor because browser_evaluate can cover them, so agents should not hit dead ends.