Playwright MCP Docker Environment
by iuill
This project provides a Docker Compose environment to run the `@playwright/mcp` server. It allows you to easily set up and manage the Playwright MCP server for use with clients like Cline or Cursor.
Last updated: N/A
What is Playwright MCP Docker Environment?
A Docker Compose environment for running the Playwright MCP server. It simplifies the setup and management of the server, enabling integration with clients like Cline or Cursor.
How to use Playwright MCP Docker Environment?
- Clone the repository. 2. Create and configure the
.envfile. 3. Build and start the container usingdocker-compose up --build -d. 4. Configure your MCP client (e.g., VSCode/Cline) to connect to the server using the URLhttp://localhost:<MCP_HOST_PORT>/sse.
Key features of Playwright MCP Docker Environment
Easy setup with Docker Compose
Configurable via
.envfileSupports both headless and headed modes
Includes necessary dependencies (Chrome)
Provides an entrypoint script for managing server arguments
Use cases of Playwright MCP Docker Environment
Running Playwright MCP server in a consistent environment
Integrating Playwright with IDEs like VSCode using Cline or Cursor
Automated testing with Playwright
Development and debugging of Playwright tests
Simplified setup for cross-platform testing
FAQ from Playwright MCP Docker Environment
What is Playwright MCP?
What is Playwright MCP?
Playwright MCP (Multi-Client Protocol) allows multiple clients to connect to a single Playwright server.
What is the purpose of this Docker environment?
What is the purpose of this Docker environment?
It simplifies the setup and management of the Playwright MCP server, ensuring a consistent environment across different machines.
How do I switch between headless and headed modes?
How do I switch between headless and headed modes?
Modify the HEADLESS variable in the .env file and restart the container.
What if I'm using WSLg on Windows?
What if I'm using WSLg on Windows?
The default settings in docker-compose.yml and the WSL2-specific paths in .env.sample should generally work. Ensure the paths in your .env match your WSL distribution name if it's not Ubuntu.
How do I stop the server?
How do I stop the server?
Run docker-compose down in the repository directory.