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

Playwright MCP

by microsoft

Headless browser automation for your AI assistant

browser Node.js Beginner Self-hostable No API key Verified Featured
πŸ“… Updated: 1w ago

Description

Playwright MCP puts the full capabilities of the Playwright automation framework at the disposal of your AI coding assistant. It spins up a managed browser instance β€” Chromium, Firefox, or WebKit β€” and gives the model the ability to navigate, interact with elements, extract content, and capture screenshots, all through a straightforward MCP tool interface. What makes this server particularly useful is its self-contained nature. Unlike approaches that require connecting to an existing browser, Playwright MCP manages its own browser lifecycle. This means zero setup friction: just install the package and your AI can start browsing. It handles page loads, waits for dynamic content, and deals with modern JavaScript-heavy SPAs without any extra configuration. The practical applications are broad. Your AI can verify that a UI change renders correctly by navigating to a local dev server and taking a screenshot. It can scrape structured data from documentation pages to help you write integration code. It can fill out and submit forms to test workflows end-to-end. Because Playwright supports all major browser engines, you can even ask your AI to check cross-browser compatibility for you.

βœ… Best for

Developers who want their AI to interact with web pages for testing, scraping, or verification without manual browser setup

⏭️ Skip if

You need to debug issues in your actual authenticated browser session β€” Chrome DevTools MCP gives you access to your real Chrome instance

πŸ’‘ Use cases

  • Verifying UI changes by navigating to local dev servers and taking comparison screenshots
  • Extracting structured data from web pages to inform code generation or documentation
  • End-to-end testing of web forms and multi-step user workflows through AI-driven automation

πŸ‘ Pros

  • βœ“ Self-contained β€” manages its own browser, no external dependencies to configure
  • βœ“ Cross-browser support with Chromium, Firefox, and WebKit engines
  • βœ“ Handles modern SPAs and dynamic content with built-in smart waiting strategies

πŸ‘Ž Cons

  • βœ— Downloads browser binaries on first install, which can take a few minutes and disk space
  • βœ— Cannot access authenticated sessions from your real browser β€” starts with a clean state each time

πŸ”§ Exposed tools (14 tools)

ToolCategoryDescription
screenshotcontent extractionCapture a screenshot of the current page or a specific element
get_textcontent extractionExtract visible text content from the page or a selected element
get_attributecontent extractionRetrieve the value of a specific HTML attribute from an element
typeinput automationType text character by character into the currently focused element
fill_forminput automationFill a form field with the specified value, clearing existing content first
select_optioninput automationSelect an option from a dropdown menu by value, label, or index
press_keyinput automationSimulate a keyboard key press, including special keys and combinations
clickinteractionClick on a page element identified by selector or text content
evaluateinteractionExecute JavaScript code in the browser page context and return the result
scrollinteractionScroll the page in a specified direction or to a particular element
hoverinteractionHover the mouse over an element to trigger hover-dependent behaviors
drag_and_dropinteractionDrag an element from one location and drop it onto another target element
navigatenavigationNavigate the managed browser to a specified URL
wait_fornavigationWait for a selector to appear, a navigation to complete, or a timeout to elapse

⚑ Installation

Prerequisites:

  • β€’ Node.js
claude mcp add playwright -- npx @anthropic-ai/playwright-mcp@latest

πŸ’‘ Tips & tricks

For the fastest results, let Playwright use its default Chromium engine. If you need to test in a specific browser, you can set the browser type in the server configuration. When scraping content, ask the AI to use `get_text` on specific selectors rather than the entire page to get cleaner, more focused results. For local development, make sure your dev server is running before asking the AI to navigate to it.

πŸ”„ Alternatives

Quick info

Author
microsoft
License
Runtime
Node.js
Transport
stdio
Category
browser
Difficulty
Beginner
Self-hostable
βœ…
API key
No API key needed
Docker
β€”
Version
0.0.0
Updated
Feb 12, 2026

Client compatibility

  • βœ… Claude Code
  • βœ… Cursor
  • βœ… VS Code Copilot
  • βœ… Gemini CLI
  • βœ… Windsurf
  • βœ… Cline
  • βœ… JetBrains AI
  • βœ… Warp

Platforms

🍎 macOS 🐧 Linux πŸͺŸ Windows