Last active
January 12, 2026 22:18
-
-
Save paltaio-admin/3629d5e711bca45c63e3dacb7b80d720 to your computer and use it in GitHub Desktop.
Patchright / Playwright MCP server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| services: | |
| playwright: | |
| stdin_open: true | |
| init: true | |
| restart: unless-stopped | |
| build: | |
| context: . | |
| dockerfile_inline: | | |
| FROM node:22-slim | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 \ | |
| libxkbcommon0 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 \ | |
| libgbm1 libasound2 libpango-1.0-0 libcairo2 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| RUN useradd -m -s /bin/bash pwuser | |
| WORKDIR /app | |
| RUN npm init -y && npm install patchright patchright-core \ | |
| && chown -R pwuser:pwuser /app | |
| USER pwuser | |
| RUN npx patchright install chromium | |
| ENTRYPOINT ["node", "/app/server.js"] | |
| configs: | |
| - source: patchwright-server | |
| target: /app/server.js | |
| environment: | |
| - PLAYWRIGHT_MCP_BROWSER=chromium | |
| - PLAYWRIGHT_MCP_HEADLESS=true | |
| - PLAYWRIGHT_MCP_SANDBOX=false | |
| - PLAYWRIGHT_MCP_HOST=0.0.0.0 | |
| - PLAYWRIGHT_MCP_PORT=3000 | |
| - PLAYWRIGHT_MCP_ALLOWED_HOSTNAMES=* | |
| - PLAYWRIGHT_MCP_VIEWPORT_SIZE=1920x1080 | |
| - PLAYWRIGHT_MCP_USER_AGENT=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 | |
| configs: | |
| patchwright-server: | |
| content: | | |
| const { program } = require("patchright-core/lib/utilsBundle"); | |
| const { decorateCommand } = require("patchright/lib/mcp/program"); | |
| decorateCommand(program, require("patchright/package.json").version); | |
| program.parse(process.argv); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment