Skip to main content
Glama
mcpmessenger

Playwright MCP HTTP Server

by mcpmessenger
Dockerfile1.42 kB
# Multi-stage build for Playwright MCP HTTP Server # Stage 1: Build FROM node:18-slim AS builder WORKDIR /app # Copy package files COPY package*.json ./ COPY tsconfig.json ./ # Install dependencies RUN npm ci # Copy source files COPY src ./src # Build TypeScript RUN npm run build # Stage 2: Runtime FROM node:18-slim WORKDIR /app # Install Playwright system dependencies RUN apt-get update && apt-get install -y \ libnss3 \ libnspr4 \ libatk1.0-0 \ libatk-bridge2.0-0 \ libcups2 \ libdrm2 \ libdbus-1-3 \ libxkbcommon0 \ libxcomposite1 \ libxdamage1 \ libxfixes3 \ libxrandr2 \ libgbm1 \ libasound2 \ && rm -rf /var/lib/apt/lists/* # Copy package files COPY package*.json ./ # Install production dependencies only RUN npm ci --only=production && npm cache clean --force # Copy built application from builder COPY --from=builder /app/dist ./dist # Install Playwright browsers (this will be done when @playwright/mcp is installed) # The npx command will download browsers on first run if needed # Expose port EXPOSE 8931 # Health check HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \ CMD node -e "require('http').get('http://localhost:8931/health', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})" # Run the server CMD ["node", "dist/server.js"]

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mcpmessenger/playwright-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server