Home / Servers / Cloudflare API / access_service_tokens_create_a_service_token_2
Create a service token
An MCP tool from the Cloudflare API server, hosted on mcp.hjlabs.in.
Create a service token Generates a new service token. **Note:** This is the only time you can get the Client Secret. If… [POST /zones/{zone_id}/access/service_tokens]
Name on the gateway: cloudflare_api__access_service_tokens_create_a_service_token_2 · may change things.
Parameters
| Name | Type | Description |
|---|---|---|
zone_id required | string | zone_id parameter |
client_secret_version | number | A version number identifying the current… |
duration | string | The duration for how long the service token will… |
enabled | boolean | Whether the service token is enabled. A disabled… |
name required | string | The name of the service token. |
previous_client_secret_expires_at | string | The expiration of the previous client_secret.… |
tags | object | Tags associated with the service token, as… |
How to call it
Through the Smart Gateway, any client can run it by name with call_tool, or let the gateway find it with search_tools:
{
"name": "cloudflare_api__access_service_tokens_create_a_service_token_2",
"arguments": {
"zone_id": "…",
"name": "…"
}
}Or connect the Cloudflare API server directly, which lists 3,127 tools including this one:
claude mcp add --transport http hj-cloudflare-api https://mcp.hjlabs.in/mcp/cloudflare-api \
--header "Authorization: Bearer YOUR_API_KEY"Try asking
Use the create a service token tool with zone_id set to ….