Cloudflare MCP Server for Cloudflare Workers
Test Cloudflare tools directly in your browser. Select a tool and provide inputs to see the results.
Create a free account to test Cloudflare tools interactively. No credit card required.
cloudflare_list_pages_projectsList all Pages projects in an account. Args: - account_id: The account ID - format: Response format
cloudflare_purge_cache_by_hostPurge cached content by hostname. This purges all cached content for the specified hostnames. You can purge up to 30 hosts at once. Args: - zone_id: The zone ID - hosts: Array of hostnames to purge (as JSON array string)
cloudflare_delete_worker_routeDelete a Worker route. Args: - zone_id: The zone ID - route_id: The route ID to delete
cloudflare_get_userGet the currently authenticated user's details. Returns the user's email, name, and account settings. Args: - format: Response format
cloudflare_list_accountsList all accounts the user has access to. Args: - page: Page number (default: 1) - per_page: Results per page (default: 20) - format: Response format
cloudflare_get_accountGet details of a specific account. Args: - account_id: The account ID - format: Response format
cloudflare_list_account_membersList all members of an account. Args: - account_id: The account ID - page: Page number (default: 1) - per_page: Results per page (default: 20) - format: Response format
cloudflare_get_zone_analyticsGet analytics dashboard data for a zone. Returns traffic statistics including requests, bandwidth, threats, and page views. Time range examples: - Last 24 hours: since=-1440 (minutes) - Last 7 days: since=-10080 - Specific range: since=2024-01-01T00:00:00Z until=2024-01-02T00:00:00Z Args: - zone_id: The zone ID - since: Start time (ISO 8601 or negative minutes from now) - until: End time (ISO 8601 or negative minutes from now) - format: Response format
cloudflare_list_filtersList all filters for a zone. Filters are the expressions used in firewall rules. Args: - zone_id: The zone ID - format: Response format
cloudflare_list_load_balancer_monitorsList all load balancer health monitors in an account. Monitors check the health of origins in pools and remove unhealthy origins from rotation. Args: - account_id: The account ID - format: Response format
cloudflare_get_dns_analyticsGet DNS analytics for a zone. Available dimensions: - queryName: Query name (domain being queried) - queryType: Query type (A, AAAA, CNAME, etc.) - responseCode: Response code (NOERROR, NXDOMAIN, etc.) - coloName: Cloudflare colo name Available metrics: - queryCount: Number of queries Args: - zone_id: The zone ID - dimensions: Dimensions to group by (as JSON array) - metrics: Metrics to return (as JSON array) - since: Start time - until: End time - format: Response format
cloudflare_purge_all_cachePurge all cached content for a zone. WARNING: This removes all cached files. The next requests will need to be served from your origin server, which may cause increased load. Args: - zone_id: The zone ID
cloudflare_purge_cache_by_urlPurge specific URLs from cache. You can purge up to 30 URLs at once. Args: - zone_id: The zone ID - urls: Array of URLs to purge (as JSON array string)
cloudflare_purge_cache_by_tagPurge cached content by cache tags. Cache tags must be set via the Cache-Tag response header from your origin. You can purge up to 30 tags at once. Args: - zone_id: The zone ID - tags: Array of cache tags to purge (as JSON array string)
cloudflare_list_d1_databasesList all D1 databases in an account. Args: - account_id: The account ID - page: Page number (default: 1) - per_page: Results per page (default: 20) - format: Response format
cloudflare_get_d1_databaseGet details of a specific D1 database. Args: - account_id: The account ID - database_id: The database UUID - format: Response format
cloudflare_create_d1_databaseCreate a new D1 database. Args: - account_id: The account ID - name: The database name
cloudflare_delete_d1_databaseDelete a D1 database. WARNING: This will permanently delete the database and all its data. Args: - account_id: The account ID - database_id: The database UUID
cloudflare_query_d1_databaseExecute a SQL query on a D1 database. Supports both read and write operations (SELECT, INSERT, UPDATE, DELETE, CREATE, etc.). Examples: - SELECT * FROM users WHERE id = ? - INSERT INTO users (name, email) VALUES (?, ?) - CREATE TABLE posts (id INTEGER PRIMARY KEY, title TEXT) Args: - account_id: The account ID - database_id: The database UUID - sql: The SQL query to execute - params: Query parameters for prepared statements (optional, as JSON array) - format: Response format
cloudflare_list_dns_recordsList DNS records for a zone. Returns all DNS records with their type, name, content, TTL, and proxy status. Args: - zone_id: The zone ID - type: Filter by record type (A, AAAA, CNAME, TXT, MX, etc.) - name: Filter by record name - content: Filter by record content - page: Page number (default: 1) - per_page: Results per page (1-100, default: 20) - format: Response format ('json' or 'markdown')
cloudflare_get_dns_recordGet a specific DNS record by ID. Args: - zone_id: The zone ID - record_id: The DNS record ID - format: Response format
cloudflare_create_dns_recordCreate a new DNS record. Common record types: - A: Maps domain to IPv4 address - AAAA: Maps domain to IPv6 address - CNAME: Alias to another domain - TXT: Text record (SPF, DKIM, verification, etc.) - MX: Mail exchange server (requires priority) Args: - zone_id: The zone ID - type: Record type (A, AAAA, CNAME, TXT, MX, etc.) - name: Record name (e.g., "@" for root, "www", "subdomain") - content: Record content (IP address, domain, text, etc.) - ttl: Time to live in seconds (1 = automatic) - proxied: Whether to proxy through Cloudflare (default: false) - priority: Priority for MX/SRV records - comment: Optional comment for the record
cloudflare_update_dns_recordUpdate an existing DNS record. Args: - zone_id: The zone ID - record_id: The DNS record ID to update - type: New record type (optional) - name: New record name (optional) - content: New record content (optional) - ttl: New TTL in seconds (optional) - proxied: New proxy status (optional) - comment: New comment (optional)
cloudflare_delete_dns_recordDelete a DNS record. Args: - zone_id: The zone ID - record_id: The DNS record ID to delete
cloudflare_export_dns_recordsExport all DNS records for a zone in BIND format. Returns the zone file as a string that can be imported to other DNS providers. Args: - zone_id: The zone ID
cloudflare_import_dns_recordsImport DNS records from a BIND zone file. The file should be in standard BIND zone file format. Args: - zone_id: The zone ID - file_content: The zone file content as a string
cloudflare_list_firewall_rulesList all firewall rules for a zone. Args: - zone_id: The zone ID - format: Response format
cloudflare_get_firewall_ruleGet a specific firewall rule. Args: - zone_id: The zone ID - rule_id: The rule ID - format: Response format
cloudflare_create_firewall_ruleCreate a new firewall rule. Filter expression examples: - (ip.src eq 192.168.1.1) - (http.request.uri.path contains "/admin") - (ip.geoip.country eq "CN") - (cf.threat_score gt 10) - (http.request.method eq "POST" and http.request.uri.path eq "/api/login") Actions: - block: Block the request - challenge: Show a CAPTCHA challenge - js_challenge: Show a JavaScript challenge - managed_challenge: Cloudflare decides the challenge type - allow: Allow the request (bypass other rules) - log: Log the request without action - bypass: Bypass specific security features Args: - zone_id: The zone ID - expression: Filter expression - action: Action to take - description: Rule description (optional) - paused: Whether the rule is paused (default: false)
cloudflare_update_firewall_ruleUpdate an existing firewall rule. Args: - zone_id: The zone ID - rule_id: The rule ID - action: New action (optional) - description: New description (optional) - paused: New paused status (optional)
cloudflare_delete_firewall_ruleDelete a firewall rule. Args: - zone_id: The zone ID - rule_id: The rule ID
cloudflare_list_kv_namespacesList all KV namespaces in an account. Args: - account_id: The account ID - page: Page number (default: 1) - per_page: Results per page (default: 20) - format: Response format
cloudflare_get_kv_namespaceGet details of a specific KV namespace. Args: - account_id: The account ID - namespace_id: The namespace ID - format: Response format
cloudflare_create_kv_namespaceCreate a new KV namespace. Args: - account_id: The account ID - title: The namespace title (must be unique in the account)
cloudflare_rename_kv_namespaceRename a KV namespace. Args: - account_id: The account ID - namespace_id: The namespace ID - title: The new title
cloudflare_delete_kv_namespaceDelete a KV namespace. WARNING: This will delete all keys in the namespace. Args: - account_id: The account ID - namespace_id: The namespace ID
cloudflare_list_kv_keysList keys in a KV namespace. Returns key names with optional metadata. Use cursor for pagination. Args: - account_id: The account ID - namespace_id: The namespace ID - prefix: Filter keys by prefix (optional) - cursor: Pagination cursor from previous response (optional) - limit: Max keys to return (1-1000, default: 1000) - format: Response format
cloudflare_get_kv_valueGet the value of a key from a KV namespace. Returns the raw value as a string. Args: - account_id: The account ID - namespace_id: The namespace ID - key: The key name
cloudflare_put_kv_valueSet a key-value pair in a KV namespace. Args: - account_id: The account ID - namespace_id: The namespace ID - key: The key name - value: The value to store (as string) - expiration: Unix timestamp when the key should expire (optional) - expiration_ttl: Seconds until the key expires (optional)
cloudflare_delete_kv_valueDelete a key from a KV namespace. Args: - account_id: The account ID - namespace_id: The namespace ID - key: The key to delete
cloudflare_list_load_balancersList all load balancers for a zone. Args: - zone_id: The zone ID - format: Response format
cloudflare_get_load_balancerGet details of a specific load balancer. Args: - zone_id: The zone ID - lb_id: The load balancer ID - format: Response format
cloudflare_list_load_balancer_poolsList all load balancer pools in an account. Pools are collections of origins (servers) that the load balancer distributes traffic to. Args: - account_id: The account ID - format: Response format
cloudflare_get_load_balancer_poolGet details of a specific load balancer pool. Args: - account_id: The account ID - pool_id: The pool ID - format: Response format
cloudflare_get_pages_projectGet details of a specific Pages project. Args: - account_id: The account ID - project_name: The project name - format: Response format
cloudflare_create_pages_projectCreate a new Pages project. Note: This creates an empty project. To deploy, use the Cloudflare dashboard or wrangler CLI to connect a Git repository or upload files. Args: - account_id: The account ID - name: The project name (will be used in the subdomain) - production_branch: The production branch name (default: main)
cloudflare_delete_pages_projectDelete a Pages project. WARNING: This will delete the project and all its deployments. Args: - account_id: The account ID - project_name: The project name
cloudflare_list_pages_deploymentsList all deployments for a Pages project. Args: - account_id: The account ID - project_name: The project name - format: Response format
cloudflare_get_pages_deploymentGet details of a specific deployment. Args: - account_id: The account ID - project_name: The project name - deployment_id: The deployment ID - format: Response format
cloudflare_delete_pages_deploymentDelete a specific deployment. Note: You cannot delete the current production deployment. Args: - account_id: The account ID - project_name: The project name - deployment_id: The deployment ID
cloudflare_get_worker_cron_triggersGet cron triggers (scheduled events) for a Worker. Args: - account_id: The account ID - script_name: The Worker script name - format: Response format
cloudflare_rollback_pages_deploymentRollback to a previous deployment. This will make the specified deployment the new production deployment. Args: - account_id: The account ID - project_name: The project name - deployment_id: The deployment ID to rollback to
cloudflare_list_r2_bucketsList all R2 buckets in an account. Args: - account_id: The account ID - format: Response format
cloudflare_get_r2_bucketGet details of a specific R2 bucket. Args: - account_id: The account ID - bucket_name: The bucket name - format: Response format
cloudflare_create_r2_bucketCreate a new R2 bucket. Bucket names must: - Be 3-63 characters long - Start with a letter or number - Contain only lowercase letters, numbers, and hyphens - Not end with a hyphen Location hints: - wnam: Western North America - enam: Eastern North America - weur: Western Europe - eeur: Eastern Europe - apac: Asia Pacific Args: - account_id: The account ID - name: The bucket name - location_hint: Preferred location for the bucket (optional)
cloudflare_delete_r2_bucketDelete an R2 bucket. WARNING: The bucket must be empty before it can be deleted. Args: - account_id: The account ID - bucket_name: The bucket name
cloudflare_list_ssl_certificatesList all SSL/TLS certificate packs for a zone. Returns Universal SSL, Advanced Certificate Manager, and custom certificates. Args: - zone_id: The zone ID - format: Response format
cloudflare_list_waf_packagesList all WAF packages for a zone. WAF packages contain groups of rules that protect against different threats. Common packages include Cloudflare Managed Ruleset and OWASP Core Ruleset. Args: - zone_id: The zone ID - format: Response format
cloudflare_list_waf_rulesList all WAF rules in a package. Args: - zone_id: The zone ID - package_id: The WAF package ID - format: Response format
cloudflare_update_waf_ruleUpdate the mode of a WAF rule. Modes: - default: Use the default action for this rule - disable: Disable the rule - simulate: Log matches but don't take action - block: Block matching requests - challenge: Present a challenge to matching requests Args: - zone_id: The zone ID - package_id: The WAF package ID - rule_id: The rule ID - mode: The new mode for the rule
cloudflare_list_workersList all Workers scripts in an account. Returns all deployed Workers with their metadata. Args: - account_id: The account ID - format: Response format ('json' or 'markdown')
cloudflare_get_workerGet the source code of a Worker script. Returns the JavaScript/TypeScript source code. Args: - account_id: The account ID - script_name: The Worker script name
cloudflare_delete_workerDelete a Worker script. WARNING: This will permanently delete the Worker and all its versions. Args: - account_id: The account ID - script_name: The Worker script name to delete
cloudflare_list_worker_routesList all Worker routes for a zone. Routes map URL patterns to Worker scripts. Args: - zone_id: The zone ID - format: Response format
cloudflare_create_worker_routeCreate a Worker route to map a URL pattern to a Worker. Pattern examples: - example.com/* (all paths on root domain) - *.example.com/* (all subdomains and paths) - example.com/api/* (specific path prefix) Args: - zone_id: The zone ID - pattern: URL pattern to match - script: Worker script name (optional, leave empty to disable)
cloudflare_list_worker_secretsList all secrets (environment variables) for a Worker. Note: Only secret names are returned, not values (for security). Args: - account_id: The account ID - script_name: The Worker script name - format: Response format
cloudflare_list_zonesList all zones (domains) in your Cloudflare account. Returns a paginated list of zones with their status, plan, and configuration. Args: - name: Filter by zone name (optional) - status: Filter by status (active, pending, etc.) (optional) - page: Page number (default: 1) - per_page: Results per page (1-100, default: 20) - format: Response format ('json' or 'markdown')
cloudflare_get_zoneGet detailed information about a specific zone. Args: - zone_id: The zone ID - format: Response format ('json' or 'markdown')
cloudflare_create_zoneAdd a new zone (domain) to your Cloudflare account. Args: - name: The domain name (e.g., "example.com") - account_id: The account ID to add the zone to - type: Zone type ('full' for full setup, 'partial' for CNAME setup) - jump_start: Whether to scan for existing DNS records (default: true)
cloudflare_update_zoneUpdate zone settings. Args: - zone_id: The zone ID - paused: Pause the zone (stops all Cloudflare features) - plan_id: Change the zone plan - type: Change zone type
cloudflare_delete_zoneDelete a zone from Cloudflare. WARNING: This will remove the zone and all its settings permanently. Args: - zone_id: The zone ID to delete
cloudflare_get_zone_settingsGet all settings for a zone. Returns settings like SSL mode, minification, caching, security settings, etc. Args: - zone_id: The zone ID - format: Response format ('json' or 'markdown')
cloudflare_update_zone_settingUpdate a specific zone setting. Common settings: - ssl: SSL/TLS encryption mode (off, flexible, full, strict) - always_use_https: Redirect HTTP to HTTPS (on/off) - min_tls_version: Minimum TLS version (1.0, 1.1, 1.2, 1.3) - automatic_https_rewrites: Rewrite HTTP to HTTPS in content (on/off) - browser_cache_ttl: Browser cache TTL in seconds - development_mode: Development mode (on/off) - security_level: Security level (off, essentially_off, low, medium, high, under_attack) - waf: Web Application Firewall (on/off) - minify: Minification settings (object with css, html, js) Args: - zone_id: The zone ID - setting_id: The setting ID to update - value: The new value for the setting
cloudflare_zone_activation_checkTrigger a check to verify zone activation status. Use this for zones that are in "pending" status to check if the nameservers have been updated. Args: - zone_id: The zone ID
cloudflare_list_pages_projects{
"format": "example_format",
"account_id": "example_account_id"
}cloudflare_purge_cache_by_host{
"hosts": "example_hosts",
"zone_id": "example_zone_id"
}cloudflare_delete_worker_route{
"zone_id": "example_zone_id",
"route_id": "example_route_id"
}