What is Playwright MCP?
Microsoft’s open-source MCP server gives AI assistants structured browser automation through Playwright. Provider or browser hosting costs may apply.
Official website: github.comNotes & related guides
How do you run Playwright MCP headless?
Add --headless to the arguments that start @playwright/mcp. The server normally opens a browser window. Use the visible mode first when you need to watch a failure, then replay the same interaction headlessly.
- For a clean session, check the separate --isolated option. Headless mode controls the window, and isolation controls profile state.
- Use a page you can safely inspect and confirm the same heading or link is visible in both runs.
Interact with structured page context
The server lets an MCP client use Playwright browser capabilities and inspect structured page information. That context helps an agent identify elements and perform interactions. The MCP package is an automation interface; the application’s test cases and acceptance criteria remain separate.
Choose persistent interaction or a CLI workflow
The README distinguishes MCP’s persistent interactive context from a CLI-plus-skills workflow. Repeatedly inspecting the same browser state has different needs from a concise scripted check. Client support and the way a task carries state between actions help determine the fit.
Setup, license and test configuration
The official repository contains the MCP package’s runtime and client setup instructions. A project using Playwright Test separately needs its own configuration and assertions. Adding an MCP server does not create that test suite or define what the application should do.
The open-source server requires a compatible MCP client. The local npm setup lists Node.js 18 or newer. For a clean test run, start with an isolated browser profile. Check your AI client or remote browser host separately for any fees.
Observe the result of important actions
A tool step finishing without an error only confirms that the automation action ran. A form task also needs the intended submission result, validation behavior and error state. An observable page state compared with an explicit expectation turns browser work into useful verification.
If the failure comes from an example for a different library version, use Context7 MCP to check the installed version’s API before editing. Return to the browser and verify the expected result after the fix.
A few more details
Is Playwright MCP the same as Playwright Test?
Playwright MCP provides an MCP interface to browser capabilities. A Playwright Test project defines and runs a separate test suite.
Should every coding task use MCP mode?
The maintainer also recommends considering CLI plus skills. Persistent context, client support and task shape determine the fit.
Sources & maker notes
This guide is based on the cited documentation and maker sources. vibeforthat has not run an independent installation or end-to-end product test for this article.
Tool Info
Has this tool changed? Help us keep it up to date
Playwright MCP Reviews
Loading reviews…
