CrawlioCrawlio Docs

Cloudflare Integration

What you get

Cloudflare's MCP server exposes 89 tools for managing your Cloudflare infrastructure directly from any AI client:

Category Tools Examples
Workers 8 Deploy, get, delete, list workers
KV 5 Get, put, delete, list keys and namespaces
R2 6 Create buckets, upload/download objects
D1 4 Create databases, run SQL queries
Durable Objects 8 Manage namespaces, objects, alarms
Queues 8 Create queues, send/receive messages
AI 6 Text generation, image generation, embeddings
Workflows 5 Create, execute, manage workflows
DNS & Zones 4 List zones, manage domains
Cron Triggers 4 Create, update, delete schedules
Routes & Bindings 8 Service bindings, custom domains
Secrets & Env 6 Manage secrets and environment variables
Versioning 3 List versions, rollback deployments
Analytics 2 Workers analytics, general analytics

Quick setup

npx crawlio-browser init --cloudflare

The wizard:

  1. Prompts for your Cloudflare API token (or reads CLOUDFLARE_API_TOKEN from env)
  2. Verifies the token against the Cloudflare API
  3. Auto-detects your account ID (prompts if you have multiple accounts)
  4. Writes the config to your AI client's MCP settings

Supports --yes for non-interactive mode and --dry-run to preview changes.

Manual configuration

Add this entry to your MCP config (.mcp.json, claude_desktop_config.json, etc.):

{
  "mcpServers": {
    "cloudflare": {
      "command": "npx",
      "args": ["-y", "@cloudflare/mcp-server-cloudflare", "run", "YOUR_ACCOUNT_ID"],
      "env": {
        "CLOUDFLARE_API_TOKEN": "YOUR_API_TOKEN"
      }
    }
  }
}

Replace YOUR_ACCOUNT_ID with your Cloudflare account ID and YOUR_API_TOKEN with an API token.

Creating an API token

  1. Go to dash.cloudflare.com/profile/api-tokens
  2. Click Create Token
  3. Select Edit Cloudflare Workers template (or create a custom token)
  4. For full access to all 89 tools, grant these permissions:
    • Account: Workers Scripts: Edit, Workers KV Storage: Edit, D1: Edit, Workers R2 Storage: Edit, Cloudflare Pages: Edit
    • Zone: Zone: Read, DNS: Edit
  5. Click Continue to summary, then Create Token
  6. Copy the token (it is only shown once)

For read-only access, use "Read" permissions instead of "Edit" on each resource.

Finding your account ID

Your account ID is in the Cloudflare dashboard URL:

https://dash.cloudflare.com/abc123def456  <-- this is your account ID

Or use the Cloudflare API:

curl -s -H "Authorization: Bearer YOUR_TOKEN" \
  https://api.cloudflare.com/client/v4/accounts | jq '.result[].id'

The init --cloudflare wizard does this automatically.

Why not mcp-remote?

Cloudflare's original MCP setup used mcp-remote as an OAuth proxy. This approach has persistent issues:

  • Stale lock files in ~/.mcp-auth/ block new auth attempts
  • Dead callback ports: the OAuth listener process dies but the port stays bound
  • ERR_CONNECTION_REFUSED on every restart because the callback server is not running
  • Two separate servers (cloudflare-bindings + cloudflare-builds) that race during OAuth

The @cloudflare/mcp-server-cloudflare package eliminates all of this. It runs locally, uses a simple API token, and combines both servers into one with 89 tools.

Migrating from mcp-remote

If you have existing cloudflare-bindings or cloudflare-builds entries:

  1. Delete both entries from your MCP config
  2. Delete ~/.mcp-auth/ to clean up stale lock files
  3. Add the single cloudflare entry shown above

Or run npx crawlio-browser init --cloudflare (it detects and replaces legacy entries automatically).

Next steps

© 2026 Crawlio. All rights reserved.