mcp-cloudflare-dns
Manage Cloudflare zones, DNS records, cache, and page rules from an MCP client.
Inspect zones with filtering, zone details, and key zone settings.
List and filter DNS records, and get individual records.
Create and update DNS records, including TTL, proxying, comments, and MX/SRV priority.
Delete DNS records only when destructive actions are explicitly enabled.
Purge specific cache URLs or entire zone cache, with full purge gated by destructive flags.
List page rules and filter by active or disabled status.
Retry retryable Cloudflare API failures and return normalized JSON or error payloads.
Provides tools for managing Cloudflare DNS zones, DNS records (CRUD), cache purging, and page rules, enabling AI assistants to control Cloudflare DNS settings programmatically.
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., "@mcp-cloudflare-dns List 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.
mcp-cloudflare-dns
Cloudflare DNS MCP server for operators who need zone, record, cache, and page-rule control from an MCP client without opening the Cloudflare dashboard for every change.
Release posture: beta package, version 0.1.1 from pyproject.toml.
Choose your path
You are... | Start here | Then |
Installing the server in Claude/Codex/Cursor | Quick start below | |
Verifying what the server can touch | ||
Auditing packaging or release metadata |
Related MCP server: cloudflare-dns-mcp-server
Architecture
flowchart TD
U[AI operator] --> C[MCP client]
C --> S[FastMCP server]
E[CF_API_TOKEN] --> S
S --> T[Tool handlers]
T --> R[Retry wrapper]
R --> A[Cloudflare API]
A --> R --> T --> CRequest flow
flowchart TD
Q[Operator asks for a DNS change] --> H[Selected MCP tool]
H --> I[Load token and build client]
I --> J{Cloudflare call succeeds?}
J -- yes --> K[Return normalized JSON result]
J -- retryable --> L[Backoff and retry]
L --> J
J -- no --> M[Return error payload]Quick start
Install the package.
python -m pip install mcp-cloudflare-dnsExport a token with DNS permissions.
export CF_API_TOKEN="your-cloudflare-api-token"Register it in your MCP client.
{
"mcpServers": {
"cloudflare-dns": {
"command": "uvx",
"args": ["mcp-cloudflare-dns"],
"env": {
"CF_API_TOKEN": "your-cloudflare-api-token"
}
}
}
}Available tools
Tool group | Tools | Purpose |
Zone inventory |
| Inspect available zones and key settings |
DNS records |
| Read and mutate records |
Edge actions |
| Invalidate cached content and inspect page rules |
delete_dns_record and full-cache actions stay gated behind the destructive env flags described in
docs/start-here.md.
Runtime proof
Claim | Proof |
Package entry point is stable |
|
Server is MCP-specific, not a generic CLI |
|
Cloudflare failures are retried |
|
Release artifacts are built |
|
Repo map
Path | Purpose |
FastMCP tool surface, env loading, retry wrapper | |
Package metadata, version, script entry point | |
Registry-facing metadata for MCP discovery | |
Setup, env, validation, common failures | |
Component map and request lifecycle |
Validation
Check | Command |
Import compiles |
|
Package builds |
|
README links stay local |
|
License
MIT
Project context for new tasks
Use INDEX.md to find task-specific contracts; consult prompt.md when product direction is relevant. Historical examples do not select the current task.
Available Tools
10 toolscreate_dns_recordCreate Dns RecordC
Create a new DNS record.
Inputs: name (required), content (required), zone_id (required), record_type (required), +4 more. Returns: object
delete_dns_recordDelete Dns RecordA
Delete a DNS record. Requires CF_ALLOW_DESTRUCTIVE=true.
Inputs: zone_id (required), record_id (required). Returns: object
get_dns_recordGet Dns RecordA
Get a specific DNS record by zone ID and record ID.
Inputs: zone_id (required), record_id (required). Returns: object
get_zoneGet ZoneA
Get details for a specific Cloudflare zone by ID.
Inputs: zone_id (required). Returns: object
get_zone_settingsGet Zone SettingsA
Get key security and performance settings for a zone. Returns SSL mode, security level, minification, always-https, brotli, etc.
Inputs: zone_id (required). Returns: object
list_dns_recordsList Dns RecordsC
List DNS records for a zone.
Inputs: zone_id (required), name, record_type. Returns: result
list_page_rulesList Page RulesB
List page rules for a zone.
Inputs: zone_id (required), status. Returns: result
list_zonesList ZonesB
List all Cloudflare zones on this account.
Inputs: name_filter. Returns: result
purge_cachePurge CacheC
Purge Cloudflare cache for a zone.
Inputs: zone_id (required), urls, purge_everything. Returns: object
update_dns_recordUpdate Dns RecordA
Update an existing DNS record. Only the fields you provide will be changed.
Inputs: zone_id (required), record_id (required), ttl, comment, +2 more. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Each tool targets a distinct resource and action: zones, DNS records, zone settings, cache, and page rules are clearly separated. The DNS record tools follow a standard CRUD split with no ambiguity between get/list/create/update/delete.
All tool names follow a consistent verb_noun snake_case pattern (list_, get_, create_, update_, delete_, purge_). This makes the toolset predictable and easy to reason about.
With 10 tools, the server is well-scoped for its purpose. Each tool covers a meaningful operation without redundancy or excessive granularity.
DNS record management is fully covered with create, read, update, and delete operations. Zone lookup and settings read are present, but zone settings cannot be updated and page rules only support listing, leaving minor workflow gaps.
Maintenance
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Cloudflare Workers MCP server: ai-agent-scratchpad
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Cloudflare Workers MCP server: ai-model-router
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 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.-
- AlicenseAqualityDmaintenanceMCP server to manage Cloudflare Workers, KV, R2, Pages, DNS, and cache from your IDE.1381 npm4MIT
- AlicenseCqualityDmaintenanceA high-performance MCP server providing AI assistants with read-only access to the Cloudflare ecosystem. Query your entire Cloudflare infrastructure using natural language through Claude, Cursor, or any MCP-compatible client.3905MIT