Is Playwright MCP Server official?
Yes. It is published by Microsoft as `@playwright/mcp` in the microsoft/playwright-mcp repository on GitHub.
@microsoft
Basic information
Playwright MCP server
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": [
"@playwright/mcp@latest"
]
}
}
}Close the page
Resize the browser window
Returns all console messages
Handle a dialog
Emulate 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.
Evaluate JavaScript expression on page or element
Upload one or multiple files
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.
Search the accessibility snapshot of the current page for text or a regular expression. Returns matching snapshot nodes with a few lines of surrounding context (like search snippets), each shown under its path from the root of the tree, which is cheaper than capturing the whole snapshot when you only need to locate an element and its ref.
Fill multiple form fields
Press a key on the keyboard
Type text into editable element
Navigate to a URL
Go back to the previous page in the history
Returns a numbered list of network requests since loading the page. Use browser_network_request with the number to get full details.
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.
Run a Playwright code snippet. Unsafe: executes arbitrary JavaScript in the Playwright server process and is RCE-equivalent.
Take a screenshot of the current page. You can't perform actions based on the screenshot, use browser_snapshot for actions.
Capture accessibility snapshot of the current page, this is better than screenshot
Perform click on a web page
Perform drag and drop between two elements
Hover over element on page
Select an option in a dropdown
List, create, close, or select a browser tab.
Wait for text to appear or disappear or a specified time to pass. When both text and textGone are provided, waits for the first one to happen
Playwright MCP Server is Microsoft's official playwright mcp package (@playwright/mcp) that gives AI agents browser automation through Playwright. It lets an LLM read and act on web pages through structured accessibility snapshots instead of screenshots, so no vision model is needed.
The project is open source under the Apache-2.0 license and maintained in the microsoft/playwright-mcp repository. It runs locally over stdio by default, and it can also be started as a standalone HTTP server that MCP clients connect to by URL.
Prerequisites: Node.js 18 or newer and an MCP client such as Claude Code, Claude Desktop, Cursor, VS Code, Windsurf, Codex or Goose. No API key or account is required.
The standard config works in most clients:
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": [
"@playwright/mcp@latest"
]
}
}
}
Extra options are added to the args list, for example "--headless", "--browser=firefox" or "--isolated".
claude mcp add playwright npx @playwright/mcp@latest
Follow the MCP install guide and paste the standard config above into your Claude Desktop config file.
Go to Cursor Settings -> MCP -> Add new MCP Server, choose the command type and enter npx @playwright/mcp@latest. The README also provides a one-click install button.
Use the standard config with the VS Code MCP setup, or install from the command line:
code --add-mcp '{"name":"playwright","command":"npx","args":["@playwright/mcp@latest"]}'
The server then becomes available to the GitHub Copilot agent in VS Code.
codex mcp add playwright npx "@playwright/mcp@latest"
Or add it to ~/.codex/config.toml:
[mcp_servers.playwright]
command = "npx"
args = ["@playwright/mcp@latest"]
Follow the Windsurf MCP documentation and use the standard config above.
To run the playwright mcp server as a long-lived process (for example on a machine where the IDE cannot open a headed browser), start it with a port:
npx @playwright/mcp@latest --port 8931
Then point the client at the endpoint:
{
"mcpServers": {
"playwright": {
"url": "http://localhost:8931/mcp"
}
}
}
A Docker image is also published (mcr.microsoft.com/playwright/mcp); it currently supports headless Chromium only.
--browser accepts chrome, firefox, webkit or msedge, and --device or --mobile emulates mobile devices.--isolated in-memory sessions with optional --storage-state, or the Playwright browser extension to reuse tabs in your running Chrome or Edge.--caps.PLAYWRIGHT_MCP_* environment variable, and a JSON file can be loaded with --config.--allowed-origins and --blocked-origins lists, and --allowed-hosts for the HTTP server.The default toolset covers core automation:
browser_navigate, browser_navigate_back, browser_resize, browser_close and browser_tabs for listing, opening, closing and switching tabs.browser_snapshot captures the accessibility snapshot that agents use to target elements; browser_find searches that snapshot for text or a regex, which is cheaper than a full snapshot. browser_take_screenshot saves an image but cannot be used to pick targets.browser_click, browser_type, browser_fill_form, browser_select_option, browser_hover, browser_drag, browser_press_key, browser_file_upload, browser_drop and browser_handle_dialog.browser_console_messages, browser_network_requests and browser_network_request for headers and bodies, plus browser_evaluate for JavaScript and browser_wait_for for text or timeouts.browser_run_code_unsafe runs a Playwright snippet in the server process; the README labels it RCE-equivalent.Opt-in groups add tools such as browser_pdf_save (--caps=pdf), browser_mouse_click_xy (--caps=vision), browser_start_tracing (--caps=devtools), browser_cookie_list (--caps=storage), browser_route (--caps=network) and browser_verify_text_visible (--caps=testing).
--codegen option sets TypeScript, Python, Java or C#).--port 8931 and connect by url.--isolated or a distinct --user-data-dir.--caps, for example --caps=pdf.file:// URLs: file access is restricted to workspace roots by default. --allow-unrestricted-file-access lifts this, so use it with care.Yes. It is published by Microsoft as `@playwright/mcp` in the microsoft/playwright-mcp repository on GitHub.
Yes. It is open source under Apache-2.0 and needs no API key or paid account; you only pay for the LLM client you use.
Yes. Claude Code uses `claude mcp add playwright npx @playwright/mcp@latest`, VS Code supports `code --add-mcp`, and Cursor accepts the `npx @playwright/mcp@latest` command in its MCP settings.
No. The mcp playwright server works from accessibility snapshots by default. Coordinate-based tools are available only if you enable `--caps=vision`.
Yes. The default persistent profile keeps logins between sessions, and the Playwright browser extension (`--extension`) connects to your running Chrome or Edge tabs.
You can run it as an HTTP server with `--port` (and `--host 0.0.0.0` to bind all interfaces) or in Docker, then connect clients by URL.
The README states it is not a security boundary. Origin allow and block lists do not stop redirects, and `browser_run_code_unsafe` can run arbitrary code, so run it only where you trust the agent and the sites it visits.
Chrome, Firefox, WebKit and Microsoft Edge through the `--browser` option, plus device emulation through `--device` or `--mobile`.
An MCP server for fetching URLs / Youtube video transcript.

An MCP server for generating images from HTML & CSS or screenshots of URLs using htmlcsstoimage.com.
A flexible HTTP fetching Model Context Protocol server.
Loadster is a load testing, stress testing, and synthetic monitoring platform. Run Playwright, Browser Bots, and Protocol Bots to test and monitor your websites, web apps, and APIs. Loadster MCP gives your agents the abi

Model Context Protocol Servers
Comments