playwright-mcp-server
Verified Safeby HaolongChen
Overview
Provides a Docker-based Model Context Protocol (MCP) server for automating web browser actions using Playwright.
Installation
docker-compose up -dEnvironment Variables
- PORT
- NODE_ENV
- LOG_LEVEL
- MCP_SERVER_NAME
- TIMEOUT
Security Notes
The server uses `helmet` for basic security headers and `cors` (all origins allowed, which might be overly permissive for some use cases). It explicitly mentions non-root container execution and resource limits in Docker Compose, which are good practices. There's no use of `eval` or direct `child_process` execution. However, user-provided `url` and `selector` parameters are passed directly to Playwright methods. While Playwright's APIs generally handle this safely, a malicious or overly complex selector could potentially be exploited for resource exhaustion or unexpected behavior, despite the README's claim of 'Input validation' which isn't explicitly visible in the `server.js` snippet beyond basic existence checks.
Similar Servers
playwright-mcp
Provides a Model Context Protocol (MCP) server for LLMs to automate browser interactions using Playwright's accessibility tree, avoiding pixel-based vision models.
context-engineering
Provides a Model Context Protocol (MCP) server that enables AI agents to control a web browser using Selenium for web automation tasks.
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.
mcp-browser-use-server
An MCP server that enables AI agents to control web browsers using the browser-use library, supporting various transports and persistent sessions.