Content
## playwright-mcp 🌐
A specialized, Dockerized **Playwright MCP** server designed to act as a robust browser automation backend for AI agents. This implementation is optimized for high-performance containerized environments and supports the full suite of **Model Context Protocol (MCP)** features.
It provides agents with the ability to navigate the web, interact with UI elements, and perform deep network traffic analysis.
### 🚀 Key Features
* **Pre-configured Docker:** Built on Playwright v1.50.0 Noble, ensuring all Chromium dependencies are ready for production.
* **Network Protocol Analysis:** Full support for core, core-navigation, and network capabilities, enabling agents to sniff API traffic, headers, and payloads.
* **Cloud-Ready:** Configured to bind to 0.0.0.0 and utilize the PORT environment variable, making it compatible with Cloud Run, Railway, and other container platforms.
* **Optimized for Security:** Includes necessary launch arguments (--no-sandbox) to run smoothly in restricted container environments.
### 📂 Configuration: mcp-config.json
The server utilizes a specific configuration to target the Playwright binaries within the container and expose the necessary capabilities:
```json
{
"browser": {
"browserName": "chromium",
"launchOptions": {
"executablePath": "/ms-playwright/chromium-1155/chrome-linux/chrome",
"args": ["--no-sandbox", "--disable-setuid-sandbox"]
}
},
"server": {
"host": "0.0.0.0",
"allowedHosts": ["*"]
},
"capabilities": ["core", "core-navigation", "network"]
}
```
### 🛠 Deployment
To build and run the server using Docker:
1. **Build the image:**
```bash
docker build -t playwright-mcp .
```
2. **Run the container:**
```bash
docker run -p 3000:3000 -e PORT=3000 playwright-mcp
```
The server will be available at http://0.0.0.0:3000.
### 📄 License
This project is intended for research and development. Please ensure compliance with the target websites' Terms of Service when utilizing automated browser tools.