Home / Servers / Hetzner Cloud API / assign_primary_ip
Assign a Primary IP to a resource
An MCP tool from the Hetzner Cloud API server, hosted on mcp.hjlabs.in.
Assign a Primary IP to a resource A Server can only have one Primary IP of type ipv4 and one of type ipv6 assigned. If you need more IPs use Floating IPs. A Server must be powered off (status off) in order for this operation to… [POST /primary_ips/{id}/actions/assign]
Name on the gateway: hetzner_api__assign_primary_ip · may change things.
Parameters
| Name | Type | Description |
|---|---|---|
id required | integer | ID of the Primary IP. |
assignee_type required | server | Type of resource assigning the Primary IP to. |
assignee_id required | integer | ID of a resource of type assignee_type. |
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": "hetzner_api__assign_primary_ip",
"arguments": {
"id": 0,
"assignee_type": "…",
"assignee_id": 0
}
}Or connect the Hetzner Cloud API server directly, which lists 178 tools including this one:
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 assign a primary ip to a resource tool with id set to ….