Cloudflare connector
OAuth 2.0Developer ToolsMonitoringAutomationCloudflare is a cloud platform providing DNS management, CDN, security, and networking services. This connector enables automated management of zones, DNS...
Cloudflare connector
-
Install the SDK
Section titled “Install the SDK”Terminal window npm install @scalekit-sdk/nodeTerminal window pip install scalekit -
Set your credentials
Section titled “Set your credentials”Add your Scalekit credentials to your
.envfile. Find values in app.scalekit.com > Developers > API Credentials..env SCALEKIT_ENVIRONMENT_URL=<your-environment-url>SCALEKIT_CLIENT_ID=<your-client-id>SCALEKIT_CLIENT_SECRET=<your-client-secret> -
Set up the connector
Section titled “Set up the connector”Dashboard setup steps
Register your Scalekit environment with Cloudflare so Scalekit handles the OAuth flow and token lifecycle for your users. Create a Cloudflare OAuth client, then add its Client ID and Client Secret to your Scalekit connection.
-
Copy the redirect URI from Scalekit
-
In the Scalekit dashboard, go to AgentKit > Connections > Create Connection. Find Cloudflare and click Create.
-
Click Use your own credentials and copy the redirect URI. It looks like
https://<SCALEKIT_ENVIRONMENT_URL>/sso/v1/oauth/<CONNECTION_ID>/callback.
-
-
Create an OAuth client in Cloudflare
-
Sign in to the Cloudflare dashboard and go to Manage account > OAuth clients.
-
Click Create OAuth client.
-
Fill in the Configure OAuth client form:
- Client Name — for example,
Agent Auth - Response Type —
Code, Token - Grant type —
Authorization Code - Token Authentication Method —
None (PKCE) - Redirect (Callback) URLs — paste the redirect URI you copied from Scalekit, then press Return to add it
- Client Name — for example,
-
Click Next to continue to Select permission scopes.

-
-
Select permission scopes
Enable at least the scopes Scalekit requires:
Scope Required Zone Read ( zone.read)Yes DNS Read ( dns.read)Yes DNS Write ( dns.write)Only if your agent needs to manage DNS records Cache Purge ( cache.purge)Only if your agent needs to purge cached content Click Create to finish creating the OAuth client.
-
Copy your Client ID and Client Secret
- Cloudflare shows the Client ID and Client Secret once the client is created.
- Copy both values — the secret is shown only once.
-
Add credentials in Scalekit
- Return to the connection you created in Scalekit and enter:
- Client ID — from your Cloudflare OAuth client
- Client Secret — from your Cloudflare OAuth client
- Click Save.
- Return to the connection you created in Scalekit and enter:
-
-
Authorize and make your first call
Section titled “Authorize and make your first call”quickstart.ts import { ScalekitClient } from '@scalekit-sdk/node'import 'dotenv/config'const scalekit = new ScalekitClient(process.env.SCALEKIT_ENV_URL,process.env.SCALEKIT_CLIENT_ID,process.env.SCALEKIT_CLIENT_SECRET,)const actions = scalekit.actionsconst connector = 'cloudflare'const identifier = 'user_123'// Generate an authorization link for the userconst { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })console.log('Authorize Cloudflare:', link)process.stdout.write('Press Enter after authorizing...')await new Promise(r => process.stdin.once('data', r))// Make your first callconst result = await actions.executeTool({connector,identifier,toolName: 'cloudflare_account_list',toolInput: {},})console.log(result)quickstart.py import osfrom scalekit.client import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENV_URL"),client_id=os.getenv("SCALEKIT_CLIENT_ID"),client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),)actions = scalekit_client.actionsconnection_name = "cloudflare"identifier = "user_123"# Generate an authorization link for the userlink_response = actions.get_authorization_link(connection_name=connection_name,identifier=identifier,)print("Authorize Cloudflare:", link_response.link)input("Press Enter after authorizing...")# Make your first callresult = actions.execute_tool(tool_input={},tool_name="cloudflare_account_list",connection_name=connection_name,identifier=identifier,)print(result)
What you can do
Section titled “What you can do”Connect this agent connector to let your agent:
- List access application, account, dns record — List all Zero Trust Access applications configured in a Cloudflare account, with optional filtering by name or domain
- Get user — Retrieve the profile details of the currently authenticated Cloudflare user, including name, email, and account memberships
Tool list
Section titled “Tool list”Use the exact tool names from the Tool list below when you call execute_tool. If you’re not sure which name to use, list the tools available for the current user first.
cloudflare_access_application_list#List all Zero Trust Access applications configured in a Cloudflare account, with optional filtering by name or domain.5 params
List all Zero Trust Access applications configured in a Cloudflare account, with optional filtering by name or domain.
account_idstringrequiredThe ID of the Cloudflare accountdomainstringoptionalFilter applications by domainnamestringoptionalFilter applications by namepageintegeroptionalPage number of results to returnper_pageintegeroptionalNumber of results per pagecloudflare_account_list#List all Cloudflare accounts the current authenticated user has access to, with optional filtering by account name.4 params
List all Cloudflare accounts the current authenticated user has access to, with optional filtering by account name.
directionstringoptionalSort direction for resultsnamestringoptionalFilter accounts by name (partial match supported)pageintegeroptionalPage number of results to returnper_pageintegeroptionalNumber of results per pagecloudflare_dns_record_list#List, search, sort, and filter DNS records for a Cloudflare zone. Supports filtering by record type, name, and content.9 params
List, search, sort, and filter DNS records for a Cloudflare zone. Supports filtering by record type, name, and content.
zone_idstringrequiredThe unique identifier for the zone to list DNS records fromcontentstringoptionalFilter DNS records by content/valuedirectionstringoptionalSort direction (asc or desc)matchstringoptionalWhether to match all or any filter conditionsnamestringoptionalFilter DNS records by nameorderstringoptionalField to order results bypageintegeroptionalPage number for pagination (default 1)per_pageintegeroptionalNumber of results per page (default 20, max 100)typestringoptionalFilter DNS records by typecloudflare_user_get#Retrieve the profile details of the currently authenticated Cloudflare user, including name, email, and account memberships.0 params
Retrieve the profile details of the currently authenticated Cloudflare user, including name, email, and account memberships.
cloudflare_worker_script_list#Fetch a list of all uploaded Worker scripts in a Cloudflare account. Returns script names, creation dates, and modification timestamps.1 param
Fetch a list of all uploaded Worker scripts in a Cloudflare account. Returns script names, creation dates, and modification timestamps.
account_idstringrequiredThe Cloudflare account identifiercloudflare_zone_list#List, search, sort, and filter all zones in the Cloudflare account. Returns zone details including status, name servers, and plan information.7 params
List, search, sort, and filter all zones in the Cloudflare account. Returns zone details including status, name servers, and plan information.
directionstringoptionalSort direction (asc or desc)matchstringoptionalWhether to match all or any filter conditionsnamestringoptionalFilter zones by domain name (exact match)orderstringoptionalField to order results bypageintegeroptionalPage number for pagination (default 1)per_pageintegeroptionalNumber of results per page (default 20, max 50)statusstringoptionalFilter zones by status