Deploy Playwright MCP

Playwright MCP headless browser for AI agents, behind a token gateway.

Deploy Playwright MCP

Just deployed

Just deployed

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

  • Giving coding agents and chat assistants a remote browser
  • Agent-driven testing and QA of web applications
  • Web research and data collection from pages that need JavaScript

Dependencies for Playwright MCP Hosting

  • mcr.microsoft.com/playwright/mcp:v0.0.82 (official image)
  • caddy:2.11.4-alpine as the authenticating gateway

Deployment Dependencies

Implementation Details

ServiceImageNetworkingStorage
gatewaycaddy:2.11.4-alpinepublic domain on 8080none
playwrightmcr.microsoft.com/playwright/mcp:v0.0.82private only, port 8931none

Claude Code:

claude mcp add --transport http playwright https:///mcp \
  --header "Authorization: Bearer "
VariableServiceDefaultPurpose
MCP_API_TOKENgatewaygeneratedBearer token required on every request
MCP_URLgatewayhttps:///mcpEndpoint for MCP clients

Notes:

  • Use browser_snapshot to get page content inline; browser_navigate refers to a snapshot file kept inside the container.
  • The browser can reach the Railway private network, so treat the token like a password.

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.


Template Content

More templates in this category

View Template
Chat Chat
Chat Chat, your own unified chat and search to AI platform.

okisdev
116
View Template
stella
Self-host stella with web, API, Postgres, Redis, and object storage.

Jan Kubica
7
View Template
Hermes Agent | OpenClaw Alternative with Dashboard
Self-Hosted Hermes AI Agent for Telegram, Discord & Slack

codestorm
79