MCPdir β€” MCP Server Directory
πŸ‡¬πŸ‡§ πŸ‡ͺπŸ‡Έ

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)

ToolCategoryDescription
browser_generate_playwright_testcode-generationGenerate Playwright test script from recorded actions
browser_console_messagesdebuggingRetrieve browser console messages
browser_network_requestsdebuggingList intercepted network requests and responses
browser_pdf_saveexportSave page as PDF
browser_clickinteractionClick on a web page element using accessibility reference
browser_typeinteractionType text into an input field
browser_select_optioninteractionSelect option from a dropdown element
browser_hoverinteractionHover over a page element
browser_draginteractionDrag an element to a target location
browser_navigatenavigationNavigate to a URL in the browser
browser_snapshotobservationCapture accessibility snapshot of the current page
browser_screenshotobservationTake 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