Skip to content
skillsaggregatorskillsaggregator
Privacy: This guide links directly to Cloudflare's credential pages. We never ask you to enter, store, or transmit any credential through this site. Zero outbound calls to anything but the vendor's docs.

Cloudflare MCP — Auth Setup

Cloudflare uses scoped API tokens and an account ID to authenticate requests to your account.

1. Get your credentials

  1. Open the Cloudflare API tokens page (opens Cloudflare — we never see your token)
  2. Click Create Token and choose a template or custom permissions
  3. Copy the token after creation — it will not be shown again
  4. Your Account ID is shown in the right sidebar of the Cloudflare dashboard overview page

2. Set environment variables

macOS / Linux — add to ~/.zshrc or ~/.bashrc:

export CLOUDFLARE_API_TOKEN=YOUR_API_TOKEN_HERE
export CLOUDFLARE_ACCOUNT_ID=YOUR_ACCOUNT_ID_HERE

Then run source ~/.zshrc (or open a new terminal).

Windows — run in Command Prompt (then restart):

setx CLOUDFLARE_API_TOKEN "YOUR_API_TOKEN_HERE"
setx CLOUDFLARE_ACCOUNT_ID "YOUR_ACCOUNT_ID_HERE"

3. Verify

npx claude-skills doctor

You should see ✅ next to the Cloudflare MCP entry. If you see ❌, confirm the token is set: echo $CLOUDFLARE_API_TOKEN.

4. Restart Claude Code

Quit and reopen Claude Code (or run /mcp list inside Claude Code to confirm the Cloudflare MCP appears).