MetorialDocs

Set up Cloudflare Workers in Metorial for AI agents

Share Cloudflare Workers with your team in Claude, ChatGPT and Cursor through Metorial: global API key or API token sign-in, 36 tools (17 read-only).

To give your team Cloudflare Workers in Claude, ChatGPT, Cursor and other AI clients, an admin shares the Cloudflare Workers integration in a Metorial portal, and each person connects with a global API key. Agents can manage Cloudflare Workers serverless scripts, versions, and deployments on Cloudflare's global edge network. The integration has 36 tools, 17 read-only, 13 write and 6 destructive, plus 3 triggers.

What you'll learn

  • How an admin shares Cloudflare Workers in a portal and how each person connects
  • What Cloudflare Workers asks for when you connect, and where to find it
  • How to keep the 17 read-only tools and reject the other 19

Before you start

Sign-in methods

MethodTypeWhat a person provides
Global API Key (default)Custom credentialsemail and token
API TokenAPI tokentoken

The portal and metorial setup use Global API Key unless someone picks another method.

Global API Key

To connect, a person enters these values:

  • email: Cloudflare account email address.
  • token: Cloudflare Global API Key. Found under My Profile > API Tokens in the dashboard.

API Token

To connect, a person enters:

  • token: Cloudflare API Token. Created via My Profile > API Tokens in the Cloudflare dashboard.

Setup settings

Whichever method you pick, setup also asks for:

  • accountId: Cloudflare Account ID. Found in the Cloudflare dashboard under Account Home.

Admin: share Cloudflare Workers 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 Workers. 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 Workers.

Choose who gets it

Add the access groups that should see Cloudflare Workers. 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 Workers integration. Once it exists, check which groups have it:

metorial-admin portals access list <portal-id> --type provider_template --search "cloudflare workers"

Employee: connect Cloudflare Workers

In the portal

Open Cloudflare Workers in the catalog

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

Authenticate

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

Confirm

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

With the CLI

metorial catalog search "cloudflare workers"
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 Workers 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.

metorial list "cloudflare workers"
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 17 read-only tools, such as get_domain and get_script, and lose the 13 write tools, such as put_secret or create_tail, and the 6 destructive tools, such as delete_tail or delete_route.

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 list "cloudflare workers"
metorial tools <integration-id>
metorial call <integration-id> list_domains -d '{}'

metorial tools lists the 36 tools, minus any you rejected. list_domains takes no input. It lists all custom domains attached to Workers in the account.

To see every input a tool takes, run metorial schema <integration-id> <tool-key>.

Tools

Read-only tools (17)

  • list_tails: List all active tail sessions for a Worker script. Needs scriptName.
  • list_deployments: List all deployments for a Worker script. Needs scriptName.
  • get_subdomain: Retrieve the account's workers.dev subdomain and optionally check whether a specific Worker is enabled on it.
  • list_secrets: List all secret bindings on a Worker script. Needs scriptName.
  • list_telemetry_keys: List all available telemetry event keys for Workers observability queries.
  • list_scripts: List all Worker scripts in the account.
  • get_script: Retrieve detailed metadata and settings for a specific Worker script including bindings, compatibility settings, observability config, and placement. Needs scriptName.
  • get_schedules: Retrieve all cron trigger schedules configured for a Worker. Needs scriptName.
  • list_routes: List all Worker routes for a Cloudflare zone. Needs zoneId.
  • get_version: Retrieve detailed information about a specific Worker version, including its bindings, runtime configuration, and startup time. Needs scriptName and versionId.
  • get_worker_settings: Retrieve the full settings and bindings configuration for a Worker script, including environment variables, KV namespaces, R2 buckets, D1 databases, Queues, Durable Objects, and other bindings. Needs scriptName.
  • list_domains: List all custom domains attached to Workers in the account.
  • list_versions: List all versions of a Worker script. Needs scriptName.
  • get_deployment: Retrieve a specific Worker deployment, including its traffic strategy and version split. Needs scriptName and deploymentId.
  • get_domain: Retrieve a specific custom domain attachment for a Worker. Needs domainId.
  • get_script_content: Download a Worker's script content as a Slate attachment. Needs scriptName.
  • get_secret: Retrieve metadata for a secret binding on a Worker script. Needs scriptName and secretName.

Write tools (13)

  • attach_domain: Attach a Worker to a custom domain (hostname) on a Cloudflare zone. Needs hostname, scriptName and zoneId.
  • query_telemetry: Run an observability query against Workers telemetry data. Needs timeframeFrom and timeframeTo.
  • create_deployment: Deploy one or more Worker versions with a traffic split. Needs scriptName and versions.
  • update_script_settings: Update script-level settings for a Worker including Logpush, observability, tail consumers, and tags. Needs scriptName.
  • put_secret: Create or update a secret on a Worker script. Needs scriptName, secretName and secretValue.
  • create_route: Create a new Worker route that maps a URL pattern on a zone to a Worker script. Needs zoneId, pattern and scriptName.
  • update_schedules: Replace all cron trigger schedules for a Worker. Needs scriptName and schedules.
  • set_script_subdomain: Enable or disable a Worker on the workers.dev subdomain. Needs scriptName and enabled.
  • create_tail: Start a real-time log tail for a Worker script. Needs scriptName.
  • update_route: Update an existing Worker route's URL pattern and/or the target Worker script. Needs zoneId, routeId, pattern and scriptName.
  • put_script_content: Replace a Worker's script content without changing its existing configuration or metadata. Needs scriptName and scriptContent.
  • upload_version: Upload a new deployable Worker version without deploying it. Needs scriptName and scriptContent.
  • upload_worker_module: Create or replace a Worker script by uploading code and multipart metadata. Needs scriptName and scriptContent.

Destructive tools (6)

  • delete_secret: Delete a secret binding from a Worker script. Needs scriptName and secretName.
  • delete_script: Delete a Worker script from the account. Needs scriptName.
  • detach_domain: Detach a Worker from a custom domain. Needs domainId.
  • delete_tail: Stop an active tail session for a Worker script. Needs scriptName and tailId.
  • delete_route: Delete a Worker route from a zone. Needs zoneId and routeId.
  • delete_deployment: Delete a specific Worker deployment from a script. Needs scriptName and deploymentId.

Triggers

Cloudflare Workers has 3 triggers, which fire on events in Cloudflare Workers:

  • script_changes: Detects when Worker scripts are created, updated, or deleted in the account.
  • inbound_webhook
  • deployment_changes: Detects when new deployments are created for a specific Worker script, including gradual rollouts and full deployments.

Next steps