MCP Cloudflare

v0.1.1
io.github.crunchtools/cloudflare Checked 2 days ago Published 9 months ago

Secure MCP server for Cloudflare DNS, Transform Rules, and Page Rules

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_zones_tool List Zones Tool

List all Cloudflare zones accessible by the API token.

ParameterTypeDescription
nameFilter by zone name (domain)
pageintegerPage number for pagination (default: 1)
per_pageintegerResults per page, max 50 (default: 50)
statusFilter by status (active, pending, initializing, moved, deleted)

get_zone_tool Get Zone Tool

Get Cloudflare zone details by ID or name. Provide either zone_id or zone_name, not both.

ParameterTypeDescription
zone_idZone ID (32-character hex string)
zone_nameZone name (domain like example.com)

list_dns_records_tool List Dns Records Tool

List DNS records for a Cloudflare zone.

ParameterTypeDescription
zone_id *stringZone ID (32-character hex string)
contentFilter by record content
nameFilter by record name
pageintegerPage number (default: 1)
per_pageintegerResults per page, max 100 (default: 100)
typeFilter by record type (A, AAAA, CNAME, MX, TXT, etc.)

get_dns_record_tool Get Dns Record Tool

Get a single DNS record by ID.

ParameterTypeDescription
record_id *stringDNS record ID (32-character hex string)
zone_id *stringZone ID (32-character hex string)

create_dns_record_tool Create Dns Record Tool

Create a new DNS record.

ParameterTypeDescription
content *stringRecord content (IP address, target domain, etc.)
name *stringRecord name (e.g., www, @, subdomain.example.com)
type *stringRecord type (A, AAAA, CNAME, MX, TXT, NS, SRV, CAA)
zone_id *stringZone ID (32-character hex string)
commentOptional comment
priorityPriority for MX/SRV records
proxiedbooleanProxy through Cloudflare (default: false)
ttlintegerTTL in seconds, 1 = auto (default: 1)

update_dns_record_tool Update Dns Record Tool

Update an existing DNS record.

ParameterTypeDescription
record_id *stringDNS record ID (32-character hex string)
zone_id *stringZone ID (32-character hex string)
commentComment (optional)
contentRecord content (optional)
nameRecord name (optional)
priorityPriority (optional)
proxiedProxy through Cloudflare (optional)
ttlTTL in seconds (optional)
typeRecord type (optional)

delete_dns_record_tool Delete Dns Record Tool

Delete a DNS record.

ParameterTypeDescription
record_id *stringDNS record ID (32-character hex string)
zone_id *stringZone ID (32-character hex string)

list_request_header_rules_tool List Request Header Rules Tool

List request header modification rules.

ParameterTypeDescription
zone_id *stringZone ID (32-character hex string)

set_request_header_rules_tool Set Request Header Rules Tool

Set request header modification rules (replaces all existing rules). Each rule should have: - expression: Filter expression (e.g., "true" for all requests) - description: Human-readable description - action: "rewrite" - action_parameters: {"headers": {"Header-Name": {...}}}

ParameterTypeDescription
rules *arrayList of rule definitions
zone_id *stringZone ID (32-character hex string)

list_response_header_rules_tool List Response Header Rules Tool

List response header modification rules.

ParameterTypeDescription
zone_id *stringZone ID (32-character hex string)

set_response_header_rules_tool Set Response Header Rules Tool

Set response header modification rules (replaces all existing rules). Each rule should have: - expression: Filter expression (e.g., "true" for all responses) - description: Human-readable description - action: "rewrite" - action_parameters: {"headers": {"Header-Name": {...}}}

ParameterTypeDescription
rules *arrayList of rule definitions
zone_id *stringZone ID (32-character hex string)

list_url_rewrite_rules_tool List Url Rewrite Rules Tool

List URL rewrite rules.

ParameterTypeDescription
zone_id *stringZone ID (32-character hex string)

set_url_rewrite_rules_tool Set Url Rewrite Rules Tool

Set URL rewrite rules (replaces all existing rules). Each rule should have: - expression: Filter expression - description: Human-readable description - action: "rewrite" - action_parameters: {"uri": {"path": {"value": "..."}, "query": {"value": "..."}}}

ParameterTypeDescription
rules *arrayList of rule definitions
zone_id *stringZone ID (32-character hex string)

list_page_rules_tool List Page Rules Tool

List all page rules for a zone.

ParameterTypeDescription
zone_id *stringZone ID (32-character hex string)
orderstringSort order (status, priority)
statusFilter by status (active, disabled)

create_page_rule_tool Create Page Rule Tool

Create a new page rule.

ParameterTypeDescription
actions *arrayPage rule actions
targets *arrayURL pattern targets
zone_id *stringZone ID (32-character hex string)
priorityintegerRule priority 1-1000 (default: 1)
statusstringactive or disabled (default: active)

update_page_rule_tool Update Page Rule Tool

Update an existing page rule.

ParameterTypeDescription
rule_id *stringPage rule ID (32-character hex string)
zone_id *stringZone ID (32-character hex string)
actionsActions (optional)
priorityPriority (optional)
statusStatus (optional)
targetsURL patterns (optional)

delete_page_rule_tool Delete Page Rule Tool

Delete a page rule.

ParameterTypeDescription
rule_id *stringPage rule ID (32-character hex string)
zone_id *stringZone ID (32-character hex string)

purge_cache_tool Purge Cache Tool

Purge cached content from Cloudflare's edge. Use one of: purge_everything, files, tags, hosts, or prefixes. tags, hosts, and prefixes require Enterprise plan.

ParameterTypeDescription
zone_id *stringZone ID (32-character hex string)
filesURLs to purge (max 30)
hostsHostnames to purge (Enterprise)
prefixesURL prefixes to purge (Enterprise)
purge_everythingbooleanPurge all cached content
tagsCache tags to purge (Enterprise)