mcpField
M
Mcp Cloudflare Dns

Mcp Cloudflare Dns

Local
github.com/apexradiusCloud & Infra0Updated 4d ago

About Mcp Cloudflare Dns

Mcp Cloudflare Dns is an MCP server for operators managing Cloudflare zones and DNS from an MCP client. It combines record changes with cache and page-rule actions, and retries retryable Cloudflare failures.

Key features

  1. 01Inspect zones and settings
  2. 02Read and manage DNS records
  3. 03Purge cached content
  4. 04List page rules
  5. 05Retry Cloudflare failures

Use cases

  1. 01Review available zones and settings
  2. 02Create or update DNS records
  3. 03Purge cache after a content change

MCP support

Exposes Cloudflare zone, DNS record, cache-purge, and page-rule tools to MCP clients. Destructive record deletion and full-cache actions require environment flags.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"cloudflare-dns": {
"command": "uvx",
"args": [
"mcp-cloudflare-dns"
],
"env": {
"CF_API_TOKEN": "<CF_API_TOKEN>",
"CF_ALLOW_DESTRUCTIVE": "<CF_ALLOW_DESTRUCTIVE>"
}
}
}
}
Run commanduvx mcp-cloudflare-dns
Environment variables to set
CF_API_TOKENSecretCloudflare API token with Zone DNS Edit, Zone Read, and Cache Purge permissions
CF_ALLOW_DESTRUCTIVESet to 'true' to enable DNS record deletion and full cache purge

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
pypimcp-cloudflare-dns0.1.1

Tools

10

Saved tool list · updated 3w ago

ParameterTypeRequiredDescription
name_filteranyNoOptional domain name substring to filter results (e.g. 'example.com')

Details

From the project README

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 hereThen
Installing the server in Claude/Codex/Cursordocs/start-here.mdQuick start below
Verifying what the server can touchAvailable toolsdocs/architecture.md
Auditing packaging or release metadatapyproject.tomlserver.json

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 --> C

Request 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

  1. Install the package.
python -m pip install mcp-cloudflare-dns
  1. Export a token with DNS permissions.
export CF_API_TOKEN="your-cloudflare-api-token"
  1. 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 groupToolsPurpose
Zone inventorylist_zones, get_zone, get_zone_settingsInspect available zones and key settings
DNS recordslist_dns_records, get_dns_record, create_dns_record, update_dns_record, delete_dns_recordRead and mutate records
Edge actionspurge_cache, list_page_rulesInvalidate 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

ClaimProof
Package entry point is stablemcp-cloudflare-dns = "cf.server:main" in pyproject.toml
Server is MCP-specific, not a generic CLIFastMCP("mcp-cloudflare-dns") in cf/server.py
Cloudflare failures are retried_call() in cf/server.py
Release artifacts are builtdist/ wheel and tarball are checked into the repo

Repo map

PathPurpose
cf/server.pyFastMCP tool surface, env loading, retry wrapper
pyproject.tomlPackage metadata, version, script entry point
server.jsonRegistry-facing metadata for MCP discovery
docs/start-here.mdSetup, env, validation, common failures
docs/architecture.mdComponent map and request lifecycle

Validation

CheckCommand
Import compilespython -m compileall cf
Package buildspython -m build
README links stay localrg '\\]\\(([^)]+\\.md)\\)' README.md docs/

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.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.