Skip to main content
Glama
@kodim/mcp-cloudflare-dns

@kodim/mcp-cloudflare-dns

by KodimTech

@kodim/mcp-cloudflare-dns

MCP server for managing and analyzing Cloudflare DNS — zones, records, analytics, and DNSSEC.

Installation

Claude Code

Add to your Claude Code MCP settings (.claude/settings.local.json or global settings):

{
  "mcpServers": {
    "cloudflare-dns": {
      "command": "npx",
      "args": ["-y", "@kodim/mcp-cloudflare-dns"],
      "env": {
        "CLOUDFLARE_API_TOKEN": "your-cloudflare-api-token"
      }
    }
  }
}

Cursor / Other MCP Clients

{
  "mcpServers": {
    "cloudflare-dns": {
      "command": "npx",
      "args": ["-y", "@kodim/mcp-cloudflare-dns"],
      "env": {
        "CLOUDFLARE_API_TOKEN": "your-cloudflare-api-token"
      }
    }
  }
}

Related MCP server: @archawat/mcp-cloudflare

Cloudflare API Token

Create an API token at Cloudflare Dashboard.

Required permissions:

  • Zone — Read

  • DNS — Edit

  • Analytics — Read (for analytics tools)

You can use the "Edit zone DNS" template as a starting point and add Analytics read permission.

Tools

Zones

Tool

Description

list_zones

List all DNS zones. Filter by name, status.

get_zone

Get full details of a zone by ID.

DNS Records

Tool

Description

list_dns_records

List records with filters (type, name, content, proxied, search, tag).

get_dns_record

Get details of a specific record.

create_dns_record

Create a record (A, AAAA, CNAME, MX, TXT, SRV, etc.).

update_dns_record

Partially update an existing record.

delete_dns_record

Permanently delete a record.

Bulk Operations

Tool

Description

batch_dns_records

Create, update, and delete multiple records in one call.

export_dns_records

Export all records in BIND format (for backups).

import_dns_records

Import records from BIND format content.

Analytics

Tool

Description

get_dns_analytics

Summary metrics: query count, response times, cache stats.

get_dns_analytics_by_time

Time-series analytics with configurable intervals.

DNSSEC

Tool

Description

get_dnssec_status

Get DNSSEC status and DS record details.

update_dnssec_status

Enable or disable DNSSEC.

Development

# Install dependencies
npm install --ignore-scripts

# Build
npm run build

# Watch mode
npm run watch

# Test with MCP Inspector
CLOUDFLARE_API_TOKEN=your-token npm run dev

License

MIT

Available Tools

14 tools
batch_dns_recordsBatch DNS RecordsA
Destructive

Execute multiple DNS record operations (create, update, delete) in a single API call. Operations execute in order: deletes first, then patches, then posts.

Inputs: zone_id (required), posts, deletes, patches.

create_dns_recordCreate DNS RecordA

Create a new DNS record in a zone. Supports all record types (A, AAAA, CNAME, MX, TXT, SRV, etc.). For proxied records, TTL is automatically set by Cloudflare.

Inputs: name (required), type (required), content (required), zone_id (required), +6 more.

delete_dns_recordDelete DNS RecordA
Destructive

Permanently delete a DNS record. This action cannot be undone. Use list_dns_records first to confirm the record ID.

Inputs: zone_id (required), record_id (required).

export_dns_recordsExport DNS RecordsA
Read-only

Export all DNS records for a zone in BIND format. Useful for backups or migrating to another DNS provider.

Inputs: zone_id (required).

get_dns_analyticsGet DNS AnalyticsA
Read-only

Get DNS query analytics summary for a zone. Returns aggregate metrics like query count, response times, and cache performance over a time period.

Inputs: zone_id (required), sort, limit, since, +4 more.

get_dns_analytics_by_timeGet DNS Analytics by TimeA
Read-only

Get DNS analytics broken down by time intervals. Returns time-series data for DNS metrics. Useful for monitoring trends and identifying patterns.

Inputs: zone_id (required), sort, limit, since, +5 more.

get_dns_recordGet DNS RecordA
Read-only

Get full details of a specific DNS record by its record ID.

Inputs: zone_id (required), record_id (required).

get_dnssec_statusGet DNSSEC StatusA
Read-only

Get the DNSSEC configuration and status for a zone. Returns DS record details needed for registrar configuration.

Inputs: zone_id (required).

get_zoneGet Zone DetailsA
Read-only

Get full details for a specific DNS zone by its zone ID. Returns zone configuration including name servers, status, and account info.

Inputs: zone_id (required).

import_dns_recordsImport DNS RecordsA

Import DNS records from BIND-formatted zone file content. Creates new records from the provided content.

Inputs: zone_id (required), bind_content (required), proxied.

list_dns_recordsList DNS RecordsA
Read-only

List DNS records for a zone. Filter by record type, name, or content. Use this to find existing records before creating or updating them.

Inputs: zone_id (required), tag, name, page, +8 more.

list_zonesList ZonesA
Read-only

List all DNS zones in the Cloudflare account. Optionally filter by domain name or status. Returns zone IDs needed for other operations.

Inputs: name, page, status, per_page.

update_dns_recordUpdate DNS RecordA

Update an existing DNS record. Only provide the fields you want to change. Use list_dns_records first to find the record ID.

Inputs: zone_id (required), record_id (required), ttl, name, +5 more.

update_dnssec_statusUpdate DNSSEC StatusA

Enable or disable DNSSEC for a zone. When enabling, Cloudflare generates the required keys and provides the DS record for your registrar.

Inputs: status (required), zone_id (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 14 tools

    Disambiguation5/5

    Each tool has a clear, distinct purpose: zone lookups, DNS record CRUD, batch operations, import/export, analytics (summary vs. time-series), and DNSSEC management. No two tools overlap ambiguously.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern in snake_case: get_, list_, create_, update_, delete_, batch_, export_, import_, and two get_dns_ analytics variants. Conventions are uniform and predictable.

    Tool Count5/5

    14 tools is well within the ideal 3-15 range for a domain-specific MCP server. Each tool covers a meaningful aspect of Cloudflare DNS management without redundancy or bloat.

    Completeness4/5

    The tool surface covers core DNS operations comprehensively: zone listing/detail, full DNS record CRUD, batch edits, BIND import/export, analytics, and DNSSEC. Minor gaps include no create_zone or update_zone, but these are peripheral for a DNS-focused server.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers