Deploy & Host Playwright MCP | Railway

Deploy and Host Playwright MCP on Railway

Playwright MCP is Microsoft's Model Context Protocol server that gives AI agents a real browser. Agents navigate pages, click, type, fill forms, take screenshots and read structured accessibility snapshots instead of pixels, which makes web automation reliable for Claude, Cursor, VS Code, Codex and other MCP clients.

About Hosting Playwright MCP

This template deploys Playwright MCP v0.0.82 with headless Chromium on the Railway private network and a small Caddy gateway in front. The gateway requires a generated bearer token on every request, because the server itself has no authentication and its browser can reach anything the service can. Each session uses an isolated in-memory profile, so nothing persists between sessions. Connect your MCP client to the gateway's /mcp URL with the token as a header. Chromium needs a few hundred megabytes of memory per session; the Hobby plan handles light use.

Common Use Cases

Dependencies for Playwright MCP Hosting

Deployment Dependencies

Implementation Details

Service Image Networking Storage
gateway caddy:2.11.4-alpine public domain on 8080 none
playwright mcr.microsoft.com/playwright/mcp:v0.0.82 private only, port 8931 none

Claude Code:

claude mcp add --transport http playwright https:///mcp \
  --header "Authorization: Bearer "
Variable Service Default Purpose
MCP_API_TOKEN gateway generated Bearer token required on every request
MCP_URL gateway https:///mcp Endpoint for MCP clients

Notes:

This is a community-maintained deployment package and does not imply affiliation with or endorsement by the Playwright MCP project or its maintainers.

Why Deploy Playwright MCP on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Playwright MCP on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.