Skip to main content

Install with Docker

Use the prebuilt container image for isolated or server deployments.

Prerequisites​

  • Docker Engine (desktop or server)
  • Optional: ability to map volumes for /data

Pull & Run​

docker pull ghcr.io/aakashh242/mcp-playwright:latest
docker run -i --rm ghcr.io/aakashh242/mcp-playwright:latest

Streamable HTTP mode​

docker run --rm -p 8000:8000 \
ghcr.io/aakashh242/mcp-playwright:latest \
node dist/index.js --http --listen 0.0.0.0 --host-name localhost

Mount /data if you want to persist generated resources:

docker run --rm -p 8000:8000 -v /data:/data ghcr.io/aakashh242/mcp-playwright:latest ...

Use the provided docker-compose.yml for streamable HTTP with sensible defaults:

docker compose up -d

This exposes http://localhost:8000/mcp, binds to 0.0.0.0:8000, and mounts ./data/app-data β†’ /app/data plus ./data/resource-data β†’ /data for persisted resources. Replace the --host-name placeholder in the compose file with your public hostname.

docker-compose.yml
# Recommended production deployment (Streamable HTTP mode)
services:
playwright-mcp:
build:
context: .
dockerfile: Dockerfile
image: ghcr.io/aakashh242/mcp-playwright:latest
container_name: playwright-mcp-server
stdin_open: true
tty: true
command: ["--http", "--listen", "0.0.0.0", "--port", "8000", "--path", "/mcp", "--host-name", "<your-dockerhost-host-name>"]
ports:
- "8000:8000"
environment:
- PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
volumes:
- ./data/app-data:/app/data
- ./data/resource-data:/data

VS Code configuration​

STDIO transport​

{
"mcpServers": {
"playwright": {
"command": "docker",
"args": ["run", "-i", "--rm", "ghcr.io/aakashh242/mcp-playwright:latest"]
}
}
}

HTTP transport​

{
"mcpServers": {
"playwright": {
"transport": {
"type": "http",
"url": "http://localhost:8000/mcp"
}
}
}
}