# MCP Cloudflare DNS [Health: Active]

**Category:** ☁️ Cloud Platforms  
**Repository:** https://github.com/apexradius/mcp-cloudflare-dns  
**GitHub Stars:** 0  
**Views:** 7  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/mcp-cloudflare-dns

## Description
Cloudflare DNS MCP server: manage zones, records, cache purge, and page rules.

## Tools
Capabilities this server exposes over MCP:

- **list_zones** — List all Cloudflare zones on this account.
- **get_zone** — Get details for a specific Cloudflare zone by ID.
- **get_zone_settings** — Get key security and performance settings for a zone.
Returns SSL mode, security level, minification, always-https, brotli, etc.
- **list_dns_records** — List DNS records for a zone.
- **get_dns_record** — Get a specific DNS record by zone ID and record ID.
- **create_dns_record** — Create a new DNS record.
- **update_dns_record** — Update an existing DNS record. Only the fields you provide will be changed.
- **delete_dns_record** — Delete a DNS record. Requires CF_ALLOW_DESTRUCTIVE=true.
- **purge_cache** — Purge Cloudflare cache for a zone.
- **list_page_rules** — List page rules for a zone.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "mcp-cloudflare-dns": {
    "command": "uvx",
    "args": ["mcp-cloudflare-dns"],
    "env": {
      "CF_API_TOKEN": ""
    }
  }
}
```

**Requires environment variables:** `CF_API_TOKEN` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What MCP Cloudflare DNS does

MCP Cloudflare DNS exposes Cloudflare account and zone operations as tools for an MCP client. It covers zone inventory, selected zone settings, DNS record management, cache invalidation, and page-rule inspection. The zone settings response includes values such as SSL mode, security level, minification, Always Use HTTPS, and Brotli.

DNS tools support both read and write workflows. An operator can list zones, inspect an individual zone, list records, retrieve one record, create a record, or update selected fields on an existing record. Record deletion is available behind a destructive-operation safety setting. Cache purge is also available for a zone, while page rules can be listed for inspection.

## How it works

The server uses FastMCP as its MCP interface. An MCP client selects a tool, and the server loads the Cloudflare API token before constructing the API request. Successful Cloudflare responses are converted into normalized JSON for the client. Retryable failures pass through a retry wrapper with backoff; non-retryable failures are returned as error payloads.

The package exposes an `mcp-cloudflare-dns` command entry point. It can be launched directly through an MCP client configuration using `uvx`, allowing the client to start the server over standard input and output. The documented client setup covers Claude, Codex, and Cursor.

## Setup and configuration

Install the package with:

```bash
python -m pip install mcp-cloudflare-dns
```

Set a Cloudflare API token with the DNS permissions needed for the operations you intend to perform:

```bash
export CF_API_TOKEN="your-cloudflare-api-token"
```

An MCP client can start the package with a configuration such as:

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

Set `CF_ALLOW_DESTRUCTIVE=true` when enabling the destructive DNS deletion operation. Keep this capability disabled when an environment should permit inspection and non-destructive changes only.

## Tools and capabilities

- `list_zones` and `get_zone` inspect Cloudflare zones.
- `get_zone_settings` reads key security and performance settings.
- `list_dns_records` and `get_dns_record` retrieve DNS records.
- `create_dns_record` adds a DNS record.
- `update_dns_record` changes only the fields included in the request.
- `delete_dns_record` removes a record when destructive access is enabled.
- `purge_cache` invalidates Cloudflare cache for a zone.
- `list_page_rules` displays page rules for a zone.

The project is released under the MIT license and is positioned as a beta package.

_Full upstream README: https://allmcps.com/mcp/mcp-cloudflare-dns/readme_

