Skip to main content

At a glance

Credentials

Set these per environment. See Connect an integration.
VariableRequiredDescription
HCLOUD_TOKENYesHetzner Cloud API token (per project, created in Console under Security > API tokens); same env var used by hcloud CLI and Terraform Docs.

Setup

  1. Get a Hetzner Cloud account: Sign up at https://www.hetzner.com/cloud and create a project in the Cloud Console (https://console.hetzner.cloud).
  2. Generate an API token: In the Cloud Console open your project, go to Security > API tokens, and generate a token with Read & Write permissions (Read-only suffices if you skip the write tools).
  3. Set the environment variable: Copy the token into your .env as HCLOUD_TOKEN - it is shown only once at creation time.
  4. Verify access: Run List Servers and List Server Types to confirm the token works.
  • API tokens are scoped to a single Hetzner Cloud project
  • Rate limit applies per token (check RateLimit-* response headers)
  • Power Off is a hard power cut - prefer a graceful OS shutdown for running workloads
  • Creating servers provisions billable infrastructure - confirm server type and location before running write tools
Provider API reference: https://docs.hetzner.cloud/reference/cloud

Tools

ToolAccessDescription
List ServersReadList servers in the Hetzner Cloud project with optional name, label, and status filtering
Get ServerReadGet a server by ID, including status, server type, image, and public network info
Create ServerWriteCreate a new server (provisions billable infrastructure)
Power On ServerWritePower on a server by ID
Power Off ServerWriteCut power to a server by ID (hard power off, like pulling the plug; data may be lost if the OS is running)
List ImagesReadList available images (system images, backups, snapshots) usable for server creation
List Server TypesReadList available server types (sizes) with cores, memory, disk, and pricing
Shutdown ServerWriteGracefully shut down a server by sending an ACPI shutdown signal to the OS - prefer this over Power Off for running workloads
Reboot ServerWriteGracefully reboot a server by sending an ACPI reboot signal to the OS
List SSH KeysReadList SSH keys in the project - use these IDs or names in the ssh_keys field of Create Server

Example prompts

  • List my Hetzner Cloud servers with their status, server type, and labels.
  • Create a small Ubuntu server on Hetzner Cloud after confirming the server type, location, and cost with me.
  • Power off the Hetzner Cloud server I name, wait for it to stop, then power it back on.