Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here
cloudflare-mcp-pro logo

cloudflare-mcp-pro

helbertparanhos/cloudflare-mcp-pro
0 starsv1.1.0STDIORegistry activeMITUpdated 2026-06-22Community

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

claude mcp add cloudflare-pro -- npx -y cloudflare-mcp-pro

Summary

A local stdio MCP server that provides 69 tools for Cloudflare REST API v4, including DNS, Zones, Workers, KV, R2, D1, Pages, Queues, Tunnels, SSL, WAF, Email Routing, Logpush and Workers AI, authenticated by a single API token.

Connect from your MCP client

One-click install

Add this server to your editor with a single click. Fill in any required credentials afterward.

Claude Code

Run this once and Claude Code registers the server for you:

claude mcp add cloudflare-pro -- npx -y cloudflare-mcp-pro

Claude Desktop

Add this to claude_desktop_config.json under Settings → Developer → Edit Config:

{
  "mcpServers": {
    "cloudflare-pro": {
      "command": "npx",
      "args": [
        "-y",
        "cloudflare-mcp-pro"
      ],
      "env": {
        "CLOUDFLARE_API_TOKEN": "<CLOUDFLARE_API_TOKEN>",
        "CLOUDFLARE_ACCOUNT_ID": "<CLOUDFLARE_ACCOUNT_ID>",
        "CLOUDFLARE_API_BASE": "<CLOUDFLARE_API_BASE>"
      }
    }
  }
}

Cursor

Add this to .cursor/mcp.json in your project (or ~/.cursor/mcp.json for all projects):

{
  "mcpServers": {
    "cloudflare-pro": {
      "command": "npx",
      "args": [
        "-y",
        "cloudflare-mcp-pro"
      ],
      "env": {
        "CLOUDFLARE_API_TOKEN": "<CLOUDFLARE_API_TOKEN>",
        "CLOUDFLARE_ACCOUNT_ID": "<CLOUDFLARE_ACCOUNT_ID>",
        "CLOUDFLARE_API_BASE": "<CLOUDFLARE_API_BASE>"
      }
    }
  }
}

Cline and other MCP clients

Most MCP clients accept the standard mcpServers JSON block:

{
  "mcpServers": {
    "cloudflare-pro": {
      "command": "npx",
      "args": [
        "-y",
        "cloudflare-mcp-pro"
      ],
      "env": {
        "CLOUDFLARE_API_TOKEN": "<CLOUDFLARE_API_TOKEN>",
        "CLOUDFLARE_ACCOUNT_ID": "<CLOUDFLARE_ACCOUNT_ID>",
        "CLOUDFLARE_API_BASE": "<CLOUDFLARE_API_BASE>"
      }
    }
  }
}

Codex CLI

Register the server with OpenAI's Codex CLI — run this once, or add the equivalent block to ~/.codex/config.toml:

codex mcp add cloudflare-pro --env CLOUDFLARE_API_TOKEN=<CLOUDFLARE_API_TOKEN> --env CLOUDFLARE_ACCOUNT_ID=<CLOUDFLARE_ACCOUNT_ID> --env CLOUDFLARE_API_BASE=<CLOUDFLARE_API_BASE> -- npx -y cloudflare-mcp-pro

# or add to ~/.codex/config.toml:
[mcp_servers.cloudflare-pro]
command = "npx"
args = ["-y", "cloudflare-mcp-pro"]
[mcp_servers.cloudflare-pro.env]
CLOUDFLARE_API_TOKEN = "<CLOUDFLARE_API_TOKEN>"
CLOUDFLARE_ACCOUNT_ID = "<CLOUDFLARE_ACCOUNT_ID>"
CLOUDFLARE_API_BASE = "<CLOUDFLARE_API_BASE>"

OpenClaw

OpenClaw reads MCP servers from the mcp.servers section of ~/.openclaw/openclaw.json (managed via `openclaw mcp add` or the mcporter skill):

{
  "mcp": {
    "servers": {
      "cloudflare-pro": {
        "command": "npx",
        "args": [
          "-y",
          "cloudflare-mcp-pro"
        ],
        "env": {
          "CLOUDFLARE_API_TOKEN": "<CLOUDFLARE_API_TOKEN>",
          "CLOUDFLARE_ACCOUNT_ID": "<CLOUDFLARE_ACCOUNT_ID>",
          "CLOUDFLARE_API_BASE": "<CLOUDFLARE_API_BASE>"
        }
      }
    }
  }
}

Replace the <PLACEHOLDER> values with your own credentials — see the configuration table below.

Configuration

cloudflare-mcp-pro reads the following environment variables:

VariableRequired
CLOUDFLARE_API_TOKENRequired
CLOUDFLARE_ACCOUNT_IDOptional
CLOUDFLARE_API_BASEOptional

README.md

Cloudflare MCP Pro ☁️

MCP server for the Cloudflare REST API v469 tools across DNS, Zones, Workers, KV, R2, D1, Pages, Queues, Tunnels, SSL, WAF, Email Routing, Logpush and Workers AI in a single local stdio server authenticated by API token.

![npm version](https://www.npmjs.com/package/cloudflare-mcp-pro) ![License: MIT](LICENSE) ![GitHub Stars](https://github.com/helbertparanhos/cloudflare-mcp-pro/stargazers) ![GitHub Forks](https://github.com/helbertparanhos/cloudflare-mcp-pro/network/members) ![GitHub Issues](https://github.com/helbertparanhos/cloudflare-mcp-pro/issues) ![Glama Quality](https://glama.ai/mcp/servers/helbertparanhos/cloudflare-mcp-pro)

![TypeScript](https://www.typescriptlang.org/) ![Node.js](https://nodejs.org/) ![MCP](https://modelcontextprotocol.io/) ![Claude Code](https://claude.ai/code) ![Cursor](https://cursor.sh) ![Claude Desktop](https://claude.ai/download)

![Instagram](https://www.instagram.com/helbertparanhos) ![YouTube](https://www.youtube.com/@stratacademy) ![LinkedIn](https://www.linkedin.com/in/helbert-paranhos/) ![Buy Me A Coffee](https://buymeacoffee.com/helbertparanhos) ![Strat Academy](https://stratacademy.com.br)

Unlike the official Cloudflare MCP offering (13 separate remote, OAuth-based servers), cloudflare-mcp-pro runs locally over stdio, authenticates with a single API token, and consolidates the most-used Cloudflare operations into one server with consistent verb_object tool names — ideal for Claude Code, CI, and scripted automation.

Features

  • DNS — list/create/update/delete records, DNSSEC, BIND zone-file export
  • Zones — list/get/create/delete, settings (SSL mode, HTTPS, min TLS…), cache purge, GraphQL analytics
  • Workers — deploy (ES module), routes, secrets, cron triggers, list/get/delete
  • KV / R2 / D1 — namespaces + key CRUD, bucket management, databases + SQL queries
  • Pages / Queues / Tunnels — list/get projects, queue management, tunnel inspection
  • Security — WAF rulesets, IP/ASN/country access rules, page rules, SSL certificate packs, custom hostnames (SaaS), Turnstile widgets
  • Email Routing — rules + destination addresses
  • Logpush — list/create jobs (zone or account scoped)
  • Workers AI — model catalog + inference (text generation, embeddings, classification)
  • Human-approval gate — every mutating tool requires confirm: true; without it the tool returns a non-executing preview (with secrets redacted) instead of acting (see below)
  • MCP annotations — every tool carries readOnly/destructive/idempotent hints so clients can gate dangerous actions
  • Auto-paginationfetch_all: true on list tools follows every page
  • Single API-token auth, automatic retry + rate-limit (429/5xx) handling, and actionable error messages

Installation

npm install
npm run build

Or run directly once published:

npx -y cloudflare-mcp-pro

Configuration

Copy .env.example to .env and fill in:

| Variable | Required | Description | |----------|----------|-------------| | CLOUDFLARE_API_TOKEN | ✅ | API token from https://dash.cloudflare.com/profile/api-tokens | | CLOUDFLARE_ACCOUNT_ID | optional | Default account ID used when a tool doesn't receive account_id | | CLOUDFLARE_API_BASE | optional | Override the API base URL |

Token scopes depend on what you use, e.g.: Zone:Read, DNS:Edit, Workers Scripts:Edit, Workers KV Storage:Edit, Workers R2 Storage:Edit, D1:Edit, Pages:Edit, Account Analytics:Read. Run the verify_token tool to confirm your token works.

Testing

Run the automated test suite (no network — fetch is mocked):

npm test

It covers the human-approval gate, secret redaction, the security validations (hex IDs, path-segment encoding, model-id allowlist, purge mutual-exclusion, analytics hour-alignment), the API client (query serialization, 429 retry, error mapping, pagination + clamp, GraphQL non-JSON guard) and the Zod→JSON-Schema converter.

Interactive testing with the MCP inspector:

npx @modelcontextprotocol/inspector dist/index.js

Add to Claude Code

In .claude/settings.jsonmcpServers:

{
  "mcpServers": {
    "cloudflare-mcp-pro": {
      "command": "node",
      "args": ["projects/cloudflare-mcp-pro/dist/index.js"],
      "env": {
        "CLOUDFLARE_API_TOKEN": "your-token",
        "CLOUDFLARE_ACCOUNT_ID": "your-account-id"
      }
    }
  }
}

Add to Claude Desktop

  • Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "cloudflare-mcp-pro": {
      "command": "node",
      "args": ["/absolute/path/projects/cloudflare-mcp-pro/dist/index.js"],
      "env": {
        "CLOUDFLARE_API_TOKEN": "your-token",
        "CLOUDFLARE_ACCOUNT_ID": "your-account-id"
      }
    }
  }
}

Human-approval gate

Every mutating tool (any create_, update_, delete_, deploy_, put_, edit_, purge_cache, query_d1, run_ai, …) is gated server-side. Read-only tools (list_, get_, verify_token, export_dns_records, analytics) are never gated.

  • Calling a mutating tool without confirm: true returns a confirmation_required preview describing the tool, the risk level, and the (secret-redacted) arguments — and does not execute.
  • Re-call the same tool with "confirm": true to actually perform it, after a human has approved.

This gate is enforced in the server regardless of the MCP client, and works alongside the MCP annotations (destructiveHint) that prompt the human in compatible clients like Claude Code. Secret values (e.g. Worker secret text) are redacted from previews and never appear in error messages.

// 1) preview (no confirm) → nothing happens
delete_zone { "zone_id": "..." }
// → { "status": "confirmation_required", "risk": "DESTRUCTIVE — ...", ... }

// 2) after human approval
delete_zone { "zone_id": "...", "confirm": true }   // actually deletes

Tools (69)

List tools accept fetch_all: true to follow pagination. Mutating tools accept confirm: true (see the gate above). Every tool advertises MCP annotations (readOnlyHint / destructiveHint / idempotentHint).

Accountverify_token, list_accounts

Zones & settingslist_zones, get_zone, create_zone, delete_zone, purge_cache, get_zone_analytics, get_zone_setting, update_zone_setting

DNSlist_dns_records, create_dns_record, update_dns_record, delete_dns_record, get_dnssec, edit_dnssec, export_dns_records

Workerslist_workers, get_worker, deploy_worker, delete_worker, list_worker_routes, create_worker_route, delete_worker_route, put_worker_secret, delete_worker_secret, update_worker_cron

KVlist_kv_namespaces, create_kv_namespace, kv_list_keys, kv_get, kv_put, kv_delete

R2list_r2_buckets, create_r2_bucket, delete_r2_bucket

D1list_d1_databases, create_d1_database, query_d1

Pageslist_pages_projects, get_pages_project

WAF & firewalllist_firewall_rulesets, get_ruleset, list_access_rules, create_access_rule, delete_access_rule

Page ruleslist_page_rules, create_page_rule, delete_page_rule

SSL/TLSlist_certificate_packs, get_ssl_verification, order_certificate_pack

Custom hostnames (SaaS)list_custom_hostnames, create_custom_hostname, delete_custom_hostname

Email Routinglist_email_rules, create_email_rule, list_email_destinations

Queueslist_queues, create_queue, delete_queue

Tunnelslist_tunnels, get_tunnel

Turnstilelist_turnstile_widgets, create_turnstile_widget

Workers AIlist_ai_models, run_ai

Logpushlist_logpush_jobs, create_logpush_job

Author

Helbert Paranhos / Strat Academystratacademy.com.br

License

MIT — see LICENSE.

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Cloud & DevOps servers.