Home / Servers / Hetzner Cloud API / add_network_subnet

Add a subnet to a Network

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

Add a subnet to a Network Adds a new subnet to the Network. If the subnet ip_range is not provided, the first available /24 IP range will be used. If a change is currently being performed on this Network, a error response… [POST /networks/{id}/actions/add_subnet]

Name on the gateway: hetzner_api__add_network_subnet · may change things.

Parameters

NameTypeDescription
id requiredintegerID of the Network.
type requiredcloud | server | vswitchType of subnet.
ip_rangestringIP range of the subnet. Uses CIDR notation. Must be a subnet of the parent…
network_zone requiredstringName of the Network Zone. The Location contains the network_zone it belongs to.
vswitch_idintegerID of the robot vSwitch. Must be supplied if the subnet is of type vswitch.

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": "hetzner_api__add_network_subnet",
  "arguments": {
    "id": 0,
    "type": "…",
    "network_zone": "…"
  }
}

Or connect the Hetzner Cloud API server directly, which lists 178 tools including this one:

Run in your terminal
claude mcp add --transport http hj-hetzner-api https://mcp.hjlabs.in/mcp/hetzner-api \
  --header "Authorization: Bearer YOUR_API_KEY"

Try asking

Use the add a subnet to a network tool with id set to ….

More from Hetzner Cloud API