Playwright MCP
Gives Claude a real browser for tests, scraping, and QA.
Gives Claude a real browser for tests, scraping, and QA.
What it is
Gives Claude a real browser. It opens pages, clicks through UIs, fills out forms, takes screenshots, and writes/runs E2E tests. Perfect for QA, scraping checks, and debugging live sites.
Install / Setup
Option 1 โ Terminal:
claude mcp add playwright -- npx -y @playwright/mcp@latest
(Add --scope user to enable it everywhere. Needs Node.js 18+.)
Option 2 โ Prompt Claude Code:
Install the official Microsoft Playwright MCP (@playwright/mcp) via claude mcp add, verify it's running with /mcp, and open https://example.com as a smoke test.
Liking this?
Inside the community I show you how I run all of this day-to-day โ live sessions, direct feedback on your setup, and my full configs.
Use cases
- Write an E2E test โ "Test the checkout flow on localhost:3000" โ Claude clicks through and logs the failures.
- Visual regression check โ After a deploy, diff screenshots of live vs. staging.
- Scraping with JS rendering โ For sites that are empty without JS: Claude opens, waits, and extracts.
- Reproduce a form bug โ User reports "the button does nothing" โ Claude reproduces it in the browser and debugs live.
- Lighthouse check โ Claude opens your page, hits DevTools, and reports the perf issues.
Pro tip
Always pass browser state (cookies, local storage) explicitly โ otherwise Claude tests logged out and wonders why the dashboard redirects. For repeat tests: save a storage state as JSON and reference it.
๐ Anyone can install MCPs. Knowing which combo actually moves the needle for your workflow โ that saves you weeks. Inside the community I share my full MCP stack. โ Join the Claude Code Mastery Community
Updated regularly โ follow @vine.codes for more.
Want more?