At a glance
- Availability: Experimental (how to enable).
- Auth: API key.
- Connection: The key from
HCLOUD_TOKENis sent as theBearerprefixedAuthorizationheader. - Docs: https://docs.hetzner.cloud/reference/cloud
Credentials
Set these per environment. See Connect an integration.| Variable | Required | Description |
|---|---|---|
HCLOUD_TOKEN | Yes | Hetzner Cloud API token (per project, created in Console under Security > API tokens); same env var used by hcloud CLI and Terraform Docs. |
Setup
- 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).
- 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).
- Set the environment variable: Copy the token into your .env as HCLOUD_TOKEN - it is shown only once at creation time.
- 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
Tools
| Tool | Access | Description |
|---|---|---|
| List Servers | Read | List servers in the Hetzner Cloud project with optional name, label, and status filtering |
| Get Server | Read | Get a server by ID, including status, server type, image, and public network info |
| Create Server | Write | Create a new server (provisions billable infrastructure) |
| Power On Server | Write | Power on a server by ID |
| Power Off Server | Write | Cut power to a server by ID (hard power off, like pulling the plug; data may be lost if the OS is running) |
| List Images | Read | List available images (system images, backups, snapshots) usable for server creation |
| List Server Types | Read | List available server types (sizes) with cores, memory, disk, and pricing |
| Shutdown Server | Write | Gracefully shut down a server by sending an ACPI shutdown signal to the OS - prefer this over Power Off for running workloads |
| Reboot Server | Write | Gracefully reboot a server by sending an ACPI reboot signal to the OS |
| List SSH Keys | Read | List 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.