mcp-browser/docs/NGROK.md

1.7 KiB
Raw Permalink Blame History

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 the default in your existing config (the same behaviour as running mcp-browser directly). Provide --config or --server if you want to publish a different profile.

./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-http with --http-path /mcp.
  • Starts ngrok http pointing 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:

  • --config ~/.claude/mcp-browser/config.yaml point at your own config file (often combined with --server <name>).
  • --ngrok-region eu or --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 ngroks 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. OpenAIs MCP interface) with that URL plus any OAuth restrictions you defined.