How clodex authenticates claude.ai, what it trusts, and what stays out of logs and history.

  • No inbound port. cloudflared makes outbound connections to Cloudflare. clodex refuses to bind anything except loopback: the MCP server on 127.0.0.1:8787, and the Liveboard and control API on 127.0.0.1:47787. The tunnel routes only to the MCP port.
  • Sign-in through Cloudflare Access. claude.ai completes OAuth (DCR + PKCE) against Access Managed OAuth, and only the email in the Access policy can sign in. DCR accepts only the claude.ai callback. clodex contains no OAuth code and stores no OAuth tokens.
  • Every request is verified at the origin. clodex trusts only a valid Cf-Access-Jwt-Assertion: RS256 against your team’s Access signing keys, issuer equal to the team domain, audience equal to the Access app’s AUD tag, and email equal to the one allowed address. Anything else gets 403 on every path, including requests that reach the loopback port without going through Cloudflare. Headers such as Cf-Access-Authenticated-User-Email are not trusted on their own.
  • Trusted host, not a sandbox. Commands run as your user, with the environment of the terminal you ran clodex start in. The start directory is not a boundary. Only run clodex on a machine and account where you’re comfortable with that, and stop it (or use a TTL) when you’re not using it.
  • Liveboard and control API. They listen on loopback only and check the Host header (which blocks DNS rebinding). clodex stop, clodex status and clodex watch authenticate with a per-run control token stored in runtime.json (owner-only). The browser signs in with a single-use code that expires after 2 minutes and gets an HttpOnly, SameSite=Strict cookie whose secret exists only in memory.
  • Secrets stay out of logs and history. The Cloudflare API token is used only during setup and never stored. The tunnel connector token reaches cloudflared through its environment, never a command line. Request logs carry no tokens, cookies or bodies. Before anything is written to history or shown on the Liveboard, clodex masks the connector and control tokens and common credential shapes (JWTs, GitHub, OpenAI and Anthropic, Slack, AWS, Cloudflare and Google keys, Bearer ..., password=...). Tool results sent back to Claude are not altered.
  • Files. ~/.config/clodex and ~/.local/state/clodex are created 0700, and the token, runtime and history files are 0600. On Windows they live in your profile, under its default ACLs.

To revoke access entirely, run clodex stop and remove the connector in claude.ai. To tear down the Cloudflare side, delete the DNS record, then the tunnel, then the Access app. Don’t delete an identity provider other apps use.