Juganof/playwright-mcp-tunnel
If you are the rightful owner of playwright-mcp-tunnel and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The Playwright MCP Tunnel provides a seamless way to expose a local Playwright MCP server via a temporary HTTPS tunnel using Cloudflare, specifically designed for integration with ChatGPT Connectors UI.
Playwright MCP + Free HTTPS Tunnel (Cloudflare)
Spin up the official Playwright MCP server locally and expose it over a temporary, free HTTPS URL using Cloudflare Quick Tunnels. This URL can be pasted into the ChatGPT Connectors UI as a Custom Connector (MCP).
⚠️ This is for dev/test. Quick Tunnels are public, temporary, and have limits. Do not expose secrets or private data.
What you get
- One-command Playwright MCP server (
npx @playwright/mcp@latest) - Free, no‑account HTTPS tunnel via Cloudflare (
cloudflared tunnel --url …) - Works with the Connectors UI using the MCP HTTP endpoint (
/mcp).
Prereqs
- Node.js 18+
- cloudflared (install: https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/do-more-with-tunnels/trycloudflare)
Quick start
# 1) Clone
git clone https://github.com/Juganof/playwright-mcp-tunnel.git
cd playwright-mcp-tunnel
# 2) Start the MCP server locally on port 8931
npx -y @playwright/mcp@latest --port 8931 --host 127.0.0.1
# (Leave this running)
# 3) In a second terminal, start a free HTTPS tunnel to the local server
cloudflared tunnel --url http://127.0.0.1:8931
# You'll get a URL like: https://random-subdomain.trycloudflare.com
Connect it to ChatGPT (Custom Connector)
- Open ChatGPT → Settings → Connectors → Add source → Custom (MCP).
- Set MCP Server URL to your tunnel URL with
/mcpat the end, e.g.:https://random-subdomain.trycloudflare.com/mcp - Click Create (and approve any warning/checkbox).
If your client expects the older SSE-style endpoint, try
/sseinstead:https://…trycloudflare.com/sse. The latest Playwright MCP supports the modern Streamable HTTP endpoint at/mcp.
Sanity checks
- Open the URL in a browser:
https://<your-tunnel>/mcp— you should see a small JSON message or a blank page (normal). - Optional: test an SSE GET (may or may not be enabled):
curl -i -N -H "Accept: text/event-stream" https://<your-tunnel>/mcp
Useful flags (Playwright MCP)
# Headless (CI / no GUI)
npx -y @playwright/mcp@latest --port 8931 --host 127.0.0.1 --headless
# Restrict network access
npx -y @playwright/mcp@latest --port 8931 --allowed-origins=https://example.com;https://another.com
# Config file
npx -y @playwright/mcp@latest --config ./mcp.config.json --port 8931
See the repo page for more options.
NPM scripts
This repo includes simple scripts you can run instead of the raw commands:
# Start the MCP server
npm run mcp
# Start the tunnel (in another terminal)
npm run tunnel
Security notes
- Quick Tunnels are public and temporary. Avoid exposing internal systems.
- Kill the tunnel and MCP server when finished.
- Prefer a real Cloudflare Tunnel (Zero Trust) for anything persistent.
License
MIT