Skip to main content
Glama
gilberth

MCP Cloudflare DNS Server

by gilberth
README.md
# MCP Cloudflare DNS Server

A Model Context Protocol server implementation for Cloudflare DNS that enables AI agents to manage DNS records for your domains.

## Features

- 🔍 **List DNS records** - View all or filtered DNS records
- 📝 **Create DNS records** - Add new A, AAAA, CNAME, MX, TXT, and other record types  
- ✏️ **Update DNS records** - Modify existing records
- 🗑️ **Delete DNS records** - Remove unwanted records
- 🔧 **Full Cloudflare API support** - Supports proxying, TTL, priority settings

## Setup

### 1. Get Cloudflare API Token

1. Go to [Cloudflare API Tokens](https://dash.cloudflare.com/profile/api-tokens)
2. Click "Create Token"
3. Use "Zone:Edit" template or create custom token with:
   - Zone:Read
   - Zone:Edit
4. Copy your API token

### 2. Get Zone ID

1. Go to your domain in Cloudflare Dashboard
2. Copy the Zone ID from the right sidebar

## Usage

### With Smithery (Cloud)

Deploy directly to Smithery for hosted access.

### With npx (Local)

```bash
npx -y @thelord/mcp-cloudflare
```

### Environment Variables

Create a `.env` file:

```env
CLOUDFLARE_API_TOKEN=your-api-token-here
CLOUDFLARE_ZONE_ID=your-zone-id-here
CLOUDFLARE_EMAIL=your-email@example.com  # Optional
```

### Claude Desktop Configuration

```json
{
  "mcpServers": {
    "cloudflare": {
      "command": "npx",
      "args": ["-y", "@thelord/mcp-cloudflare"],
      "env": {
        "CLOUDFLARE_API_TOKEN": "your-api-token",
        "CLOUDFLARE_ZONE_ID": "your-zone-id"
      }
    }
  }
}
```

## Available Tools

### `list_dns_records`
List all DNS records or filter by name/type.

### `get_dns_record`
Get detailed information about a specific DNS record.

### `create_dns_record`
Create a new DNS record with specified type, name, and content.

### `update_dns_record`
Update an existing DNS record by ID.

### `delete_dns_record`
Delete a DNS record by ID.

## Supported DNS Record Types

- A (IPv4 address)
- AAAA (IPv6 address)  
- CNAME (Canonical name)
- MX (Mail exchange)
- TXT (Text)
- NS (Name server)
- SRV (Service)
- CAA (Certificate Authority Authorization)
- PTR (Pointer)

## Security

- API tokens are never logged or exposed
- Uses official Cloudflare API with secure authentication
- Supports scoped API tokens for minimal permissions

## License

MIT# mcp-cloudflare

TDQS

A3.5/5.0

Scored across 5 tools

Disambiguation5/5

Each tool has a clearly distinct purpose targeting a specific CRUD operation for DNS records. The verbs (create, delete, get, list, update) are unambiguous and correspond to standard database operations, leaving no room for confusion or overlap.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern with snake_case naming (e.g., create_dns_record, update_dns_record). The naming is predictable and uniform across all five tools, making them easily identifiable and organized.

Tool Count5/5

With 5 tools, this server is well-scoped for managing DNS records, covering the essential CRUD operations. Each tool serves a clear and necessary function without redundancy, making the count appropriate for the domain.

Completeness5/5

The tool set provides complete CRUD coverage for DNS records, including create, read (get and list), update, and delete operations. There are no obvious gaps, as all lifecycle actions are covered, ensuring agents can handle full workflows without dead ends.

Maintenance

ActivityInactive
ResponsivenessUnresponsive