Skip to main content

Cloudflare DNS MCP server — manage zones, records, cache, and page rules from any MCP-compatible AI assistant

Project description

mcp-cloudflare-dns

Cloudflare DNS MCP server. Manage zones, DNS records, cache, and page rules from Claude, Cursor, Codex, or any MCP-compatible AI assistant.

# Install:  uvx mcp-cloudflare-dns

# Ask your AI:
"List all DNS records for example.com"
"Add a CNAME record pointing api.example.com to my-app.vercel.app"
"Purge the cache for https://example.com/products"
"What page rules are active on example.com?"

Why this one?

The official Cloudflare MCP covers Workers, KV, D1, and R2 — but has zero DNS tools. This server fills that gap.

Feature This server Official CF MCP
DNS record CRUD Yes No
Zone listing Yes No
Cache purge Yes No
Page rules Yes No
Zone settings Yes No
Workers/KV/D1/R2 No Yes

They complement each other — use both.


Quickstart

1. Get a Cloudflare API tokendash.cloudflare.com/profile/api-tokens → Create Token → use "Edit zone DNS" template

2. Add to your MCP client config:

{
  "mcpServers": {
    "cloudflare-dns": {
      "command": "uvx",
      "args": ["mcp-cloudflare-dns"],
      "env": {
        "CF_API_TOKEN": "your-cloudflare-api-token"
      }
    }
  }
}

3. Restart your AI client. Done.


Available tools

Tool What it does
list_zones All zones on your account with status and nameservers
get_zone Details for a specific zone
get_zone_settings SSL mode, security level, minification, HTTPS redirect, etc.
list_dns_records All DNS records, filterable by type or name
get_dns_record Single record by ID
create_dns_record Add A, AAAA, CNAME, MX, TXT, NS, etc.
update_dns_record Edit content, TTL, proxy status, or comment
delete_dns_record Remove a record (requires CF_ALLOW_DESTRUCTIVE=true)
purge_cache Purge specific URLs or entire zone cache
list_page_rules All page rules with targets and actions

Environment variables

Variable Required Description
CF_API_TOKEN Yes Cloudflare API token (also accepts CLOUDFLARE_API_TOKEN)
CF_ALLOW_DESTRUCTIVE No Set to true to enable record deletion and full cache purge
MCP_TRANSPORT No Set to sse for remote/VPS deployment (default: stdio)
MCP_HOST No SSE bind host (default: 127.0.0.1)
MCP_PORT No SSE bind port (default: 3001)

API token permissions

Minimum required scopes for your token:

Resource Permission
Zone — DNS Edit
Zone — Zone Read
Zone — Cache Purge Purge
Zone — Page Rules Edit (if using page rules tools)

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_cloudflare_dns-0.1.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_cloudflare_dns-0.1.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file mcp_cloudflare_dns-0.1.0.tar.gz.

File metadata

  • Download URL: mcp_cloudflare_dns-0.1.0.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for mcp_cloudflare_dns-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e850180f762d9bda8349384c8a1ab63d787de7c409b07ef53f91d5085ed90cff
MD5 7d34fc44b2a5b23407fc02e6551af461
BLAKE2b-256 3d5525e61aff9ee4693c8f2fba88b1964ac67a66206e2413fc22a51408b1e8c2

See more details on using hashes here.

File details

Details for the file mcp_cloudflare_dns-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mcp_cloudflare_dns-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for mcp_cloudflare_dns-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c08bee5f55e4ed27139cf27309f48a46a93c4ff96e22790a9631a9ef26df2cb8
MD5 49a00fcbb71fa3cea57fc48ad9d32646
BLAKE2b-256 a5d39d87315af27ffbe173613cd904b02b743c66d2578be86ef7b1fd0d8cc358

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page