Playwright MCP
by Microsoft
Browser automation for LLMs via accessibility snapshots, no vision models needed
browser Node.js Beginner Self-hostable No API key Verified Featured
β 27.9k stars π
Updated: 1mo ago
Description
Official Microsoft MCP server that enables LLMs to interact with web pages through structured accessibility snapshots instead of screenshots. Powered by Playwright, it provides deterministic browser automation without requiring vision models β the AI works with accessibility trees, making interactions fast, lightweight, and unambiguous. Supports both persistent browser profiles (maintaining session state) and isolated contexts (clean state per session). Includes browser extension support for connecting to existing tabs with logged-in sessions, TypeScript code generation for recorded actions, and extensive configuration with 50+ command-line options.
β Best for
Any AI workflow that needs fast, reliable web interaction without screenshot-based vision
βοΈ Skip if
Your use case requires pixel-level visual analysis of web pages
π‘ Use cases
- Automating web browsing tasks from AI assistants without vision models
- End-to-end testing driven by natural language instructions
- Scraping and extracting structured data from websites via accessibility trees
- Recording browser interactions and generating TypeScript automation code
π Pros
- β No vision model required β uses accessibility snapshots for speed and accuracy
- β Official Microsoft project with massive community (27k+ stars)
- β Simple install via npx with one-click setup for 15+ MCP clients
- β Supports persistent profiles, isolated contexts, and browser extension mode
π Cons
- β Accessibility snapshots may miss visual-only elements not in the DOM tree
- β Complex SPAs may produce large accessibility trees that consume context
- β No built-in support for multi-tab parallel automation
π§ Exposed tools (12 tools)
| Tool | Category | Description |
|---|---|---|
| browser_generate_playwright_test | code-generation | Generate Playwright test script from recorded actions |
| browser_console_messages | debugging | Retrieve browser console messages |
| browser_network_requests | debugging | List intercepted network requests and responses |
| browser_pdf_save | export | Save page as PDF |
| browser_click | interaction | Click on a web page element using accessibility reference |
| browser_type | interaction | Type text into an input field |
| browser_select_option | interaction | Select option from a dropdown element |
| browser_hover | interaction | Hover over a page element |
| browser_drag | interaction | Drag an element to a target location |
| browser_navigate | navigation | Navigate to a URL in the browser |
| browser_snapshot | observation | Capture accessibility snapshot of the current page |
| browser_screenshot | observation | Take a screenshot of the current page (requires vision) |
β‘ Installation
Prerequisites:
- β’ Node.js v18+
Check Claude Code documentation to configure this MCP server.
π‘ Tips & tricks
Use the --browser flag to choose between chromium, firefox, or webkit. The browser extension mode lets you connect to already-authenticated sessions, avoiding login flows.
π Alternatives
Quick info
- Author
- Microsoft
- License
- Apache-2.0
- Runtime
- Node.js 18+
- Transport
- stdio
- Category
- browser
- Difficulty
- Beginner
- Self-hostable
- β
- Auth
- β
- Docker
- β
- Version
- latest
- Updated
- Feb 28, 2026
Client compatibility
- β Claude Code
- β Cursor
- β VS Code Copilot
- β Gemini CLI
- β Windsurf
- β Cline
- β JetBrains AI
- β Warp
Platforms
π macOS π§ Linux πͺ Windows