Home / Servers / Cloudflare API / custom_hostname_for_a_zone_create_custom_hostname

Create Custom Hostname

An MCP tool from the Cloudflare API server, hosted on mcp.hjlabs.in.

Create Custom Hostname Add a new custom hostname and request that an SSL certificate be issued for it. One of three… [POST /zones/{zone_id}/custom_hostnames]

Name on the gateway: cloudflare_api__custom_hostname_for_a_zone_create_custom_hostname · may change things.

Parameters

NameTypeDescription
zone_id requiredstringzone_id parameter
custom_metadataobjectUnique key/value metadata for this hostname.…
custom_origin_serverstringa valid hostname that’s been added to your DNS…
custom_origin_snistringA hostname that will be sent to your custom…
hostname requiredstringThe custom hostname that will point to your…
sslobjectSSL properties used when creating the custom…

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:

call_tool arguments
{
  "name": "cloudflare_api__custom_hostname_for_a_zone_create_custom_hostname",
  "arguments": {
    "zone_id": "…",
    "hostname": "…"
  }
}

Or connect the Cloudflare API server directly, which lists 3,127 tools including this one:

Run in your terminal
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 custom hostname tool with zone_id set to ….

More from Cloudflare API