io.github.crunchtools/cloudflare
Secure MCP server for Cloudflare DNS, Transform Rules, and Page Rules
Versions
0.1.1latestTools 26
list_zones_tool List all Cloudflare zones accessible by the API token. Args: name: Filter by zone name (domain) status: Filter by status (active, pending, initializing, moved, deleted) page: Page number for pagination (default: 1) per_page: Results per page, max 50 (default: 50) Returns: List of zones with pagination info
get_zone_tool Get Cloudflare zone details by ID or name. Provide either zone_id or zone_name, not both. Args: zone_id: Zone ID (32-character hex string) zone_name: Zone name (domain like example.com) Returns: Zone details
list_dns_records_tool List DNS records for a Cloudflare zone. Args: zone_id: Zone ID (32-character hex string) type: Filter by record type (A, AAAA, CNAME, MX, TXT, etc.) name: Filter by record name content: Filter by record content page: Page number (default: 1) per_page: Results per page, max 100 (default: 100) Returns: List of DNS records with pagination info
get_dns_record_tool Get a single DNS record by ID. Args: zone_id: Zone ID (32-character hex string) record_id: DNS record ID (32-character hex string) Returns: DNS record details
create_dns_record_tool Create a new DNS record. Args: zone_id: Zone ID (32-character hex string) type: Record type (A, AAAA, CNAME, MX, TXT, NS, SRV, CAA) name: Record name (e.g., www, @, subdomain.example.com) content: Record content (IP address, target domain, etc.) ttl: TTL in seconds, 1 = auto (default: 1) proxied: Proxy through Cloudflare (default: false) priority: Priority for MX/SRV records comment: Optional comment Returns: Created DNS record details
update_dns_record_tool Update an existing DNS record. Args: zone_id: Zone ID (32-character hex string) record_id: DNS record ID (32-character hex string) type: Record type (optional) name: Record name (optional) content: Record content (optional) ttl: TTL in seconds (optional) proxied: Proxy through Cloudflare (optional) priority: Priority (optional) comment: Comment (optional) Returns: Updated DNS record details
delete_dns_record_tool Delete a DNS record. Args: zone_id: Zone ID (32-character hex string) record_id: DNS record ID (32-character hex string) Returns: Deletion confirmation
list_request_header_rules_tool List request header modification rules. Args: zone_id: Zone ID (32-character hex string) Returns: Ruleset with request header modification rules
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": {...}}} Args: zone_id: Zone ID (32-character hex string) rules: List of rule definitions Returns: Updated ruleset
list_response_header_rules_tool List response header modification rules. Args: zone_id: Zone ID (32-character hex string) Returns: Ruleset with response header modification rules
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": {...}}} Args: zone_id: Zone ID (32-character hex string) rules: List of rule definitions Returns: Updated ruleset
list_url_rewrite_rules_tool List URL rewrite rules. Args: zone_id: Zone ID (32-character hex string) Returns: Ruleset with URL rewrite rules
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": "..."}}} Args: zone_id: Zone ID (32-character hex string) rules: List of rule definitions Returns: Updated ruleset
list_page_rules_tool List all page rules for a zone. Args: zone_id: Zone ID (32-character hex string) status: Filter by status (active, disabled) order: Sort order (status, priority) Returns: List of page rules
create_page_rule_tool Create a new page rule. Args: zone_id: Zone ID (32-character hex string) targets: URL pattern targets actions: Page rule actions priority: Rule priority 1-1000 (default: 1) status: active or disabled (default: active) Returns: Created page rule details
update_page_rule_tool Update an existing page rule. Args: zone_id: Zone ID (32-character hex string) rule_id: Page rule ID (32-character hex string) targets: URL patterns (optional) actions: Actions (optional) priority: Priority (optional) status: Status (optional) Returns: Updated page rule details
delete_page_rule_tool Delete a page rule. Args: zone_id: Zone ID (32-character hex string) rule_id: Page rule ID (32-character hex string) Returns: Deletion confirmation
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. Args: zone_id: Zone ID (32-character hex string) purge_everything: Purge all cached content files: URLs to purge (max 30) tags: Cache tags to purge (Enterprise) hosts: Hostnames to purge (Enterprise) prefixes: URL prefixes to purge (Enterprise) Returns: Purge operation result
get_zone_analytics_tool Get zone traffic analytics summary. Returns total requests, unique visitors, bandwidth, cache ratio, and status code breakdown for the given date range. Provide either zone_id or zone_name, not both. Args: zone_id: Zone ID (32-character hex string) zone_name: Zone name (domain like example.com) since: Start date ISO format (default: 30 days ago) until: End date ISO format (default: today) Returns: Analytics summary with requests, bandwidth, visitors, and status codes
get_top_pages_tool Get top pages by request count. Provide either zone_id or zone_name, not both. Args: zone_id: Zone ID (32-character hex string) zone_name: Zone name (domain like example.com) since: Start date ISO format (default: 30 days ago) until: End date ISO format (default: today) limit: Number of results (default: 15) Returns: Top pages with request counts and bandwidth
get_traffic_by_country_tool Get traffic breakdown by country. Provide either zone_id or zone_name, not both. Args: zone_id: Zone ID (32-character hex string) zone_name: Zone name (domain like example.com) since: Start date ISO format (default: 30 days ago) until: End date ISO format (default: today) limit: Number of countries (default: 20) Returns: Country breakdown with request counts and bandwidth
get_security_events_tool Get security/firewall events grouped by action and source. Provide either zone_id or zone_name, not both. Args: zone_id: Zone ID (32-character hex string) zone_name: Zone name (domain like example.com) since: Start date ISO format (default: 30 days ago) until: End date ISO format (default: today) limit: Number of results (default: 20) Returns: Security events with action, country, source, and count
list_waf_rules_tool List all WAF custom rules for a zone. Provide either zone_id or zone_name, not both. Args: zone_id: Zone ID (32-character hex string) zone_name: Zone name (domain like example.com) Returns: List of WAF rules with their expressions, actions, and status
create_waf_rule_tool Create a new WAF custom rule. Free plans support up to 5 custom rules. Provide either zone_id or zone_name, not both. Args: zone_id: Zone ID (32-character hex string) zone_name: Zone name (domain like example.com) expression: Cloudflare filter expression (e.g., '(http.request.uri.path contains "xmlrpc.php")') action: Action to take (managed_challenge, block, js_challenge, challenge, skip, log) description: Human-readable description of the rule enabled: Whether the rule is enabled (default: true) Returns: Created rule details
update_waf_rule_tool Update an existing WAF custom rule. Provide either zone_id or zone_name, not both. Args: rule_id: Rule ID (32-character hex string) zone_id: Zone ID (32-character hex string) zone_name: Zone name (domain like example.com) expression: New filter expression (optional) action: New action (optional) description: New description (optional) enabled: Enable or disable the rule (optional) Returns: Updated rule details
delete_waf_rule_tool Delete a WAF custom rule. Provide either zone_id or zone_name, not both. Args: rule_id: Rule ID (32-character hex string) zone_id: Zone ID (32-character hex string) zone_name: Zone name (domain like example.com) Returns: Deletion confirmation
Permissions 3
network medium filesystem low env_vars low