Is there an MCP server for Cloudflare?

Yes. Agent Planners runs a hosted MCP server at https://www.agentplanners.com/api/mcp that gives Claude, ChatGPT, Codex and other MCP clients 19 Cloudflare read tools and 12 write tools. Sign in with OAuth or an API key. Writes follow your approval settings; changes you can't take back wait for a person unless an admin exempts a key.

MCP

Cloudflare MCP server: DNS, zones and Workers in Claude, Codex or Cursor

TL;DR

Cloudflare runs its own remote MCP server (mcp.cloudflare.com) that reaches its whole API by writing and running code against it. This guide covers a different setup: an API token pasted once, typed tools for the everyday DNS, zone and Workers work plus a raw lane for the rest, the workspace's approval setting in front of every change (changes wait for a person by default; deletes and deploys always do), and Forbidden Rules that can keep an agent to the domains you name.

What already exists for this platform

Cloudflare publishes the Cloudflare API MCP server at https://mcp.cloudflare.com/mcp. It signs in with OAuth (you choose the permissions to grant) or takes an API token as a bearer header, and it covers the whole API through Code Mode: the model searches the API and runs JavaScript it writes against a typed form of the OpenAPI spec, instead of loading one tool per endpoint. Cloudflare also runs narrower servers (documentation, Browser Run, containers, Digital Experience Monitoring, CASB). DNS has no server of its own there; it is reached through the API server (checked November 2026).

  • The token's permissions are the limit. Every Cloudflare API call is allowed or refused by the token's own permission list and the accounts / zones it names.
  • Similar names, different permissions. DNS Settings, DNS Views and DNS Firewall are account permissions; a zone's records need the zone permission named just "DNS" (measured: a token holding the first three was refused records on every zone).
  • An empty list is not always "none". A token with zone permissions only lists no account, and Cloudflare answers its Workers, Pages, R2, KV, D1 and Registrar lists empty rather than refusing them (measured).

What a hosted layer adds

Cloudflare's API server (Code Mode)Agent Planners MCP
How calls are madeThe model writes and runs code against the APITyped tools (19 reads, 12 writes) plus cloudflare__raw_request for any other endpoint
CredentialOAuth or an API token in your clientYour API token, pasted once on Integrations and stored encrypted; your MCP key never carries it
ChangesAs the granted permissions allowThe workspace's approvals: deleting a record, deploying a Worker, removing a route, purging everything and security / TLS settings wait for a person
Keeping an agent to some domainsThe token's zone listThe token's zone list, and a Forbidden Rule ("MCP may only manage example.com") that works across keys and connected apps
Never reachableWhatever the token allowsUsers, members, roles, API tokens, billing, adding or deleting a zone — the dashboard only
Other platforms in the same sessionNoEvery other platform the workspace connected, on one endpoint
Counted from the tool registry (src/lib/cloudflare/registry.ts). Over MCP the names are cloudflare__<tool>: cloudflare__list_zones, cloudflare__list_dns_records, cloudflare__create_dns_record, cloudflare__update_dns_record, cloudflare__get_zone_settings, cloudflare__list_workers, cloudflare__deploy_worker … A tools:raw key also gets cloudflare__raw_request, bound to the connected account and its own zones.

How to configure it

  1. 1In Cloudflare open My Profile → API Tokens → Create Token. Give it only what the agent should do — for DNS records the zone permission DNS (Edit to change them), for Workers Account · Workers Scripts — and the accounts and zones it may touch.
  2. 2On Integrations, paste it on the Cloudflare card. We check it with Cloudflare, list each account it reaches as its own connection and show, per account, what the token can use and the permission each missing area needs.
  3. 3Create a key in API & MCP: tools:read for reading, add tools:write for changes (and tools:raw for the raw lane). Add the server with the snippet below, run describe_permissions, then cloudflare__get_capabilities.
  4. 4Optional: on Forbidden Rules, describe the limit in words — "MCP can only manage example.com on Cloudflare" — check the drafted rule and turn it on.
bash
claude mcp add --transport http agent-planners https://www.agentplanners.com/api/mcp \
  --header "Authorization: Bearer ap_live_…"
Every client's setup, including OAuth sign-in without a key: MCP setup guide · Every tool and permission: Cloudflare guide.

What waits for a person, whatever the key allows

A tools:write key's ordinary Cloudflare writes — creating or changing a DNS record, an ordinary zone setting, a Worker route, purging by URL — either run inside the workspace's guardrails or queue for an admin, depending on how the key was minted. These never run on the key's say-so: they are held in the approval queue, an admin or editor is emailed, and none is ever taken by a bulk approval.

  • Deleting a DNS record — it cannot be undone and can take a site or its mail offline.
  • Deploying a Worker (its code runs on your traffic) and removing a Worker route.
  • Purging the whole cache, and security or TLS settings (SSL mode, minimum TLS, security level …).
  • Turning the proxy off on a record (it exposes the origin's address).
  • Through the write gateway or the raw lane: any DELETE, a Worker upload, a Pages deployment and a registrar change.
Refused outright: user settings, account members, roles, API tokens, subscriptions and billing, adding a zone and deleting one — those stay in the Cloudflare dashboard.

What we measured with live tokens

  • An account-level token reached one account and its 196 zones: zones, zone settings, rulesets, Workers (33), routes, D1 and Registrar answered; DNS records, Pages, R2, KV and analytics answered the missing permission, each named.
  • A zone-only token (the "Edit zone DNS" kind) listed no account at all — it is connected through its zones (two accounts), reads and changes DNS records, and its account areas say the permission is missing instead of "0 Workers".
  • The domain lock works end to end. A rule drafted from "MCP can only manage aftercareindex.com on Cloudflare" refused a record on another domain (by name and by zone id), a zone setting on another domain, a Worker deploy and a raw request to another zone; a record on the allowed domain was created and deleted again. Reads stayed open.
Cache purge is not checked at connect (it cannot be tried without purging); it shows as unknown until a purge answers. Zone analytics needs Zone · Analytics · Read.

Frequently asked questions

Is there an official Cloudflare MCP server?
Yes. Cloudflare runs the Cloudflare API MCP server at mcp.cloudflare.com/mcp, which covers the whole API through Code Mode (the model writes code against the API), signed in with OAuth or an API token. Agent Planners is a different setup: typed tools and a raw lane with your token, the workspace's approvals in front of deletes and deploys, and Forbidden Rules that can keep an agent to some domains.
How do I connect Claude to Cloudflare DNS?
Create a Cloudflare API token with the zone permission DNS (Edit to change records), paste it on the Cloudflare card on Integrations, create an Agent Planners key in API & MCP, add the MCP server to Claude and call cloudflare__list_dns_records with a domain.
My token has DNS Settings and DNS Views — why are DNS records refused?
Those are account permissions. Records need the zone permission named just DNS; add it to the token in Cloudflare and press Refresh accounts.
Can I limit an agent to some of my domains?
Yes, two ways: give the token only those zones, or add a Forbidden Rule such as "MCP can only manage example.com on Cloudflare" — it stops changes on any other domain for API keys and connected apps, while reads stay open unless the rule says otherwise.
Can an MCP client delete DNS records or deploy Workers on its own?
No. Deleting a record, deploying a Worker, removing a route, purging the whole cache and security settings are held for a person on every key mode.

About this platform

Put a human-approved agent on your ad ops

Start free — 2,500 credits a month, no credit card. Reads run at once; by default every write waits for your approval.

Related reading