← MCP directory

Playwright MCP server

official

Microsoft's Playwright MCP lets an agent drive a real browser through the page's accessibility tree rather than screenshots. It runs locally as an npm package or Docker image and is used for testing, debugging and web workflows.

What an agent can do

  • → Navigate, click and fill in forms
  • → Take screenshots of pages
  • → Read page structure and content
  • → Read console messages and network requests
  • → PDFs, request mocking, traces and video as opt-in

By default the browser starts with a persistent profile that keeps logins, so run it with --isolated. Microsoft states plainly that Playwright MCP is not a security boundary.

About the Playwright MCP server

Playwright MCP is Microsoft's server that lets an AI assistant drive a real browser. It is published as open source under the Apache 2.0 licence and runs on your own machine as the npm package @playwright/mcp, or as a Docker image. There is no hosted service and no account to create. The assistant reads the page's accessibility tree instead of screenshots, so no vision model is needed.

Teams use it to have an assistant click through a flow on the website and report what breaks, fill in forms, read console errors and network requests, take screenshots and check that a new release behaves as expected. With extra capabilities switched on it can also save PDFs, record video and traces, and produce test code such as locators and visibility checks.

By default the browser starts with a persistent profile, so logins remain between sessions and the assistant acts with them. The --isolated flag gives a profile that is discarded when the session closes. You can restrict which origins may be opened, but Microsoft states plainly that Playwright MCP is not a security boundary and that the origin lists do not affect redirects. Run it in a contained environment.

Things to ask

  • Open our home page, go through the booking flow and tell me at which step it gets stuck.
  • Fill in the contact form on the test environment with sample details and show which errors appear in the console.
  • Take one screenshot of the pricing page at mobile width and one at desktop width.
  • Which network requests fail when the checkout page loads?
  • Log in to staging with the test account and check that the invoice list is shown.

Tools the server exposes

  • browser_navigate
  • browser_navigate_back
  • browser_snapshot
  • browser_click
  • browser_type
  • browser_fill_form
  • browser_select_option
  • browser_hover
  • browser_drag
  • browser_press_key
  • browser_file_upload
  • browser_handle_dialog
  • browser_wait_for
  • browser_take_screenshot
  • browser_console_messages
  • browser_network_requests
  • browser_evaluate
  • browser_resize
  • browser_tabs
  • browser_close
GuideHow to set up Playwright MCP →

Part of these packages

Playwright is part of these Walma packages.

Developers

Questions about Playwright MCP

Is Playwright MCP free?+

Yes. Playwright MCP is open source under the Apache 2.0 licence and is installed as the npm package @playwright/mcp. There are no plans, no account and no hosted service to pay for. You need Node.js 18 or newer and an MCP client. The cost of the AI assistant you connect it to is separate.

Which package is it and where is the code?+

The server has no URL because it runs locally. The package is called @playwright/mcp and starts with npx @playwright/mcp@latest. The code lives in the repository github.com/microsoft/playwright-mcp. There is also a Docker image, mcr.microsoft.com/playwright/mcp, which supports headless Chromium only.

Does it need a sign-in?+

No, the server has no sign-in of its own. The browser does log in to the sites you visit, and with the default profile those logins are kept between sessions. With --isolated everything is discarded when the session closes, and an initial state can be loaded with --storage-state. With --extension the server connects to a Chrome or Edge that is already open.

Is it read-only?+

No. The assistant clicks, types, uploads files and submits forms in the browser, just as a user would. Everything it does happens with the logins the browser holds. You can restrict allowed and blocked origins, but Microsoft states that Playwright MCP is not a security boundary.

Which AI assistants does Playwright MCP work with?+

Microsoft's README has install steps for Claude Code, Claude Desktop, VS Code, Copilot, Cursor, Codex, Gemini CLI, Windsurf, Cline, Goose, Kiro, LM Studio and Warp, among others. In Claude Code the command claude mcp add playwright npx @playwright/mcp@latest is enough. Any client that can start a local MCP server works.

Which tools have to be switched on separately?+

The core tools for navigation, clicks, forms, screenshots, console and network are always there. Other groups are switched on with the --caps flag: pdf for saving PDFs, vision for coordinate-based mouse control, devtools for tracing and video, network for routing requests, storage for cookies and storage, and testing for verifications and locators.

Should you use Playwright MCP or the Playwright CLI?+

Microsoft writes in the same README that the CLI with ready-made skills is more token-efficient for coding agents. The MCP server is described as the right fit for specialised agentic loops that need persistent state and iterative reasoning over page structure.

Missing a connection?

We build and review MCP servers for teams that need them, and run them behind the same policy and log as the rest of the gateway.