comfyui-mcp speaks the same Streamable-HTTP MCP transport that hosted
connectors use (for example Comfy’s own cloud.comfy.org/mcp Custom Connector).
With one command it runs as a token-authenticated server behind a public HTTPS
tunnel, so you can add it to Claude Desktop → Connectors or call it
headlessly from anywhere.
This is opt-in. The default
stdio transport (and plain --http on loopback)
behaves exactly as before — open and local. Auth and the tunnel only activate
when you set a token or pass --tunnel.Looking to drive a remote ComfyUI pod (e.g. RunPod) with the Agent Panel
instead? That’s a different feature — see Cloud deployment.
This page is about exposing the comfyui-mcp MCP server itself to remote
clients like Claude Desktop; it doesn’t touch ComfyUI or the panel bridge at all.
Both happen to use a cloudflared quick tunnel under the hood, which is the
easiest way to confuse the two.
One-command tunnel
- Forces the HTTP transport (
MCP_TRANSPORT=http). - Generates a strong random auth token if you haven’t set one.
- Starts a cloudflared quick tunnel to the local MCP port.
- Prints a ready-to-paste block: the public
https://…/mcpURL, the token, and a Claude Desktop connector snippet.
cloudflared not installed?
cloudflared ships as an optional dependency. If the binary can’t be found, the
server keeps running locally and prints install guidance:
--tunnel.
Add it to Claude Desktop
Open Claude Desktop → Settings → Connectors → Add custom connector and fill in:
Save, then enable the connector in a chat. The ComfyUI tools appear just like
they do for the local stdio server.
Headless / programmatic config
Any MCP client that supports a remote Streamable-HTTP server works. Provide the URL and the auth header:/mcp:
Manual setup (bring your own tunnel / proxy)
If you’d rather manage the public endpoint yourself, run the HTTP transport with a fixed token and put it behind your own reverse proxy, tunnel, or VPN:http://127.0.0.1:9100/mcp.
Auth reference
Tokens are compared in constant time, and the gate is enforced on every HTTP
method (
POST/GET/DELETE) at the MCP endpoint. Binding a non-loopback host
with no token is refused at startup unless the escape hatch above is set.
Roadmap: OAuth
Today’s auth is a manual shared-secret token (Bearer /X-API-Key), which
covers both the headless and the Claude Desktop Custom Connector paths. A full
browser-based OAuth sign-in flow (like Comfy’s hosted connector) is a planned
follow-up — it’s a heavier change and isn’t required to connect manually.
See also
- Cloud deployment — drive a remote ComfyUI pod with the Agent Panel (a different tunnel, a different purpose)
- Configuration — the full environment variable reference