Home / Servers / Hetzner Cloud API / attach_server_to_network

Attach a Server to a Network

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

Attach a Server to a Network Attaches a Server to a network. This will complement the fixed public Server interface by adding an additional ethernet interface to the Server which is connected to the specified network. The… [POST /servers/{id}/actions/attach_to_network]

Name on the gateway: hetzner_api__attach_server_to_network · may change things.

Parameters

NameTypeDescription
id requiredintegerID of the Server.
network requiredintegerID of an existing network to attach the Server to.
ipstringIP to request to be assigned to this Server; if you do not provide this then…
alias_ipsarrayAdditional IPs to be assigned to this Server.
ip_rangestringIP range in CIDR block notation of the subnet to attach to. This allows for…

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__attach_server_to_network",
  "arguments": {
    "id": 0,
    "network": 0
  }
}

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 attach a server to a network tool with id set to ….

More from Hetzner Cloud API