1.6 KiB
1.6 KiB
Publishing mcp-browser with ngrok
The scripts/run_mcp_ngrok.sh helper launches mcp-browser in
streamable-http mode and exposes it through an ngrok tunnel. By default it uses
whatever server is marked as default in your configuration (or you can specify
one explicitly with --server).
./scripts/run_mcp_ngrok.sh \
--allow-origin https://platform.openai.com \
--ngrok-oauth-provider google \
--ngrok-oauth-allow-email you@example.com
Key behaviours:
- Picks a free local port and starts
mcp-browser --mode streamable-httpwith--http-path /mcp. - Starts
ngrok httppointing at that port and prints the public URL once the tunnel is ready. - Writes logs to temporary files (paths shown on startup).
- Cleans up both processes when interrupted.
Useful options:
--server chrome– publish a different server entry from your config.--config ~/.claude/mcp-browser/config.yaml– point at a custom config file.--ngrok-region euor--ngrok-domain your-name.ngrok.app– choose a region or reserved domain.--ngrok-oauth-provider google --ngrok-oauth-allow-email you@example.com– gate the tunnel behind ngrok’s OAuth support (recommended when exposing the gateway).
Additional mcp-browser arguments can be passed after --, for example to
connect to a streamable HTTP upstream:
./scripts/run_mcp_ngrok.sh -- \
--transport streamable-http \
--transport-url http://127.0.0.1:12306/mcp
The resulting public URL terminates at /mcp and is served via HTTPS by ngrok
automatically. Configure your MCP client (e.g. OpenAI’s MCP interface) with
that URL plus any OAuth restrictions you defined.