> Documentation index: https://metorial.com/llms.txt. Every page is available as Markdown by adding .md to its URL.

# Set up Cloudflare in Metorial for Claude, ChatGPT and Cursor
URL: https://metorial.com/docs/integrations/cloudflare
Last updated: 2026-11-24

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 will 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](https://metorial.com/docs/platform/workforce/portals) 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](https://metorial.com/docs/platform/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

1. **Open Shared Resources**

   Open **Workforce**, choose the portal, and select **Shared Resources** under **Access**.

2. **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.

3. **Limit the tools**

   Under **Tool Filters**, set the write and destructive groups to **Reject** if agents should only read from Cloudflare.

4. **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:

```bash
metorial-admin portals access list <portal-id> --type provider_template --search cloudflare
```

## Employee: connect Cloudflare

### In the portal

1. **Open Cloudflare in the catalog**

   Sign in to your portal and open Cloudflare. The status reads **Available**.

2. **Authenticate**

   Under **Quick setup**, select **Authenticate**. In the setup window, enter your global API key (token and email).

3. **Confirm**

   The status changes to **Configured**. If it later reads **Needs reconnect**, select **Reconnect** and sign in again.

### With the CLI

```bash
metorial catalog search cloudflare
metorial setup <catalog-item-id>
```

`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.

```bash
metorial list cloudflare
metorial client list
metorial install <client-identifier> <integration-id>
```

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](https://metorial.com/docs/platform/guides/tool-permissions).

## Check it worked

```bash
metorial list cloudflare
metorial tools <integration-id>
metorial call <integration-id> list_zones -d '{}'
```

`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. Needs `zoneId`.
- `query_analytics`: Query Cloudflare's GraphQL Analytics API for traffic, DNS, firewall, and performance data. Needs `query`.
- `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. Needs `action` and `zoneId`.
- `manage_domains`: List, get details, or update domain registrations managed through Cloudflare Registrar. Needs `action`.

### Destructive tools (13)

- `manage_r2_buckets`: List, create, get details, or delete R2 object storage buckets. Needs `action`.
- `purge_cache`: Purge cached content for a Cloudflare zone. Needs `zoneId`.
- `manage_notifications`: List, create, or delete notification policies and webhook destinations. Needs `action`.
- `manage_firewall_rules`: List, create, or delete firewall rules, modern WAF custom rules, and IP access rules for a zone. Needs `action` and `zoneId`.
- `manage_pages`: List, get details, or manage Cloudflare Pages projects and their deployments. Needs `action`.
- `manage_ssl_certificates`: View and manage SSL/TLS certificates for a zone. Needs `action` and `zoneId`.
- `manage_dns_record`: Create, retrieve, update, or delete a DNS record in a Cloudflare zone. Needs `action` and `zoneId`.
- `manage_kv`: Manage Workers KV (Key-Value) storage. Needs `action`.
- `manage_zone`: Create or delete a domain (zone) on Cloudflare, or retrieve detailed zone information. Needs `action`.
- `manage_stream`: List, view, or delete Cloudflare Stream videos. Needs `action`.
- `manage_worker_routes`: List, create, or delete Worker routes for a zone. Needs `action` and `zoneId`.
- `manage_account`: View account details, list account members and roles, add or remove members, and view audit logs. Needs `action`.
- `manage_load_balancers`: List, create, get, or delete load balancers for a zone. Needs `action`.

## 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](https://metorial.com/docs/platform/clients/claude-code), [Cursor](https://metorial.com/docs/platform/clients/cursor), [Codex](https://metorial.com/docs/platform/clients/codex) and [ChatGPT](https://metorial.com/docs/platform/clients/chatgpt): connect each client to your portal and use Cloudflare there
- [Tool permissions](https://metorial.com/docs/platform/guides/tool-permissions): tool filters and what employees see
- [Cloudflare on metorial.com](https://metorial.com/integrations/cloudflare): the integration overview