playwright-mcp
Verified Safeby microsoft
Overview
Provides a Model Context Protocol (MCP) server for LLMs to automate browser interactions using Playwright's accessibility tree, avoiding pixel-based vision models.
Installation
npx @playwright/mcp@latestEnvironment Variables
- PLAYWRIGHT_MCP_EXTENSION_TOKEN
- DEBUG
- DEBUG_COLORS
- DEBUG_HIDE_DATE
Security Notes
The server's core functionality involves powerful browser automation, including tools like 'browser_evaluate' and 'browser_run_code' that allow arbitrary JavaScript or Playwright code execution within the browser context. If an LLM's output is not carefully validated, this could lead to unintended or malicious actions in the browser. The '--allow-unrestricted-file-access' option, though false by default, can expose the local filesystem if enabled. The browser extension component restricts connections to loopback addresses (127.0.0.1 or [::1]), which is a good security measure, and uses an authentication token to prevent unauthorized connections.
Similar Servers
mcp-accessibility-scanner
Automated web accessibility scanning and browser automation using Playwright and Axe-core, enabling LLMs to perform WCAG compliance checks and generate reports.
qa-use
Provides comprehensive browser automation and QA testing capabilities, integrating with a backend platform for automated tests, interactive debugging, and batch test execution.
verdex-mcp
AI-first browser automation for Playwright test authoring, enabling AI coding assistants to generate robust, container-scoped, and content-filtered Playwright selectors for end-to-end tests.
playwright-mcp-server
Provides a robust, token-aware Playwright browser automation server for Large Language Models (LLMs) and coding agents to interact with web content, supporting advanced features like anti-detection and multi-page management.