Playwright MCP: Browser Automation for Claude
Microsoft's Playwright MCP server lets Claude drive a real browser through accessibility snapshots. Install for Claude Code, use cases, pros and cons.
By Claudekit Team Published 1 min read
- Type
- MCP Server
- Pricing
- Open Source
- Repository
- github.com
- GitHub stars
- 38,564
- Website
- npmjs.com
Playwright MCP is Microsoft’s MCP server for browser automation. Claude gets tools to open pages, click, type, fill forms and read results. Instead of screenshots, it works mainly from the page’s accessibility snapshot, a structured description of what is on screen.
Install in Claude Code
Requires Node.js 18 or newer:
claude mcp add playwright npx @playwright/mcp@latest
Run /mcp to confirm it connected. For other MCP clients, the README shows the JSON form, which runs npx @playwright/mcp@latest. Read the MCP guide to choose between local, project and user scope.
Use cases
Open localhost:3000, sign up with a test email, and tell me where the flow breaks
Fill out the contact form on the staging site and confirm the success message
Check that every link in the footer returns a page, not a 404
- Verifying UI changes Claude just made, closing the loop between code and result.
- Reproducing bugs reported as click paths.
- Light scraping of pages you are allowed to access.
Pros
- Official, actively maintained, free.
- Accessibility snapshots are cheaper and more deterministic than screenshot analysis.
- Works across MCP clients, including Claude Desktop and Claude Code.
Cons
- Adds a sizable set of browser tools to context; disable it when you are not testing UI.
- Browsing untrusted sites exposes Claude to prompt injection, so stick to sites you trust.
- Not a replacement for a committed test suite; ask Claude to turn findings into Playwright tests.
Related
- webapp-testing skill for writing Playwright scripts.
- Chrome DevTools MCP for performance traces and network debugging.
Frequently asked questions
Does Playwright MCP need screenshots or a vision model?
No. Its main mode works from the page's accessibility snapshot, which is structured text. That keeps it fast and avoids pixel-based guessing.
What do I need installed?
Node.js 18 or newer. The server is fetched with npx, and Playwright handles the browser.
Playwright MCP or the webapp-testing skill?
Playwright MCP gives Claude live browser tools. The webapp-testing skill teaches Claude to write and run Playwright scripts. Many people use both.