Automates web pages through Playwright using structured accessibility snapshots and MCP tools.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by Playwright MCP.
browser_closeClose the page
browser_resizeResize the browser window
browser_console_messagesReturns all console messages
browser_handle_dialogHandle a dialog
browser_emulate_mediaEmulate CSS media features for the page, for example switch between the light and dark color scheme. Omitted parameters are left unchanged; null clears an override.
browser_evaluateEvaluate JavaScript expression on page or element
The microsoft/playwright-mcp MCP server exposes Playwright browser automation through the Model Context Protocol. Agents can inspect a pageβs accessibility snapshot, locate elements by text or regular expression, and perform actions against referenced nodes. This makes the interaction model based on structured page data rather than pixel coordinates or visual interpretation.
It can navigate to URLs, move backward in browser history, click, hover, drag between elements, select dropdown options, fill forms, type text, press keys, and wait for page state changes. Browser tabs can be listed, created, closed, or selected. The server also supports screenshots, console message retrieval, dialog handling, file uploads, and dropping files or MIME-typed data onto an element.
The tool set includes network request listing and detailed request inspection. Agents can evaluate JavaScript on a page or element, run Playwright code through an explicitly unsafe tool, and inspect or call WebMCP tools registered by the page.
The server uses Playwright to control the browser and returns accessibility-oriented page representations to the MCP client. browser_snapshot is the primary inspection tool for actions, while browser_find searches the current snapshot and returns matching nodes with surrounding context and their paths. Screenshots are available for visual reference, but the supplied tool description states that actions should use snapshots instead.
This approach fits exploratory automation, iterative browser workflows, and tasks that need ongoing browser state. It does not require a vision model to identify page controls. The MCP connection allows an agent to combine inspection, action, waiting, and verification steps within one browser session.
The microsoft/playwright-mcp MCP server requires Node.js 18 or newer and an MCP-compatible client. The standard local configuration starts it with npx:
The repository documents setup paths for clients including VS Code, Cursor, Windsurf, Claude Desktop, and Cline. Cursor can add it from MCP settings or use the equivalent npx @playwright/mcp@latest command. Clineβs example uses a local STDIO server configuration and adds -y to the npx arguments. Claude Desktop uses the standard MCP configuration format.
Available operations include:
The microsoft/playwright-mcp MCP server is an MCP interface, while the repository notes that Playwright CLI with skills may suit coding-agent workflows where lower token usage is important. MCP is positioned for workflows that benefit from persistent state, introspection, and repeated reasoning over page structure.
browser_run_code_unsafe executes arbitrary JavaScript in the Playwright server process and is equivalent to remote-code execution in terms of risk. Use it only when that level of access is acceptable. WebMCP tool output is provided by the page and should be treated as untrusted. Screenshots cannot be used as the action basis according to the tool guidance; use browser_snapshot for page actions.
Always refer to the official documentation for the most accurate and up-to-date information.
Factual signals from GitHub, npm, and our automated checks β not a rating.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/microsoft-playwright-mcp)<a href="https://allmcps.com/mcp/microsoft-playwright-mcp"><img src="https://allmcps.com/api/badge/microsoft-playwright-mcp?style=directory" alt="Playwright MCP on AllMCPs" /></a>