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 token — dash.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
Metadata
Release files for mcp-cloudflare-dns 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mcp_cloudflare_dns-0.1.1.tar.gz | 5.3 kB | Without provenance | Details for mcp_cloudflare_dns-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mcp_cloudflare_dns-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for mcp_cloudflare_dns-0.1.1-py3-none-any.whl |
Total release size: 11.0 kB
Release files / mcp_cloudflare_dns-0.1.1.tar.gz
| Download URL | mcp_cloudflare_dns-0.1.1.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bf7c24f1dd357a314e244af2e8fe696dc65c5b25fcec1614031f3b90e9bfa3c2
|
|
BLAKE2b-256 checksum How to use checksums |
7a3f7f908b16a7b037bb05241bd81a8279b14d6279253481b8af4c0fab109b67
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|
Release files / mcp_cloudflare_dns-0.1.1-py3-none-any.whl
| Download URL | mcp_cloudflare_dns-0.1.1-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
078cd48fcc9d70c0fac9f13cc6ba44855091eb5a3bac16a47c1d9c2ac66a2033
|
|
BLAKE2b-256 checksum How to use checksums |
2e15b89769e1cd614550c34deae746a99a92b098229eb4633910adf2cff54015
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|
Security for mcp-cloudflare-dns 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.