create_dns_record
Create a new DNS record.
Change a DNS record, check a zone's SSL and security settings, or purge cache — without opening the Cloudflare dashboard for every edit.
LABSCO SUMMARY
Reads and safe writes work with the token alone; deleting a record and purging an entire zone's cache require CF_ALLOW_DESTRUCTIVE=true as well, so the worst outcomes are not one hallucinated argument away. Updates apply only the fields you pass, which means changing a TTL does not silently rewrite the record's content.
A Cloudflare operations server covering zones, DNS records, cache and page rules, with the destructive actions held behind a separate flag.
A Cloudflare API token in CF_API_TOKEN, scoped for Zone DNS Edit, Zone Read and Cache Purge — CLOUDFLARE_API_TOKEN is accepted as an alternate name. Deleting a record and purging the whole cache additionally need CF_ALLOW_DESTRUCTIVE=true, which is deliberately a separate decision from having the token. Run it with uvx mcp-cloudflare-dns over stdio, from the PyPI package mcp-cloudflare-dns, currently 0.1.1; MCP_TRANSPORT=sse with MCP_HOST and MCP_PORT switches to remote hosting. Cloudflare 429 and 5xx responses are retried with backoff. The project describes its release posture as beta.
One command plus a key — python -m pip install mcp-cloudflare-dns, then supply credentials
USE CASES
Find the zone, look up the existing record, then update its content — nothing else on the record changes.
Create them with the type, content, TTL and proxied state set, and a comment saying why.
Read its security and performance settings — SSL mode, security level, always-https.
Purge the specific URLs rather than the whole zone.
List the DNS records by type and the page rules alongside them.
Fetch it by ID to confirm what it is, then delete it — the call refuses unless the destructive flag is set.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
create_dns_recordCreate a new DNS record.
delete_dns_recordDelete a DNS record. Requires CF_ALLOW_DESTRUCTIVE=true.
get_dns_recordGet a specific DNS record by zone ID and record ID.
get_zoneGet details for a specific Cloudflare zone by ID.
get_zone_settingsGet key security and performance settings for a zone. Returns SSL mode, security level, minification, always-https, brotli, etc.
list_dns_recordsList DNS records for a zone.
list_page_rulesList page rules for a zone.
list_zonesList all Cloudflare zones on this account.
purge_cachePurge Cloudflare cache for a zone.
update_dns_recordUpdate an existing DNS record. Only the fields you provide will be changed.
BEFORE YOU INSTALL
10 tools when we connected. delete_dns_record and full cache purges stay listed but decline unless CF_ALLOW_DESTRUCTIVE=true.
Both documented clients run the server on your machine.
CONTEXT COST
Rated by the size of the 10 tool definitions that ride along on every turn, not by how many there are
INSTALLATION
python -m pip install mcp-cloudflare-dns{
"mcpServers": {
"cloudflare-dns": {
"command": "uvx",
"args": [
"mcp-cloudflare-dns"
],
"env": {
"CF_API_TOKEN": "<YOUR_CF_API_TOKEN>"
}
}
}
}