Cloudflare DNS MCP Server
Allows management of Cloudflare DNS zones and records, enabling operations such as listing zones, creating, reading, updating, and deleting DNS records, with support for Cloudflare proxy and filtering by type, name, or zone.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Cloudflare DNS MCP Serverlist all my DNS zones"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Cloudflare DNS MCP Server
A powerful Model Context Protocol (MCP) server for managing Cloudflare DNS zones and records via API. This server enables AI assistants like Claude to manage DNS records directly through Cloudflare's API.
Features
🌐 Zone Management: List and inspect DNS zones
📝 DNS Records: Create, read, update, and delete DNS records
🔍 Smart Filtering: Filter records by type, name, or zone
☁️ Cloudflare Proxy: Support for Cloudflare's proxy features
🛡️ Secure: Environment-based authentication
⚡ Fast: Direct API integration with minimal overhead
Related MCP server: Cloudflare MCP Server
Quick Start
Run the server directly with npx (requires Node.js 18+):
npx @artik0din/mcp-cloudflare-dnsOr install locally:
npm install -g @artik0din/mcp-cloudflare-dns
mcp-cloudflare-dnsEnvironment Variables
Create a .env file in your working directory:
Variable | Required | Description |
| ✅ | Your Cloudflare API token with Zone:Read and DNS:Edit permissions |
| ❌ | Default zone ID (can be provided per request) |
Getting Your Cloudflare API Token
Click "Create Token"
Use "Custom Token" with these permissions:
Zone Resources: Include All zones (or specific zones)
Permissions: Zone:Read, DNS:Edit
MCP Client Configuration
Claude Desktop
Add this to your Claude Desktop configuration:
{
"mcpServers": {
"cloudflare-dns": {
"command": "npx",
"args": ["@artik0din/mcp-cloudflare-dns"],
"env": {
"CLOUDFLARE_API_TOKEN": "your_api_token_here",
"CLOUDFLARE_ZONE_ID": "your_zone_id_here"
}
}
}
}Other MCP Clients
Use the command npx @artik0din/mcp-cloudflare-dns with the appropriate environment variables set.
Available Tools
cloudflare_list_zones
List all DNS zones accessible to your API token.
Parameters: None
Example:
List all my Cloudflare zonescloudflare_get_zone
Get detailed information about a specific DNS zone.
Parameters:
zoneId(string, required): Zone ID to get details for
Example:
Get details for zone abc123def456cloudflare_list_dns_records
List DNS records for a specific zone with optional filtering.
Parameters:
zoneId(string, optional): Zone ID (uses default if not provided)type(string, optional): Filter by record type (A, AAAA, CNAME, MX, TXT, etc.)name(string, optional): Filter by record name
Example:
List all A records for my zone
List DNS records of type MX for zone abc123def456
Show all records for www.example.comcloudflare_create_dns_record
Create a new DNS record in a zone.
Parameters:
type(string, required): Record type (A, AAAA, CNAME, MX, TXT, etc.)name(string, required): Record name (e.g., www.example.com or @)content(string, required): Record content (IP, hostname, text, etc.)zoneId(string, optional): Zone ID (uses default if not provided)ttl(number, optional): TTL in seconds (1 = auto, 120-7200)priority(number, optional): Priority for MX recordsproxied(boolean, optional): Enable Cloudflare proxycomment(string, optional): Comment for the record
Example:
Create an A record for www pointing to 1.2.3.4
Create a CNAME record for blog pointing to www.example.com with TTL 3600
Add an MX record for @ pointing to mail.example.com with priority 10cloudflare_update_dns_record
Update an existing DNS record.
Parameters:
recordId(string, required): DNS record ID to updatetype(string, optional): New record typename(string, optional): New record namecontent(string, optional): New record contentzoneId(string, optional): Zone ID (uses default if not provided)ttl(number, optional): New TTL in secondspriority(number, optional): New priority for MX recordsproxied(boolean, optional): Enable/disable Cloudflare proxycomment(string, optional): New comment
Example:
Update record abc123 to point to IP 5.6.7.8
Change the TTL of record def456 to 3600 seconds
Enable proxy for record ghi789cloudflare_delete_dns_record
Delete a DNS record.
Parameters:
recordId(string, required): DNS record ID to deletezoneId(string, optional): Zone ID (uses default if not provided)
Example:
Delete DNS record abc123
Remove record def456 from zone ghi789Security Considerations
API Token Security: Never commit your API token to version control
Minimal Permissions: Use API tokens with minimal required permissions
Zone Restrictions: Consider restricting API tokens to specific zones
Regular Rotation: Rotate API tokens regularly
Environment Variables: Always use environment variables for credentials
Development
# Clone the repository
git clone https://github.com/artik0din/mcp-cloudflare-dns.git
cd mcp-cloudflare-dns
# Install dependencies
npm install
# Build the project
npm run build
# Run locally
npm startLicense
MIT License - see LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Credits
Built with the Model Context Protocol SDK and Cloudflare API.
Available Tools
6 toolscloudflare_create_dns_recordC
Create a new DNS record in a zone
| Name | Required | Description | Default |
|---|---|---|---|
| zoneId | No | Zone ID to create record in (optional if set in config) | |
| type | Yes | Record type (e.g., A, AAAA, CNAME, MX, TXT) | |
| name | Yes | Record name (e.g., www.example.com or @) | |
| content | Yes | Record content (IP address, hostname, text content, etc.) | |
| ttl | No | Time to live in seconds (1 = auto, 120-7200) | |
| priority | No | Priority for MX records | |
| proxied | No | Whether the record should be proxied through Cloudflare | |
| comment | No | Comment for the record |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are present, so the description must disclose behavior. It only states 'create', which implies mutation, but lacks details on side effects, permissions, rate limits, or error handling.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence, which is concise but lacks structure. It could benefit from a more detailed breakdown without becoming verbose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema is provided, and the description does not explain return values or error conditions. Given the tool has 8 parameters and no annotations, the description is insufficiently complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description adds no extra meaning beyond the schema, but the schema is self-sufficient.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (create) and resource (DNS record in a zone). It distinguishes itself from siblings by being the only 'create' tool, but does not explicitly mention alternatives.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus other tools like update or delete. No context about prerequisites or conditions is provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
cloudflare_delete_dns_recordB
Delete a DNS record
| Name | Required | Description | Default |
|---|---|---|---|
| recordId | Yes | DNS record ID to delete | |
| zoneId | No | Zone ID (optional if set in config) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, and the description does not disclose behavioral traits such as irreversibility, required permissions, or error states for a destructive operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, no wasted words. Appropriately size for a simple deletion tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema and minimal description. Lacks details on success/failure behavior, side effects, or error handling, which are important for a destructive action.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with clear descriptions for both parameters (recordId and zoneId). The tool description adds no additional meaning beyond what the schema already provides, so baseline of 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Delete a DNS record' uses a clear verb ('Delete') and specific resource ('DNS record'), distinguishing it from siblings like create, update, or list.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives (e.g., update), nor prerequisites like needing the record ID or zone context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
cloudflare_get_zoneB
Get details for a specific DNS zone
| Name | Required | Description | Default |
|---|---|---|---|
| zoneId | Yes | Zone ID to get details for |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must disclose behavioral traits. It only says 'Get details' without specifying read-only nature, authentication requirements, rate limits, or what 'details' entails. This is insufficient for full transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single short sentence, no wasted words. Perfectly concise for a simple tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with no output schema, the description should hint at the return structure or typical fields. It does not. The tool is simple, but the description leaves the agent guessing what 'details' includes. More context is needed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% (one parameter with description). The description adds no additional meaning beyond the schema. Baseline 3 is appropriate as the schema already documents the parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states 'Get details for a specific DNS zone', which is a specific verb-resource combination. It distinguishes from sibling tools like list_zones (different verb) and DNS record tools (different resource).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives. For example, it doesn't mention using list_zones first to get zone IDs, or contrast with other read operations. The usage context is purely implied.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
cloudflare_list_dns_recordsB
List DNS records for a zone
| Name | Required | Description | Default |
|---|---|---|---|
| zoneId | No | Zone ID to list records for (optional if set in config) | |
| type | No | Filter by record type (e.g., A, AAAA, CNAME, MX, TXT) | |
| name | No | Filter by record name (e.g., www.example.com) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description bears full responsibility for behavioral disclosure. It merely states 'List DNS records' without mentioning pagination, ordering, rate limits, or any side effects. This is minimal transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with no wasted words. However, it could be slightly more informative without losing conciseness, hence not a perfect score.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has no output schema, so the description should explain what is returned. It lacks any mention of the response format, pagination, or potential errors, leaving the agent underinformed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all parameters and their meanings. The description adds no additional context beyond what is in the schema, adhering to the baseline expectation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('List') and the resource ('DNS records for a zone'), which is specific and unambiguous. It effectively distinguishes from sibling tools like cloudflare_create_dns_record or cloudflare_get_zone.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives, such as when to list records versus creating or deleting them. No context about prerequisites or limiting factors is given.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
cloudflare_list_zonesA
List all DNS zones accessible to the API token
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must disclose behavioral traits. It only states the basic purpose, omitting details like pagination, response format, or any limitations, which is insufficient for a complete behavioral profile.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, front-loaded with key information, no extraneous words. Highly concise and efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite simple tool, no output schema or annotations means description should provide more context about return values, pagination, or access details. Current description is too minimal.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Input schema has zero parameters, so schema coverage is 100%. Description adds no parameter info, but none is needed. Baseline of 4 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states 'list all DNS zones accessible to the API token', with a specific verb and resource, and distinguishes from sibling tools that operate on records or single zones.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Implicitly communicates when to use (to list zones), but lacks explicit guidance on when not to use or alternatives. However, the purpose is straightforward and context makes usage clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
cloudflare_update_dns_recordC
Update an existing DNS record
| Name | Required | Description | Default |
|---|---|---|---|
| recordId | Yes | DNS record ID to update | |
| zoneId | No | Zone ID (optional if set in config) | |
| type | No | Record type (e.g., A, AAAA, CNAME, MX, TXT) | |
| name | No | Record name (e.g., www.example.com or @) | |
| content | No | Record content (IP address, hostname, text content, etc.) | |
| ttl | No | Time to live in seconds (1 = auto, 120-7200) | |
| priority | No | Priority for MX records | |
| proxied | No | Whether the record should be proxied through Cloudflare | |
| comment | No | Comment for the record |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full behavioral disclosure burden, yet it fails to mention key traits such as idempotency, error handling, or what happens if the record does not exist. The lack of output schema further limits transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence, which is efficient and front-loaded. However, it could be expanded slightly to include crucial usage hints without becoming verbose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has 9 parameters, no annotations, and no output schema, the description is incomplete. It does not clarify parameter roles (e.g., proxied, recordId uniqueness) or response expectations, leaving significant gaps for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage for all 9 parameters, so the baseline is 3. The description adds no extra meaning beyond the schema, but does not detract either.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (update) and resource (existing DNS record), effectively distinguishing it from sibling tools like create, delete, and list. However, it lacks specificity on what aspects can be updated.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives (e.g., cloudflare_create_dns_record) or any prerequisites. The agent is left without context for appropriate selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Each tool targets a distinct action (create, delete, get, list, update) on specific resources (DNS records or zones), with no overlap in functionality.
All tools follow a consistent 'cloudflare_verb_noun' pattern using snake_case, making them predictable and easy to differentiate.
Six tools is well-scoped for a DNS management server, covering essential CRUD operations without unnecessary bloat or gaps.
The set provides full CRUD for DNS records plus zone listing and details, covering the core lifecycle needs for DNS management.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Manage hosts, redirects, SSL, and traffic analytics from Claude and other AI assistants.
Buy & manage domains from any AI chat: availability, register, DNS, email forwarding, AI bot stats.
Custom domains for SaaS and AI agents: search, register, connect DNS, and issue HTTPS over MCP.
Domain registration for AI agents via Stripe or x402 crypto with Cloudflare DNS.
Related MCP Servers
- AlicenseBqualityDmaintenanceExposes Cloudflare DNS, security, redirects and zone-settings functionality as structured tools that AI assistants like Claude Desktop can invoke directly.1848MIT
- AlicenseAqualityCmaintenanceEnables AI assistants to manage Cloudflare resources through natural language, including DNS records, zone management, Workers KV storage, cache purging, and analytics. Supports comprehensive Cloudflare operations with secure API token authentication.132MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage Cloudflare infrastructure including DNS records, cache purging, SSL settings, Workers, and analytics through the Cloudflare API. Eliminates dashboard context-switching by allowing natural language control of domain management and infrastructure operations.
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to interact with the Cloudflare REST API for managing DNS records, zones, and other Cloudflare resources.MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/globodai-group/mcp-cloudflare-dns'
If you have feedback or need assistance with the MCP directory API, please join our Discord server