@archawat/mcp-cloudflare
Allows managing Cloudflare DNS across multiple zones, including listing zones and records, creating A and CNAME records, toggling proxy settings, updating and deleting records, with bulk operations for concurrent zone handling.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@@archawat/mcp-cloudflarelist all DNS records for example.com"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@archawat/mcp-cloudflare
Model Context Protocol (MCP) server for managing Cloudflare DNS across multiple zones (domains) from a single API token. Built for bulk workflows — flipping proxy on/off across many records, auditing DNS across zones, and batched record updates.
Features
Multi-zone from one token — pass a domain name like
"example.com"and the server resolves the zone for you. Zone IDs also accepted.Bulk operations —
bulk_toggle_proxy,bulk_update_dns_record, andbulk_list_dns_recordsrun concurrently and share a per-invocation zone-ID cache so repeated zones don't cost extra lookups.Safe defaults — new A/CNAME records are created with
proxied: false(DNS-only, grey cloud). Proxy is opt-in.Auto-pagination —
list_dns_recordsfetches every page in parallel unless you ask for a specific one.
Related MCP server: Cloudflare API MCP
Install
No local install required — use npx or bunx to run it on demand.
Claude Code / Claude Desktop (.mcp.json)
Via npx (Node):
{
"mcpServers": {
"cloudflare": {
"command": "npx",
"args": ["-y", "@archawat/mcp-cloudflare"],
"env": { "CLOUDFLARE_API_TOKEN": "cf-token-here" }
}
}
}Via bunx (Bun):
{
"mcpServers": {
"cloudflare": {
"command": "bunx",
"args": ["-y", "@archawat/mcp-cloudflare"],
"env": { "CLOUDFLARE_API_TOKEN": "cf-token-here" }
}
}
}Claude Code CLI
claude mcp add cloudflare -s user \
-e CLOUDFLARE_API_TOKEN="cf-token-here" \
-- npx -y @archawat/mcp-cloudflareGlobal install (fastest cold-start)
npm install -g @archawat/mcp-cloudflare
# or: bun add -g @archawat/mcp-cloudflareThe global bin is named mcp-cloudflare (unscoped), so:
{
"mcpServers": {
"cloudflare": {
"command": "mcp-cloudflare",
"env": { "CLOUDFLARE_API_TOKEN": "cf-token-here" }
}
}
}API Token
Create a Cloudflare token at https://dash.cloudflare.com/profile/api-tokens with:
Zone:ReadZone:DNS:Edit
Scope the token to the zones you want to manage, or grant "All zones".
Tools
Tool | Purpose |
| Discover which domains the token can manage. |
| List records in a zone; auto-paginates across all pages unless |
| List records across many zones in one call. Concurrent per-zone. |
| Create an A record. |
| Create a CNAME record. |
| Create a TXT record (SPF, DKIM, DMARC, domain verification). |
| Create an MX record for mail routing. |
| Flip proxy on/off by record ID, or by name (+ optional type). |
| Flip proxy for many records in one call (shared |
| Patch |
| Patch many records in one call with per-item fields. |
| Delete a record by ID. Destructive. |
All tools accept either a domain name ("example.com") or a 32-char zone ID as the zone argument.
Result shape
Responses are plain text — TSV for lists, one-liners for mutations — to keep token usage low. A single failure in a bulk call doesn't abort the batch.
list_dns_records:
Total: 2
id type name content proxied ttl
abc123 A www.example.com 1.2.3.4 true 1
def456 CNAME api.example.com example.com false 300create_* / update_dns_record / toggle_proxy / delete_dns_record:
OK: dns_record abc123 created (www.example.com)bulk_list_dns_records:
Zones: 2 (succeeded: 1, failed: 1)
FAIL: other.com - No zone found for 'other.com'
Records: 1
zone id type name content proxied ttl
example.com abc123 A www.example.com 1.2.3.4 true 1bulk_toggle_proxy / bulk_update_dns_record:
Succeeded: 1, Failed: 1
OK: example.com/abc123 toggled (www.example.com)
FAIL: other.com/www.other.com - No proxyable record found for 'www.other.com'.Errors return Failed: <message> with isError: true. Bulk tools also set isError: true whenever any item fails, while still returning every result.
Development
Requires Bun (recommended) or Node 18+.
bun install
bun run dev # run src/index.ts with --watch
bun run start # run src/index.ts once
bun run typecheck # tsc --noEmit
bun run build # emit dist/ for publishingTo run the dev copy as the MCP server instead of the published package, point .mcp.json at your local build:
{
"mcpServers": {
"cloudflare": {
"command": "bun",
"args": ["/abs/path/to/mcp-cloudflare/src/index.ts"],
"env": { "CLOUDFLARE_API_TOKEN": "cf-token-here" }
}
}
}The server speaks stdio — your MCP client spawns the process and communicates over stdin/stdout.
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for DNSimple — domains, DNS zone records, availability, pricing and contacts.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
MCP server for Hostinger API
Cloudflare Workers MCP server: api-landing
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceA lightweight MCP server for managing DNS records, purging cache, and interacting with the Cloudflare API through natural language commands.24-
- AlicenseNot gradedqualityDmaintenanceA lightweight MCP server that enables agents to interface with Cloudflare's REST API, allowing management of DNS records and other Cloudflare services.12 npm15GPL 2.0
- AlicenseNot gradedqualityNot gradedmaintenanceA token-efficient MCP server for managing Cloudflare DNS zones and records with full CRUD support and bulk operations. It can be deployed locally via stdio or as a Cloudflare Worker for remote HTTP access.-
- FlicenseAqualityDmaintenanceMCP server for managing and analyzing Cloudflare DNS — zones, records, analytics, and DNSSEC.141-