Skip to main content
Cloudflare Management

Connect a Cloudflare account credential

Stores a Cloudflare credential for this team (not an OAuth connection). Explicitly choose authMode: api_token (token in apiKey, no username) or global_api_key (Global API Key in apiKey and Cloudflare account email in username). For a token, grant Zone Read and DNS Write on the selected zones. Validation checks access to active zones, but DNS writes may still fail if DNS Write is missing. The secret is not returned by list operations. Invalid credentials return HTTP 400; MCP reports this as a tool error, not a successful credential-list response.

POST
/account/cloudflare/credentials
Authorizationstringheaderrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
accountNamestringrequired

User-defined label for this credential

apiKeystringrequired

Cloudflare Global API Key (global_api_key) or scoped API Token (api_token). Stored as a team credential; never returned in the credential list.

authModeenum<string>required

Required: choose api_token for a scoped bearer token or global_api_key for email plus legacy global key.

Available options: global_api_key, api_token
usernamestring

Cloudflare account email/username. Required when authMode=global_api_key.

Response

application/json

Updated credential list after connect

itemsobject[]