Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

cloudflared

$ cloudflared Official High Risk
Cloudflare · Browser & Web · Apache-2.0 · macos / linux / windows

cloudflared connects local servers to Cloudflare Tunnel (tunnel), inspects tunnel state (tunnel list --output json), and authenticates non-browser clients against Cloudflare Access (access token). Quick tunnels (--url) run as long-lived foreground daemons.

FCRS-1.0 Score
82 /100
Good
High Confidence
Zero-Friction Install
brew install cloudflared
CLI vs MCP Decision CLI Only

Required local daemon/client for Cloudflare Tunnel routing and Access tokens (cloudflared access token); no MCP replacement exists.

Agent-Readiness Checklist

Local Probe Evidence
✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
✓ NO_COLOR Clean
— Self-Describing
— Official SKILL.md
Version
cloudflared version 2025.6.1 (built 2025-06-17T09:42:18Z)
Startup
101 ms
Exit Codes (help / invalid)
0 / 0
NO_COLOR Clean / Non-TTY Safe
Yes / Safe
Captured --help excerpt
NAME:
   cloudflared - Cloudflare's command-line tool and agent

USAGE:
   cloudflared [global options] [command] [command options]

VERSION:
   2025.6.1 (built 2025-06-17T09:42:18Z)

DESCRIPTION:
   cloudflared connects your machine or user identity to Cloudflare's global network.
     You can use it to authenticate a session to reach an API behind Access, route web traffic to this machine,
     and configure access control.
   
     See https://developers.cloudflare.com/cloudflare-one/connections/connect-apps for more in-depth documentation.

COMMANDS:
   update     Update the agent if a new version exists
   version    Print the version
   proxy-dns  Run a DNS over HTTPS proxy server.
   tail       Stream logs from a remote cloudflared
   service    Manages the cloudflared launch agent
   help, h    Shows a list of commands or help for one command
   Access:
     access, forward  access <subcommand>
   Tunnel:
     tunnel  Use Cloudflare Tunnel to expose private services to the Internet or to Cloudflare connected private users.

GLOBAL OPTIONS:
   --output value                               Output format for the logs (default, json) (default: "default") [$TUNNEL_MANAGEMENT_OUTPUT, $TUNNEL_LOG_OUTPUT]
   --credentials-file value, --cred-file value  Filepath at which to read/write the tunnel credentials [$TUNNEL_CRED_FILE]
   --region value                               Cloudflare Edge region to connect to. Omit or set to empty to connect to the global region. [$TUNNEL_REGION]
   --edge-ip-version value                      Cloudflare Edge IP address version to connect with. {4, 6, auto} (default: "4") [$TUNNEL_EDGE_IP_VERSION]
   --edge-bind-address value                    Bind to IP address for outgoing connections to Cloudflare Edge. [$TUNNEL_EDGE_BIND_ADDRESS]
   --label value                                Use this option to give a meaningful label to a specific connector. When a tunnel starts up, a connector id unique to the tunnel is generated. This is a uuid. To make it easier to identify a connector, we will use the hostname of the machine the tunnel is running on along with the connector ID. This option exists if one wants to have more control over what their individual connectors are called.
   --post-quantum, --pq                         When given creates an experimental post-quantum secure tunnel (default: false) [$TUNNEL_POST_QUANTUM]
   --management-diagnostics                     Enables the in-depth diagnostic routes to be made availab

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 20 / 25

Supports --output json on tunnel list/info, --no-autoupdate, and scriptable access token, though tunnel run is a long-lived daemon.

  • Supports --output json on management commands and access token
Trust & Safety 16 / 25

Exposing local services over public trycloudflare.com URLs bypasses local firewalls; stores cert.pem and tunnel tokens under ~/.cloudflared/.

  • Publicly exposes localhost ports; stores ~/.cloudflared/cert.pem
Setup & Portability 14 / 15

Single static Go binary available via brew, Linux apt/rpm repos, Docker, and GitHub Releases.

  • Single static Go binary across macOS, Linux, Windows
Utility & Efficiency 13 / 15

Essential for webhook testing, local preview sharing, and authenticating scripts behind Cloudflare Access.

  • Zero-cost quick tunnels and Cloudflare Access CLI token helpers
Maintenance & Lineage 10 / 10

Official Cloudflare project (cloudflare/cloudflared) under Apache-2.0.

  • Official cloudflare/cloudflared repository
Docs & Verifiability 9 / 10

Comprehensive Cloudflare Zero Trust documentation and --help reference.

  • Official docs at developers.cloudflare.com

Security, Auth & Guardrails

Auth Modes
No Auth OAuth Browser Service Account Config File
Credential Storage

Stores origin certs (cert.pem) and tunnel credential JSON files under ~/.cloudflared/; Access tokens are cached locally per origin.

Side Effects
Read-Only Local Write Remote Write
Cost & Quotas

Free, Apache-2.0 open-source Go binary; Cloudflare Zero Trust Free plan covers basic tunnels.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# cloudflared Agent Rules
- Never run `cloudflared tunnel --url` unattended without user approval—it exposes localhost services to the public internet.
- Pass `--no-autoupdate` in CI/agent runs and terminate background tunnel processes explicitly when finished.

Agent-Ready Command Recipes

Safe Read-Only Queries

List configured Cloudflare Tunnels as JSON
cloudflared tunnel list --output json

Queries Cloudflare API for active tunnels and emits structured JSON (--output json).

Retrieve a cached Cloudflare Access JWT for curl
cloudflared access token -app=https://internal.example.com

Prints the Access JWT token so shell scripts can pass cf-access-token cleanly.

Controlled Writes & Previews

Start a temporary tunnel to a local port
cloudflared tunnel --url http://localhost:3000 --no-autoupdate

Exposes local port 3000 on a public trycloudflare.com URL until terminated.

Strengths for Agents

  • + Management subcommands support --output json cleanly.
  • + Single static Go binary requiring no Cloudflare account for quick --url tunnels.

Caveats & Pitfalls

  • ! Exposing localhost via quick tunnels creates immediate external internet reachability.
  • ! Tunnel runtime commands block indefinitely as foreground daemons.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI