Cloudflare Tunnel
This is the fastest production-friendly path for exposing Hiveloom to Claude,
Cursor, and other remote MCP clients that require a public https:// URL.
Why pick this path
- No inbound ports required on the VPS.
- No local reverse proxy required.
- No certificate issuance or renewal on the box.
- Works well when your main goal is “make
/mcp/<tenant>/<agent>reachable over HTTPS”.
Use Deploy on a VPS instead if you want Caddy and full control of TLS on your own host.
Requirements
- A VPS with Hiveloom running on
127.0.0.1:3000 - A domain managed in Cloudflare
cloudflaredinstalled on the VPS
Verify Hiveloom first:
curl -s http://127.0.0.1:3000/healthz
# {"status":"ok"}The quick path
# 1. Authenticate cloudflared with your Cloudflare account
cloudflared tunnel login
# 2. Create the tunnel
cloudflared tunnel create hiveloom
# 3. Create the DNS route
cloudflared tunnel route dns hiveloom mcp.hiveloom.cloudThen write /etc/cloudflared/config.yml:
tunnel: hiveloom
credentials-file: /root/.cloudflared/<tunnel-uuid>.json
ingress:
- hostname: mcp.hiveloom.cloud
service: http://127.0.0.1:3000
originRequest:
httpHostHeader: mcp.hiveloom.cloud
- service: http_status:404Start it as a service:
sudo cloudflared service install
sudo systemctl enable --now cloudflared
sudo systemctl status cloudflaredYour MCP base URL is now:
https://mcp.hiveloom.cloudAnd an agent endpoint looks like:
https://mcp.hiveloom.cloud/mcp/default/support-botWhy httpHostHeader matters
Hiveloom builds OAuth and MCP metadata from forwarded headers. In the current server code, public URLs are derived from:
X-Forwarded-ProtoorX-Forwarded-ProtocolX-Forwarded-HostorHost
Cloudflare forwards X-Forwarded-Proto, and httpHostHeader makes sure the
upstream Host matches your public hostname. That keeps OAuth discovery and
protected-resource metadata on https://mcp.hiveloom.cloud/... instead of
falling back to loopback.
Verify before touching an MCP client
curl -s https://mcp.hiveloom.cloud/healthz
curl -s https://mcp.hiveloom.cloud/.well-known/oauth-authorization-server | jq .issuerExpect:
"https://mcp.hiveloom.cloud"If that issuer comes back as http://..., fix the tunnel config before you
continue.
Why this works for Claude and remote MCP clients
Anthropic’s MCP connector docs currently say:
- the MCP server must be publicly exposed through HTTP
- the MCP server URL must start with
https://
That is exactly what this tunnel provides.
Create an MCP identity
Once HTTPS is correct:
hiveloom mcp-identity create \
--tenant default \
--name claude-desktop \
--agent support-botIf the printed MCP URL still shows http://127.0.0.1:3000, keep the same
/mcp/<tenant>/<agent> path and replace only the scheme + host with your
public hostname:
https://mcp.hiveloom.cloud/mcp/default/support-botTroubleshooting
cloudflaredshows502orUnable to reach the origin service: Hiveloom is not listening on127.0.0.1:3000, or the tunnel points at the wrong port.- OAuth discovery returns
http://127.0.0.1:3000:httpHostHeaderis missing or wrong inconfig.yml. - Tunnel works, but the MCP client still rejects it:
fetch
/.well-known/oauth-authorization-serverand verify every URL starts withhttps://. - You want the classic reverse-proxy route instead: use Deploy on a VPS.