playwright-mcp-server

Automates browser interactions through Playwright's accessibility tree via the Model Context Protocol.

7|2|Updated May 16, 2026
One-click install
npx skills add https://github.com/reason-machines/mcp-skills --skill playwright-mcp-server-reason-machines
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: playwright-mcp-server
Source: https://github.com/reason-machines/mcp-skills/tree/main/skills/playwright-mcp-server
Command: npx skills add https://github.com/reason-machines/mcp-skills --skill playwright-mcp-server-reason-machines

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @playwright/mcp.

What problem does it solve? Manually scripting browser automation for LLM agents is slow and brittle when relying on screenshots and vision models. This Skill connects an AI agent to the Playwright MCP server so it can navigate pages, click elements, fill forms, and extract data using structured accessibility snapshots. ## Core Features & Use Cases - Structured Page Interaction: Navigate, click, fill inputs, and read pages through accessibility tree snapshots instead of pixel-based screenshots. - Multi-Browser Support: Run automation on Chromium, Firefox, or WebKit with configurable headless mode, timeouts, and allowed hosts. - Data Extraction and Testing: Execute JavaScript in the page context, capture screenshots, and inspect accessibility trees for form automation, scraping, and accessibility audits. - Use Case: Ask your agent to log into a web app, fill a search form, extract product names and prices from the results, and save a screenshot of the final page as evidence. ## Quick Start Add the Playwright MCP server to your MCP client configuration with npx @playwright/mcp@latest, then ask your agent to navigate to a website and return its accessibility snapshot.

Frequently Asked Questions about playwright-mcp-server

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate browser tasks with Playwright MCP?▼

Add @playwright/mcp to your MCP client configuration with npx as the command. The agent then uses tools like playwright_navigate, playwright_click, and playwright_fill to interact with pages through accessibility snapshots.

Playwright MCP vs Playwright CLI for browser automation?▼

Playwright MCP suits chat-based agents needing persistent browser state and iterative reasoning over page structure. Playwright CLI fits coding agents where token efficiency and concise commands alongside large codebases matter more.

Does Playwright MCP support Firefox and WebKit browsers?▼

Yes, Playwright MCP supports Chromium, Firefox, and WebKit. Set the browser with the --browser flag in your MCP configuration args, for example --browser firefox.

Why does Playwright MCP show a host not allowed error?▼

The server blocks hosts not in its allowlist by default. Add the domain via --allowed-hosts in your config args, or set the PLAYWRIGHT_MCP_ALLOWED_HOSTS environment variable. Using * disables the check for development.

How do I fix element not found errors in Playwright MCP?▼

Call playwright_snapshot to inspect the current accessibility tree and see available elements. Then use role-based selectors like button[name='Submit'] or partial matches such as text=/submit/i instead of fragile CSS paths.