MCP ConfigsApr 6, 2026·2 min read

Playwright MCP — Browser Automation for AI Agents

Official Playwright MCP server that gives AI agents full browser control — navigate pages, fill forms, click buttons, take screenshots, and run end-to-end tests. 3,000+ stars.

MC
MCP Hub · Community
Quick Use

Use it first, then decide how deep to go

This block should tell both the user and the agent what to copy, install, and apply first.

Add to your .mcp.json:

{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": ["-y", "@anthropic/mcp-playwright"]
    }
  }
}

Restart Claude Code. Ask: "Open https://example.com, take a screenshot, and describe what you see."


Intro

Playwright MCP is the official Model Context Protocol server for Playwright browser automation, giving AI agents like Claude Code full control over web browsers with 3,000+ GitHub stars. Navigate pages, fill forms, click buttons, extract content, take screenshots, and run end-to-end tests — all through natural language commands. The agent sees the page structure and can interact with any element. Best for developers who need AI-assisted web testing, scraping, or workflow automation. Works with: Claude Code, Cursor, any MCP client. Setup time: under 1 minute.


Available Tools

Navigation

"Open https://github.com/trending"
"Go back to the previous page"
"Wait for the login form to appear"

Interaction

"Click the Sign In button"
"Fill the email field with test@example.com"
"Select 'Monthly' from the billing dropdown"
"Press Enter to submit the form"

Content Extraction

"Extract all product names and prices from this page"
"Get the text content of the main article"
"List all links on this page"

Screenshots & Visual

"Take a screenshot of the current page"
"Take a screenshot of just the navigation bar"
"Compare this page with the expected design"

Testing

"Verify the login flow works: go to /login, enter credentials, check dashboard loads"
"Test that the search returns results for 'AI tools'"
"Check all navigation links return 200 status"

Use Cases

E2E Test Generation

"Write Playwright tests for the checkout flow on our staging site"
→ Agent navigates the flow, records interactions, generates test code

Web Scraping

"Scrape the top 10 Hacker News stories with their scores and links"Agent navigates HN, extracts structured data

Form Automation

"Fill out the registration form on staging with test data and submit"Agent fills fields, handles validation, submits

Key Stats

  • 3,000+ GitHub stars
  • Full Playwright browser control
  • Chromium, Firefox, WebKit support
  • Screenshots and visual testing
  • Natural language interaction

FAQ

Q: What is Playwright MCP? A: Playwright MCP is an MCP server that gives AI agents full browser control through Playwright, enabling web navigation, form filling, testing, and scraping via natural language commands.

Q: Is Playwright MCP free? A: Yes, open-source. Playwright itself is free and maintained by Microsoft.

Q: Does it run a visible browser? A: By default it runs headless (invisible). Set headless mode to false for debugging.


🙏

Source & Thanks

Built on Playwright by Microsoft. Licensed under Apache 2.0.

playwright — ⭐ 70,000+

Thanks to Microsoft and the MCP community for bridging AI agents and browsers.

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets