home / mcp / mcp cloudflare dns server
Provides Cloudflare DNS management via MCP with list, create, update, and delete capabilities.
Configuration
View docs{
"mcpServers": {
"gilberth-mcp-cloudflare": {
"command": "npx",
"args": [
"-y",
"@thelord/mcp-cloudflare"
],
"env": {
"CLOUDFLARE_EMAIL": "[email protected]",
"CLOUDFLARE_ZONE_ID": "YOUR_ZONE_ID",
"CLOUDFLARE_API_TOKEN": "YOUR_API_TOKEN"
}
}
}
}You can run this MCP server to manage Cloudflare DNS records using AI-powered agents. It lets you list, create, update, and delete DNS records across your zones, with full Cloudflare API support and optional scoped tokens for enhanced security.
You interact with the Cloudflare DNS MCP server using an MCP client or your automation setup. Start the server locally with a simple command, provide your Cloudflare credentials, and then issue actions to list, create, update, or delete DNS records. The server exposes tools for common DNS record operations and supports standard record types such as A, AAAA, CNAME, MX, TXT, NS, SRV, CAA, and PTR.
Prerequisites: ensure you have Node.js installed on your system. You can verify by running node -v and npm -v.
Install and run the MCP server locally using the provided package via npx.
npx -y @thelord/mcp-cloudflareCreate a configuration file or environment variables to authenticate with Cloudflare and identify your zone.
env
CLOUDFLARE_API_TOKEN=your-api-token-here
CLOUDFLARE_ZONE_ID=your-zone-id-here
[email protected] # OptionalIf you prefer a JSON configuration snippet for client tooling, you can use the following example to wire up a local stdio MCP server with npx.
{
"mcpServers": {
"cloudflare": {
"command": "npx",
"args": ["-y", "@thelord/mcp-cloudflare"],
"env": {
"CLOUDFLARE_API_TOKEN": "your-api-token",
"CLOUDFLARE_ZONE_ID": "your-zone-id"
}
}
}
}Environment variables you define are used to authenticate with Cloudflare and to identify the zone you manage. You can also set an optional email if your workflow requires it.
You can run the server in a hosted environment as well. Provide your API token and zone ID in your deployment configuration or environment. The server will perform DNS operations against Cloudflare using the provided credentials.
Available tools include listing DNS records, retrieving details for a specific record, creating new records, updating existing records by ID, and deleting records by ID.
Security considerations: API tokens are never logged or exposed by the server. The server uses the official Cloudflare API with secure authentication and supports scoped API tokens to limit permissions.
The MCP server supports common DNS record types such as A, AAAA, CNAME, MX, TXT, NS, SRV, CAA, and PTR. It allows you to configure proxying, TTL, and priority settings where applicable.
To configure Claude Desktop to run the Cloudflare MCP server, provide the following block in your Claude configuration.
{
"mcpServers": {
"cloudflare": {
"command": "npx",
"args": ["-y", "@thelord/mcp-cloudflare"],
"env": {
"CLOUDFLARE_API_TOKEN": "your-api-token",
"CLOUDFLARE_ZONE_ID": "your-zone-id"
}
}
}
}List all DNS records or filter by name/type.
Get detailed information about a specific DNS record.
Create a new DNS record with specified type, name, and content.
Update an existing DNS record by ID.
Delete a DNS record by ID.