What it does
Microsoft's MCP server that gives an AI agent a real browser via Playwright. It works from the page's structured accessibility snapshot instead of screenshots, so no vision model is needed.
Who it's for
Vibe coders and QA folks who want the agent to test their web app or automate web tasks.
How to set it up
Install Node.js 18 or newer.
Add to your MCP client config:
json{ "mcpServers": { "playwright": { "command": "npx", "args": [ "@playwright/mcp@latest" ] } } }Or via CLI: Claude Code / Codex:
bashclaude mcp add playwright npx @playwright/mcp@latest codex mcp add playwright npx "@playwright/mcp@latest"Optional flags include --headless, --isolated (in-memory profile) and --browser (chrome, firefox, webkit, msedge).
Using a coding agent? Microsoft notes that Playwright CLI + Skills (github.com/microsoft/playwright-cli) can be more token-efficient than the MCP server.
Check the official docs for the latest steps.
Example prompts
prompt
Open localhost:3000, sign up with a test email and tell me if anything breaks.prompt
Go to my pricing page and check every link works.prompt
Fill out the contact form on my site and report the confirmation message.Demo
Demo coming soon
A short walkthrough of Playwright MCP in action.