Aerostack
electrical_services

Hetzner MCP Server — Hosted Api Connectors Integration

MCP Server language Hosted language Public

Manage Hetzner Cloud servers, networks, volumes, firewalls, and SSH keys via the Hetzner Cloud API.

aerostack @aerostack verified
v0.1.0 MIT Updated Jun 27, 2026
robot_2

Use with AI AssistantsMCP

Connect Claude, Cursor, or any MCP-compatible client — then call tools directly

① Add This MCP Server

Paste into your AI client config — then all its tools are available instantly.

.claude/mcp.json
{
  "mcpServers": {
    "hetzner": {
      "url": "https://mcp.aerostack.dev/s/aerostack/mcp-hetzner",
      "headers": {
        "Authorization": "Bearer YOUR_AEROSTACK_TOKEN"
      }
    }
  }
}

Replace YOUR_AEROSTACK_TOKEN with your API token from the dashboard.

② Call a Tool

Ask your AI assistant to call a specific tool, or send raw JSON-RPC:

+33 more

Natural Language Prompt

“Use the _ping tool to verify hetzner cloud credentials by calling a lightweight read endpoint. used internally by aerostack to validate credentials

Using a Workspace?

Add this MCP to your Workspace — your team shares one token, secrets are stored securely, and every AI agent in the workspace can call it without per-user setup.

add_circleAdd to Workspace

description Overview

mcp-hetzner — Hetzner Cloud MCP Server

Manage Hetzner Cloud servers, networks, volumes, and firewalls from any AI agent.

Hetzner Cloud is a leading European cloud provider offering high-performance VPS, dedicated servers, and cloud infrastructure at highly competitive pricing — favored by developers and startups worldwide. This MCP server gives your AI agents full access to the Hetzner Cloud API: create and manage servers, private networks, block storage volumes, firewalls, and SSH keys. Ideal for automating infrastructure provisioning, self-healing deployments, and cloud operations workflows.

Live endpoint: https://mcp.aerostack.dev/s/aerostack/mcp-hetzner


What You Can Do

  • Server lifecycle — create, reboot, power on/off, rebuild with a new OS image, and delete Hetzner Cloud servers programmatically
  • Private networks — create and manage VPC-style private networks to isolate your infrastructure
  • Block storage volumes — provision volumes, attach or detach them from servers, and delete them when no longer needed
  • Firewalls — define inbound/outbound rules and apply firewalls to servers to control network access
  • SSH keys — manage project-level SSH keys for passwordless server access
  • Locations and server types — discover available datacenters and server specs (CPU, RAM, disk, pricing) before provisioning
  • Load balancers — create, inspect, and delete load balancers and manage their targets
  • Snapshots — create and delete server snapshots for backups and image reuse
  • Floating IPs — allocate static IP addresses, assign/unassign them to servers, and release them

Available Tools

Tool Description
_ping Verify Hetzner Cloud credentials (used by Aerostack to validate the token)
list_servers List all servers with status, IPs, and server type
get_server Get full details of a server by ID
create_server Create a new server with specified type, image, location, and optional SSH keys
delete_server Permanently delete a server
reboot_server Reboot a server
power_on_server Power on a stopped server
power_off_server Power off a running server (hard shutdown)
rebuild_server Reinstall a server with a different OS image (erases all data)
list_networks List all private networks
create_network Create a new private network with an IP range
delete_network Delete a private network
list_volumes List all block storage volumes
create_volume Create a new volume (optionally attach to a server immediately)
attach_volume Attach an existing volume to a server
detach_volume Detach a volume from its current server
delete_volume Delete a block storage volume
list_firewalls List all firewalls
create_firewall Create a firewall with inbound/outbound rules
apply_firewall_to_server Apply a firewall to a server
delete_firewall Delete a firewall
list_ssh_keys List all SSH keys in the project
create_ssh_key Add a new SSH public key to the project
delete_ssh_key Remove an SSH key from the project
list_locations List all available datacenter locations
list_server_types List all server types with CPU, RAM, disk, and pricing
list_load_balancers List all load balancers with targets, services, and health status
get_load_balancer Get details of a specific load balancer including all targets and health checks
create_load_balancer Create a new load balancer (type, location, optional algorithm)
delete_load_balancer Delete a load balancer
add_load_balancer_target Add a server or label-selector target to a load balancer
list_snapshots List all server snapshots in the project
create_server_snapshot Create a snapshot of a server
delete_snapshot Delete a snapshot image
list_floating_ips List all floating (static) IP addresses
create_floating_ip Allocate a new floating IP address
assign_floating_ip Assign a floating IP to a server
unassign_floating_ip Remove a floating IP from its current server (IP remains allocated)
delete_floating_ip Release a floating IP address (frees the IP)

Configuration

Variable Required Description How to Get
HETZNER_API_TOKEN Yes Hetzner Cloud API Token Go to console.hetzner.cloud → select your Project → SecurityAPI TokensGenerate API Token. Choose Read & Write access.

Use a Read & Write token if you intend to create or modify resources. A Read token works for list/get operations only. Tokens are project-scoped — they can only access resources in the project they were created for.

Quick Start

Add to Aerostack Workspace
  1. Go to aerostack.dev → Your Project → MCPs
  2. Search for "Hetzner" and click Add to Workspace
  3. Add your HETZNER_API_TOKEN under Project → Secrets

Once added, every AI agent in your workspace can provision and manage Hetzner Cloud infrastructure automatically.

Example Prompts
"Create a cx21 server called web-01 in Nuremberg running Ubuntu 22.04 with my default SSH key"
"List all my Hetzner servers and show their IPs and current status"
"Reboot the server with ID 12345678"
"Create a 50 GB volume called postgres-data in fsn1 and attach it to server 12345678"
"Set up a firewall that allows SSH (port 22) and HTTPS (port 443) from anywhere, then apply it to server 12345678"
"What server types are available in Helsinki and what do they cost?"
"Rebuild server 12345678 with Debian 12"
"Create a private network 10.0.0.0/16 called internal-vpc"
Direct API Calls
# Ping / verify credentials
curl -X POST https://mcp.aerostack.dev/s/aerostack/mcp-hetzner \
  -H 'Content-Type: application/json' \
  -H 'X-Mcp-Secret-HETZNER-API-TOKEN: your-api-token' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"_ping","arguments":{}}}'

# List all servers
curl -X POST https://mcp.aerostack.dev/s/aerostack/mcp-hetzner \
  -H 'Content-Type: application/json' \
  -H 'X-Mcp-Secret-HETZNER-API-TOKEN: your-api-token' \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"list_servers","arguments":{}}}'

# Create a server
curl -X POST https://mcp.aerostack.dev/s/aerostack/mcp-hetzner \
  -H 'Content-Type: application/json' \
  -H 'X-Mcp-Secret-HETZNER-API-TOKEN: your-api-token' \
  -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"create_server","arguments":{"name":"web-01","server_type":"cx21","image":"ubuntu-22.04","location":"nbg1"}}}'

# List available server types
curl -X POST https://mcp.aerostack.dev/s/aerostack/mcp-hetzner \
  -H 'Content-Type: application/json' \
  -H 'X-Mcp-Secret-HETZNER-API-TOKEN: your-api-token' \
  -d '{"jsonrpc":"2.0","id":4,"method":"tools/call","params":{"name":"list_server_types","arguments":{}}}'

Technical Notes

  • Integer IDs. All Hetzner Cloud resources (servers, volumes, networks, firewalls, SSH keys) are identified by integer IDs. Pass them as numbers, not strings.
  • Async actions. Operations like reboot_server, power_on_server, power_off_server, rebuild_server, attach_volume, and detach_volume return an action object with id, status, and command fields. The status will be "running" while the operation is in progress and "success" once complete. Hetzner actions are typically fast (under 30 seconds).
  • Server types are strings. Pass the slug, e.g. "cx21", "cx31", "cpx11", "cpx21". Use list_server_types to discover all available options.
  • Images are strings. Pass the OS image name, e.g. "ubuntu-22.04", "debian-12", "centos-9", "fedora-41". You can also pass a snapshot ID as a number.
  • Locations are strings. Available locations: "nbg1" (Nuremberg, Germany), "fsn1" (Falkenstein, Germany), "hel1" (Helsinki, Finland), "ash" (Ashburn, Virginia, US), "hil" (Hillsboro, Oregon, US), "sin" (Singapore). Use list_locations for the authoritative list.
  • Firewall rules. Direction must be "in" or "out". Protocol must be "tcp", "udp", "icmp", or "esp". For icmp and esp, omit the port field. For tcp/udp, port can be a single port ("22") or a range ("8000-9000"). Use CIDR notation for source_ips and destination_ips (e.g. ["0.0.0.0/0", "::/0"] for all traffic).
  • All list endpoints return up to 50 resources per call.

License

MIT

terminal Tools (39)

Available tools on this MCP server. Each tool can be called directly from any AI agent.

terminal
_ping #1

Verify Hetzner Cloud credentials by calling a lightweight read endpoint. Used internally by Aerostack to validate credentials.

terminal
list_servers #2

List all Hetzner Cloud servers with their status, IP addresses, and server type

terminal
get_server #3

Get full details of a specific Hetzner Cloud server by ID

terminal
create_server #4

Create a new Hetzner Cloud server. server_type and image are strings (e.g. "cx21", "ubuntu-22.04"). location is a string (e.g. "nbg1", "fsn1", "hel1").

terminal
delete_server #5

Delete a Hetzner Cloud server. This is irreversible.

terminal
reboot_server #6

Reboot a Hetzner Cloud server. Returns an action object with status.

terminal
power_on_server #7

Power on a stopped Hetzner Cloud server. Returns an action object with status.

terminal
power_off_server #8

Power off a running Hetzner Cloud server (hard shutdown). Returns an action object with status.

terminal
rebuild_server #9

Rebuild a server with a different OS image. All data on the server will be erased. Returns an action object.

terminal
list_networks #10

List all private networks in the Hetzner Cloud project

terminal
create_network #11

Create a new private network in Hetzner Cloud

terminal
delete_network #12

Delete a private network. The network must have no attached servers.

terminal
list_volumes #13

List all block storage volumes in the Hetzner Cloud project

terminal
create_volume #14

Create a new block storage volume. Volumes can be attached to servers.

terminal
attach_volume #15

Attach an existing volume to a server. Returns an action object.

terminal
detach_volume #16

Detach a volume from its currently attached server. Returns an action object.

terminal
delete_volume #17

Delete a block storage volume. The volume must be detached first.

terminal
list_firewalls #18

List all firewalls in the Hetzner Cloud project

terminal
create_firewall #19

Create a new firewall with inbound/outbound rules

terminal
apply_firewall_to_server #20

Apply a firewall to one or more servers. Returns an array of action objects.

terminal
delete_firewall #21

Delete a firewall. The firewall must not be applied to any servers.

terminal
list_ssh_keys #22

List all SSH keys in the Hetzner Cloud project

terminal
create_ssh_key #23

Add a new SSH public key to the Hetzner Cloud project

terminal
delete_ssh_key #24

Delete an SSH key from the Hetzner Cloud project

terminal
list_locations #25

List all available Hetzner Cloud datacenter locations with their country and city

terminal
list_server_types #26

List all available Hetzner Cloud server types with their CPU count, RAM, disk, and pricing

terminal
list_load_balancers #27

List all Hetzner Load Balancers with targets, services, and health status

terminal
get_load_balancer #28

Get details of a specific load balancer including all targets and health checks

terminal
create_load_balancer #29

Create a new Hetzner Load Balancer

terminal
delete_load_balancer #30

Delete a load balancer

terminal
add_load_balancer_target #31

Add a server or label-selector target to a load balancer

terminal
list_snapshots #32

List all server snapshots in your Hetzner project

terminal
create_server_snapshot #33

Create a snapshot of a server (server must be powered off or running)

terminal
delete_snapshot #34

Delete a snapshot image

terminal
list_floating_ips #35

List all floating (static) IP addresses

terminal
create_floating_ip #36

Allocate a new floating IP address

terminal
assign_floating_ip #37

Assign a floating IP to a server

terminal
unassign_floating_ip #38

Remove a floating IP from its current server (IP remains allocated)

terminal
delete_floating_ip #39

Release a floating IP address (frees the IP)

Details

upgrade Version 0.1.0
gavel License MIT
wifi Transport streamable-http
lock Access Public
category Category API Connectors
terminal Tools 39

language Live Endpoint

https://mcp.aerostack.dev/s/aerostack/mcp-hetzner

Sub-50ms globally · Zero cold start

Publisher

aerostack
@aerostack verified

Pre-built functions for the most common MCP tool patterns. Clone, extend, and deploy.

Tags

Browse more servers

More in API Connectors

Browse API Connectors MCPs →

Frequently asked questions

What is the Hetzner MCP server and what can it do? +

The Hetzner MCP server is hosted on Aerostack and exposes these tools to your AI agent: `_ping`, `list_servers`, `get_server`, `create_server`, `delete_server`. You get one hosted URL — no self-hosting — that works from Claude, Cursor, ChatGPT, Gemini, VS Code, or any MCP-compatible client, and you can share it with your team or combine it with other MCP servers in a workspace.

Is the Hetzner MCP server hosted, or do I have to run it myself? +

It's hosted on Aerostack's edge infrastructure — you don't deploy or maintain anything. Add it to a workspace and you get one authenticated URL, with secrets encrypted, that any AI agent or editor can connect to. Use it solo or share the same URL across your whole team.

Which AI agents and editors can use the Hetzner MCP server? +

Any MCP client: Claude and Claude Code, Cursor, ChatGPT, Gemini, Windsurf, Cline, VS Code, and custom agents. Because it's one hosted URL, the same Hetzner MCP server works everywhere — and you can compose it with other MCP servers, skills, and functions behind a single workspace URL.

How do I install the Hetzner MCP server in Claude Desktop? +

Add the following to your Claude Desktop config (`claude_desktop_config.json`): ```json { "mcpServers": { "@aerostack/mcp-hetzner": { "command": "npx", "args": ["-y", "@aerostack/@aerostack/mcp-hetzner"] } } } ``` Then restart Claude Desktop and the tools will appear automatically.

How do I use the Hetzner MCP server in Cursor? +

In Cursor, open **Settings → MCP** and add: ```json { "name": "@aerostack/mcp-hetzner", "command": "npx", "args": ["-y", "@aerostack/@aerostack/mcp-hetzner"] } ``` Save and reload Cursor. The MCP tools will be available in Agent mode.

Does Hetzner MCP require authentication? +

Yes. Hetzner requires authentication. Check the MCP's documentation for the required credentials.