What it does
Playwright MCP gives Claude a full, real browser — not a simplified HTTP fetcher. Claude launches a Chromium, Firefox, or WebKit instance, navigates to URLs, and interacts with pages exactly as a human user would. JavaScript executes, SPAs render, and dynamic content loads normally.
This makes it the right tool for any task requiring actual page interaction: testing login flows, automating form submissions, scraping content that requires JavaScript rendering, or taking visual screenshots for design review.
- Navigate to any URL and wait for full page load
- Click any element by CSS selector, text, or role
- Type text into inputs, textareas, and rich editors
- Take full-page or element-level screenshots
- Extract text content from any page or element
- Scroll, hover, and trigger mouse events
- Select dropdown options and interact with checkboxes
- Wait for elements to appear, disappear, or change
- Execute arbitrary JavaScript in the page context
How to connect
claude mcp add playwright -- npx -y @playwright/mcp
To use a headed (visible) browser instead of headless mode, pass the --headed flag:
claude mcp add playwright -- npx -y @playwright/mcp --headed
Available tools
navigate— go to a URL and wait for loadclick— click an element by selector or texttype— type text into a focused inputscreenshot— capture a screenshot of the page or elementget_text— extract visible text from the page or a selectorscroll— scroll the page or an elementhover— hover over an elementselect_option— select a value from a dropdownwait_for_element— wait until a selector is visibleevaluate_js— run JavaScript in the page context
Example usage
Ask Claude to test a login flow or audit a landing page visually:
# User prompt
Go to app.example.com/login, fill in the email and
password fields, click the submit button, and take
a screenshot of whatever page loads next.
navigate("https://app.example.com/login") type("input[name=email]", "user@example.com") type("input[name=password]", "••••••••") click("button[type=submit]") wait_for_element(".dashboard") screenshot() → returns base64 image
Performance note: Playwright launches a full browser process. For simple page fetching where JavaScript is not needed, consider the Fetch MCP instead — it is significantly faster for static content.