==================
/// MCP ///
/// PLA ///
==================
[server:online]
[protocol:ready]playwright-mcp
by microsoft
Playwright MCP server
14.7k
1.0k
Open SourceInstallation
## Prerequisites
• Node.js v18 or later installed and on your PATH.
• (Optional) A modern browser (Chromium, Firefox, or WebKit) if you want to run the server locally rather than inside Docker.
## Install the package
# as a global binary
npm install -g @playwright/mcp
# or add it to your project
npm install --save-dev @playwright/mcp## First-time browser download (only when installing locally)
# this pulls Playwright browser binaries
npx playwright install## Start the MCP server
# default port 8080
npx playwright-mcp --port 8080
# or use environment variables
PORT=8080 PLAYWRIGHT_BROWSERS_PATH=0 node node_modules/@playwright/mcp/dist/cli.js## Connect to the server
WebSocket URL: ws://<host>:8080/mcp
REST base URL: http://<host>:8080/v1## Docker alternative
docker run -p 8080:8080 mcr.microsoft.com/playwright/mcp:latest## Project integration (example, playwright.config.ts)
export default defineConfig({
use: {
mcpServer: {
endpoint: 'ws://localhost:8080/mcp',
},
},
});## Security / tokens (optional)
# Set environment variable before starting the server
MCP_AUTH_TOKEN=<token>When enabled, include an `Authorization: Bearer <token>` header in HTTP/WebSocket requests.
Documentation
License: Apache License 2.0
Updated 7/15/2025