Home / Servers / Hetzner Cloud API / create_firewall

Create a Firewall

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

Create a Firewall #### Operation specific errors | Status | Code | Description | | --- | --- | --- | | 422 | server_already_added | The Server was applied more than once. | | 422 | incompatible_network_type | The… [POST /firewalls]

Name on the gateway: hetzner_api__create_firewall · may change things.

Parameters

NameTypeDescription
name requiredstringName of the Firewall. Must be unique per Project.
labelsobjectUser-defined labels (key/value pairs) for the Resource. For more information…
rulesarrayArray of rules. Rules are limited to 50 entries per Firewall and 500 effective…
apply_toarrayResources to apply the Firewall to. Resources added directly are taking…

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__create_firewall",
  "arguments": {
    "name": "…"
  }
}

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 create a firewall tool with name set to ….

More from Hetzner Cloud API