Back to Home
microsoft icon

playwright-mcp

Verified Safe

by 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

Run Command
npx @playwright/mcp@latest

Environment 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

Stats

Interest Score100
Security Score6
Cost ClassMedium
Avg Tokens1000
Stars25687
Forks2087
Last Update2026-01-16

Tags

browser automationLLM toolsPlaywrightweb interactionaccessibility tree