Set up Cloudflare in Metorial for Claude, ChatGPT and Cursor
Share Cloudflare with your team in Claude, ChatGPT and Cursor through Metorial: global API key or API token sign-in, 19 tools (4 read-only).
To give your team Cloudflare in Claude, ChatGPT, Cursor and other AI clients, an admin shares the Cloudflare integration in a Metorial portal, and each person connects with a global API key. Agents can manage internet infrastructure including DNS records, domains, and zone settings. The integration has 19 tools, 4 read-only, 2 write and 13 destructive, plus 3 triggers.
What you'll learn
- How an admin shares Cloudflare in a portal and how each person connects
- What Cloudflare asks for when you connect, and where to find it
- How to keep the 4 read-only tools and reject the other 15
Before you start
- A portal with at least one access group
- A global API key from Cloudflare for each person, or one for a shared connection
- For the CLI steps: the Metorial CLI, signed in to your portal
Sign-in methods
| Method | Type | What a person provides |
|---|---|---|
| Global API Key (default) | Custom credentials | token and email |
| API Token | API token | token |
The portal and metorial setup use Global API Key unless someone picks another method.
Global API Key
To connect, a person enters these values:
token: Cloudflare Global API Key. Found in My Profile > API Tokens > Global API Key.email: Cloudflare account email address associated with the Global API Key.
API Token
To connect, a person enters:
token: Cloudflare API Token. Create one from My Profile > API Tokens in the Cloudflare dashboard.
Setup settings
Whichever method you pick, setup also asks for:
accountId(optional): Cloudflare Account ID. Found in the dashboard under Account Home.zoneId(optional): Cloudflare Zone ID for the primary domain. Found in the dashboard under the domain overview page.
Admin: share Cloudflare in a portal
In the dashboard
Open Shared Resources
Open Workforce, choose the portal, and select Shared Resources under Access.
Share a new integration
Select Share a Resource, then New Integration, and choose Cloudflare. Under Auth Method, keep Global API Key or pick another. For how members connect, choose Each person connects so everyone enters their own global API key, or Shared connection to enter one global API key for everyone.
Limit the tools
Under Tool Filters, set the write and destructive groups to Reject if agents should only read from Cloudflare.
Choose who gets it
Add the access groups that should see Cloudflare. When a person asks for access from the portal, the request appears under Access Requests.
With the CLI
The CLI cannot create the per-user Cloudflare integration. Once it exists, check which groups have it:
Employee: connect Cloudflare
In the portal
Open Cloudflare in the catalog
Sign in to your portal and open Cloudflare. The status reads Available.
Authenticate
Under Quick setup, select Authenticate. In the setup window, enter your global API key (token and email).
Confirm
The status changes to Configured. If it later reads Needs reconnect, select Reconnect and sign in again.
With the CLI
catalog search prints the catalog item ID. metorial setup uses Global API Key. To connect with API Token instead, find its ID with metorial catalog get <catalog-item-id> and add --auth-method <auth-method-id>.
Add it to your AI client
metorial install adds your Cloudflare connection to a local MCP client such as Claude Code, Cursor or Codex. metorial list prints the integration ID and metorial client list the client identifiers.
For a client that takes a server URL, such as ChatGPT, metorial install custom <integration-id> creates an installation token and shows the endpoint details.
Make it read-only
Open the integration's Tool Filters and set the write and destructive groups to Reject. Agents keep the 4 read-only tools, such as list_zones and list_workers, and lose the 2 write tools, such as manage_domains or update_zone_settings, and the 13 destructive tools, such as manage_kv or manage_zone.
Employees see the result on the integration's page in the portal under Tool access. For the full walkthrough, see Tool permissions.
Check it worked
metorial tools lists the 19 tools, minus any you rejected. list_zones takes no input. It lists all domains (zones) on the Cloudflare account.
To see every input a tool takes, run metorial schema <integration-id> <tool-key>.
Tools
Read-only tools (4)
list_workers: List all Workers scripts deployed on the account.list_dns_records: Retrieve DNS records for a Cloudflare zone. NeedszoneId.query_analytics: Query Cloudflare's GraphQL Analytics API for traffic, DNS, firewall, and performance data. Needsquery.list_zones: List all domains (zones) on the Cloudflare account.
Write tools (2)
update_zone_settings: Get or update zone-level settings such as SSL/TLS mode, security level, caching, minification, development mode, and more. NeedsactionandzoneId.manage_domains: List, get details, or update domain registrations managed through Cloudflare Registrar. Needsaction.
Destructive tools (13)
manage_r2_buckets: List, create, get details, or delete R2 object storage buckets. Needsaction.purge_cache: Purge cached content for a Cloudflare zone. NeedszoneId.manage_notifications: List, create, or delete notification policies and webhook destinations. Needsaction.manage_firewall_rules: List, create, or delete firewall rules, modern WAF custom rules, and IP access rules for a zone. NeedsactionandzoneId.manage_pages: List, get details, or manage Cloudflare Pages projects and their deployments. Needsaction.manage_ssl_certificates: View and manage SSL/TLS certificates for a zone. NeedsactionandzoneId.manage_dns_record: Create, retrieve, update, or delete a DNS record in a Cloudflare zone. NeedsactionandzoneId.manage_kv: Manage Workers KV (Key-Value) storage. Needsaction.manage_zone: Create or delete a domain (zone) on Cloudflare, or retrieve detailed zone information. Needsaction.manage_stream: List, view, or delete Cloudflare Stream videos. Needsaction.manage_worker_routes: List, create, or delete Worker routes for a zone. NeedsactionandzoneId.manage_account: View account details, list account members and roles, add or remove members, and view audit logs. Needsaction.manage_load_balancers: List, create, get, or delete load balancers for a zone. Needsaction.
Triggers
Cloudflare has 3 triggers, which fire on events in Cloudflare:
notification_webhook: Receives Cloudflare notification alerts via webhook.zone_status_changes: [Polling fallback] Polls for changes in zone status (e.g. active, pending, moved).dns_record_changes: [Polling fallback] Polls for new or modified DNS records in a zone.
Next steps
- Claude Code, Cursor, Codex and ChatGPT: connect each client to your portal and use Cloudflare there
- Tool permissions: tool filters and what employees see
- Cloudflare on metorial.com: the integration overview