Cloudflare API Token MCP server
25 operations0 webhooks
Cloudflare API access with an API token. Manage zones, DNS records, DNSSEC, rulesets, lockdowns, and cache settings.
Try Cloudflare API Token with your agent
Connect Cloudflare API Token, then paste this into Claude, ChatGPT or Cursor. For ideas from other apps, see the use cases.
Using Corsair, show me what you can do in Cloudflare API Token on my account, then run one read-only example and show me the result.
Cloudflare API Token tools and triggers
Tools are what your agent can do in Cloudflare API Token through Corsair's MCP server. Triggers are the Cloudflare API Token events a routine can start from.
Rulesets
- CreateWrite
Create a ruleset at account or zone scope
rulesets.create
- Create RuleWrite
Add a rule to an existing ruleset
rulesets.createRule
- DeleteDestructive
Delete all versions of a ruleset [DESTRUCTIVE]
rulesets.delete
- Delete RuleDestructive
Delete a rule from a ruleset [DESTRUCTIVE]
rulesets.deleteRule
- GetRead-only
Fetch the latest version of a ruleset by ID
rulesets.get
- Get Entrypoint VersionRead-only
Get a historical entrypoint ruleset version
rulesets.getEntrypointVersion
- UpdateWrite
Update a ruleset (include every rule you want to keep)
rulesets.update
- Update RuleWrite
Update a specific rule in a ruleset
rulesets.updateRule
Zones
- DeleteDestructive
Delete an existing zone [DESTRUCTIVE]
zones.delete
- GetRead-only
Get details for a specific zone
zones.get
- ListRead-only
List, search, sort, and filter Cloudflare zones
zones.list
- Rerun Activation CheckWrite
Trigger a new activation check for a pending zone
zones.rerunActivationCheck
- UpdateWrite
Edit a Cloudflare zone (one of paused, type, or vanity_name_servers)
zones.update
Dns
- CreateWrite
Create a DNS record in a zone
dns.create
- DeleteDestructive
Delete a DNS record [DESTRUCTIVE]
dns.delete
- ListRead-only
List, search, sort, and filter DNS records for a zone
dns.list
- OverwriteWrite
Completely overwrite a DNS record
dns.overwrite
Lockdowns
- CreateWrite
Create a Zone Lockdown rule
lockdowns.create
- GetRead-only
Get a Zone Lockdown rule by ID
lockdowns.get
- UpdateWrite
Update a Zone Lockdown rule
lockdowns.update
Dnssec
- DeleteDestructive
Delete DNSSEC configuration for a zone [DESTRUCTIVE]
dnssec.delete
- UpdateWrite
Enable or disable DNSSEC for a zone
dnssec.update
Cache
- Get Regional Tiered CacheRead-only
Get the regional tiered cache setting for a zone
cache.getRegionalTieredCache
Ips
- GetRead-only
Retrieve Cloudflare or JD Cloud IP CIDR blocks
ips.get
S3
- UploadWrite
Upload file content to an R2 bucket (S3-compatible object storage)
s3.upload
Connect Cloudflare API Token to Claude, ChatGPT or Cursor
- 1
Connect Cloudflare API Token in Corsair
Add your Cloudflare API Token API key once in Corsair. Corsair stores the credential encrypted and makes the Cloudflare API Token API calls for your agent, so it never goes into a prompt or a config file. Connect Cloudflare API Token
If your link lets the agent add apps, you can skip this: it gives you a sign-in link the first time it needs Cloudflare API Token. On a ChatGPT personal plan, connect Cloudflare API Token here first.
- 2
Add Corsair's MCP server to your agent
Every client uses the same address:
https://mcp.corsair.dev/mcpOpen Customize → Connectors → Add custom connector, paste the address, then select Connect.Add a custom MCP server with the address and choose OAuth. Personal plans get read tools only.Add to CursorOr add this to~/.cursor/mcp.json. Cursor opens Corsair to sign in the first time it connects.{ "mcpServers": { "corsair": { "url": "https://mcp.corsair.dev/mcp" } } }Run this, then run/mcpin Claude Code to sign in.claude mcp add --transport http corsair https://mcp.corsair.dev/mcpCodex, Gemini CLI, VS Code, Zed and other clients with OAuth sign-in work the same way. Clients without it, such as GitHub Copilot's coding agent, use a link's own address and an API key. Setup for every client
- 3
Sign in and choose what needs your approval
Your client opens Corsair to sign in. Pick a link: the apps your agent can use and a mode that decides what it may do without asking. In the default Cautious mode, Cloudflare API Token's read and write operations run right away and its 5 destructive operations wait for your approval. Strict mode asks before every write and refuses destructive operations, and Read mode allows reads only.
FAQ
Install corsair and @corsair-dev/cloudflareapikey, add the Cloudflare API Token plugin, and connect with an API key. Then call methods like corsair.cloudflareapikey.api.cache.getRegionalTieredCache() from your app. Corsair syncs data per tenant.
Yes. Cloudflare API Token requires an API key from your Cloudflare API Token account or developer dashboard. Create credentials with access that matches what you automate, then paste them into Corsair or connect through managed auth in Hub.
Yes. One Corsair client can hit Cloudflare API Token, GitHub, Notion, Stripe, and the rest. Trigger Cloudflare API Token from a webhook, push updates to Slack, or chain actions across plugins. Same tenant context across integrations, plain TypeScript.
Teams use Corsair for cloudflare api access with an api token. manage zones, dns records, dnssec, rulesets, lockdowns, and cache settings. Common builds include sync jobs, admin tooling, and agents that call Cloudflare API Token APIs from your backend. Local DB entities let you query synced Cloudflare API Token records without hitting the API on every read.
The SDK is open source. Self-host and you pay Corsair nothing for the integration layer. Hub bills for hosted auth and execution, not per Cloudflare API Token API call. Hub has a generous free tier. For hobby projects you can probably run the whole thing on free. Paid plans start to matter with more tenants or heavier traffic.
We maintain @corsair-dev/cloudflareapikey in the open repo. When Cloudflare API Token ships API changes, upgrade the package. Your call sites stay typed. You should not need to rewrite the integration layer each time.
No. Corsair does not read your Cloudflare API Token data or hold individual access credentials. Credentials stay in your database. API calls run on your instance. We do not store Cloudflare API Token data on your behalf.
Yes. Add https://mcp.corsair.dev/mcp as a custom connector or MCP server in Claude, ChatGPT, Cursor, VS Code, Claude Code, Codex or any client that supports remote MCP servers with OAuth sign-in, then sign in to Corsair. On ChatGPT personal plans, custom servers currently get read tools only.
Yes. Put Cloudflare API Token on a link in Strict mode and every write waits for your approval, while destructive actions are refused. The default Cautious mode asks only before the 5 destructive Cloudflare API Token operations. You can change a link's mode at hub.corsair.dev/me.