All integrations

Hetzner

Manage Hetzner Cloud servers, volumes, firewalls, networks, load balancers, and DNS via MCP. Connect with a project API token.

Manual setup 67 tools

Example questions

Try asking your AI client

  • Which Hetzner Cloud servers are running or off right now?

  • Did the web-1 server finish rebuilding after last night?

  • Summarize volumes and floating IPs that look unused.

  • Write a draft DNS A record for staging.example.com - do not create it.

  • Which firewalls are attached to production servers?

Overview

Connect Hetzner Cloud so AI clients can inspect and operate servers, volumes, firewalls, networks, load balancers, and DNS zones through the Hetzner Cloud API.

stackgate.ai stores your project API token encrypted and calls https://api.hetzner.cloud/v1 on your behalf. Tool results are returned to your AI client for that request. This integration covers Hetzner Cloud only, not Robot dedicated servers or Storage Boxes.

Prerequisites

  • A Hetzner Console account with at least one Cloud project
  • A stackgate.ai account

Getting credentials

  1. Sign in to the Hetzner Console.
  2. Open the project this token should manage. Tokens cannot be used across projects.
  3. Go to Security → API tokens → Generate API token.
  4. Enter a description such as stackgate.ai.
  5. Choose Read if AI should only inspect resources, or Read & Write if it should create, power, or delete them.
  6. Copy the token once. Hetzner will not show it again.
  7. In stackgate.ai, open My Integrations → Hetzner, paste the token, and click Connect & enable.
  8. Optionally restrict tools with Edit tool access (Read vs Write) after connecting.

Treat the token like a password. Revoke or rotate it in the Console if it is exposed.

Using with AI clients

  • Dedicated endpoint: POST /mcp/hetzner with a Sanctum bearer token
  • Private gateway: one config for all integrations - use hetzner__* namespaced tools

See Documentation for HTTP authentication and private gateway setup.

Suggested workflow

  1. list_locations / list_server_types / list_images / list_ssh_keys - gather IDs before create.
  2. list_servers / get_server - inspect status and public IPs.
  3. initiate_server_action - power control (prefer shutdown, then poweroff if needed).
  4. list_server_actions / get_server_action - poll async work without tight loops.
  5. Volume, firewall, network, floating IP, load balancer, and list_zones / RRSet tools for the rest of the control plane.

Troubleshooting

  • 422 integration not configured - paste a Cloud API token in My Integrations.
  • 401 Unauthorized - regenerate the token in Console → Security → API tokens and update My Integrations.
  • 403 Forbidden - the token is Read-only, or it belongs to a different project than the resource.
  • 429 Too many requests - Hetzner limits Cloud API calls to about 3600 per hour per project. Wait for the reset window and avoid polling actions every few hundred milliseconds.
  • Wrong project - create the token inside the project you want AI to manage.
  • Destructive actions - delete_server, delete_volume, and DNS deletes can cause outages; confirm intent before approving Write access.

Available tools

  • list_servers

    List Cloud servers in the connected project.

  • get_server

    Get details for a Cloud server.

  • list_server_actions

    List async actions for a server. Prefer this over polling every few hundred milliseconds.

  • get_server_action

    Get a single server action by ID.

  • get_server_metrics

    Get CPU, disk, or network metrics for a server. start and end are ISO-8601 timestamps.

  • list_locations

    List Cloud locations (for example nbg1, fsn1, hel1).

  • get_location

    Get a location by ID or name.

  • list_datacenters

    List datacenters.

  • get_datacenter

    Get a datacenter by ID or name.

  • list_server_types

    List server types (CPU, memory, disk, architecture).

  • get_server_type

    Get a server type by ID or name.

  • list_images

    List images (system, snapshot, backup, or app).

  • get_image

    Get an image by ID or name.

  • list_ssh_keys

    List SSH keys in the project.

  • get_ssh_key

    Get an SSH key by ID or name.

  • get_pricing

    Get current Cloud pricing for the project.

  • create_server

    Create a Cloud server. Requires name, server_type, image, and exactly one of location or datacenter.

  • update_server

    Update a server name or labels.

  • delete_server

    Delete a Cloud server. This is destructive.

  • initiate_server_action

    Start a server action. Prefer shutdown before poweroff. Extra fields depend on the action (image for rebuild, server_type for change_type, iso for attach_iso, network for attach/detach).

  • create_ssh_key

    Create an SSH key in the project.

  • update_ssh_key

    Update an SSH key name or labels.

  • delete_ssh_key

    Delete an SSH key.

  • list_volumes

    List volumes in the project.

  • get_volume

    Get a volume by ID.

  • create_volume

    Create a volume. Provide location or server (not both).

  • delete_volume

    Delete a volume. Detach it first if it is attached.

  • initiate_volume_action

    Start a volume action: attach, detach, resize, or change_protection.

  • list_firewalls

    List firewalls.

  • get_firewall

    Get a firewall by ID.

  • create_firewall

    Create a firewall with inbound/outbound rules.

  • update_firewall

    Update a firewall name or labels.

  • delete_firewall

    Delete a firewall.

  • apply_firewall

    Apply a firewall to servers or label selectors.

  • remove_firewall

    Remove a firewall from servers or label selectors.

  • list_networks

    List private networks.

  • get_network

    Get a network by ID.

  • create_network

    Create a private network.

  • update_network

    Update a network name, labels, or vSwitch route exposure.

  • delete_network

    Delete a private network.

  • list_floating_ips

    List floating IPs.

  • get_floating_ip

    Get a floating IP by ID.

  • create_floating_ip

    Create a floating IP. Provide home_location or server.

  • delete_floating_ip

    Delete a floating IP.

  • initiate_floating_ip_action

    Start a floating IP action: assign, unassign, change_dns_ptr, or change_protection.

  • list_primary_ips

    List primary IPs.

  • get_primary_ip

    Get a primary IP by ID.

  • create_primary_ip

    Create a primary IP. Provide datacenter or assignee_id.

  • delete_primary_ip

    Delete a primary IP.

  • list_load_balancers

    List load balancers.

  • get_load_balancer

    Get a load balancer by ID.

  • create_load_balancer

    Create a load balancer. Provide location or network_zone.

  • delete_load_balancer

    Delete a load balancer.

  • list_load_balancer_types

    List load balancer types.

  • list_placement_groups

    List placement groups.

  • get_placement_group

    Get a placement group by ID.

  • create_placement_group

    Create a placement group.

  • delete_placement_group

    Delete a placement group.

  • list_zones

    List Cloud DNS zones.

  • get_zone

    Get a DNS zone by ID or name.

  • create_zone

    Create a Cloud DNS zone.

  • delete_zone

    Delete a DNS zone.

  • list_zone_rrsets

    List DNS record sets in a zone.

  • get_zone_rrset

    Get a DNS record set by zone, name, and type.

  • create_zone_rrset

    Create a DNS record set in a zone.

  • update_zone_rrset

    Replace records or TTL on a DNS record set.

  • delete_zone_rrset

    Delete a DNS record set.

MCP endpoint: https://stackgate.ai/mcp/hetzner (HTTP) or via the private gateway.