Hetzner Cloud MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add -e "HCLOUD_TOKEN=${HCLOUD_TOKEN}" hcloud-mcp -- npx hcloud-mcp
Required:HCLOUD_TOKEN
README.md

A Model Context Protocol server for the Hetzner Cloud API

HCloud MCP

Standalone MCP (Model Context Protocol) server for the Hetzner Cloud API. Use it with any MCP client: Cursor, Claude Desktop, CLI tools, smithery.ai, or custom agents.


Requirements

  • Node.js 18+
  • A Hetzner Cloud API token. Generate one in the console (project → Security → API Tokens). Set it as HCLOUD_TOKEN in the environment or in your MCP client config.

Installation

From npm (recommended)

npm install -g hcloud-mcp

Or use npx to run without a global install.

From source

git clone https://github.com/Xodus-CO/hcloud-mcp
cd hcloud-mcp
npm install
npm run build

Configuration

Add the server to your MCP client config. It uses MCP over stdio and requires HCLOUD_TOKEN in the environment.

Examplemcp.json (or your client’s equivalent) using the npm binary:

{
  "mcpServers": {
    "hetzner-cloud": {
      "command": "npx",
      "args": ["hcloud-mcp"],
      "env": {
        "HCLOUD_TOKEN": "your_hetzner_cloud_api_token"
      }
    }
  }
}

If you installed from source, use an absolute path to run.js in args so the server runs from the project directory (e.g. when the MCP client’s CWD is different, as in dev containers):

"command": "node",
"args": ["/path/to/hcloud-mcp/run.js"]

Replace /path/to/hcloud-mcp with your actual project path (e.g. /home/<username>/hcloud-mcp).

Tools

The server exposes Hetzner Cloud API operations as MCP tools:

Area Tools
Servers list_servers, get_server, create_server, delete_server, update_server, change_server_type; power: power_on_server, power_off_server, reboot_server, shutdown_server, reset_server; attach_iso, detach_iso; attach_server_to_network, detach_server_from_network
Load Balancers list_load_balancers, get_load_balancer, create_load_balancer, update_load_balancer, delete_load_balancer; add_load_balancer_target, remove_load_balancer_target; add_load_balancer_service, update_load_balancer_service, delete_load_balancer_service; list_load_balancer_types
Networks list_networks, get_network, create_network, update_network, delete_network; add_network_subnet, delete_network_subnet
Volumes list_volumes, get_volume, create_volume, update_volume, delete_volume; attach_volume, detach_volume
Firewalls list_firewalls, get_firewall, create_firewall, update_firewall, delete_firewall; apply_firewall_to_resources, remove_firewall_from_resources, set_firewall_rules
Floating IPs list_floating_ips, create_floating_ip, update_floating_ip, delete_floating_ip; assign_floating_ip, unassign_floating_ip
Primary IPs list_primary_ips, create_primary_ip, get_primary_ip, update_primary_ip, delete_primary_ip; assign_primary_ip, unassign_primary_ip (server must be off)
SSH Keys list_ssh_keys, create_ssh_key, update_ssh_key, delete_ssh_key

Tools (8)

list_serversList all servers in the Hetzner Cloud project.
create_serverCreate a new server instance.
delete_serverDelete an existing server instance.
power_on_serverPower on a specific server.
list_load_balancersList all load balancers.
list_networksList all virtual networks.
list_volumesList all block storage volumes.
list_firewallsList all configured firewalls.

Environment Variables

HCLOUD_TOKENrequiredThe API token generated from the Hetzner Cloud console.

Configuration

claude_desktop_config.json
{"mcpServers": {"hetzner-cloud": {"command": "npx", "args": ["hcloud-mcp"], "env": {"HCLOUD_TOKEN": "your_hetzner_cloud_api_token"}}}}

Try it

List all my currently running servers and their status.
Create a new server with the name 'web-prod-01' using the latest Ubuntu image.
Power off the server named 'dev-environment' to save costs.
List all my existing firewalls and check if port 80 is open.
Attach a new volume to my database server.

Frequently Asked Questions

What are the key features of Hetzner Cloud?

Manage server lifecycle including power states and reboots. Configure load balancers and network subnets. Manage block storage volumes and attach them to servers. Control firewall rules and security policies. Manage SSH keys for secure server access.

What can I use Hetzner Cloud for?

Automating infrastructure provisioning via natural language prompts. Quickly checking the status of cloud resources during development. Performing emergency power cycles or reboots on cloud instances. Managing network and firewall configurations without manual console navigation.

How do I install Hetzner Cloud?

Install Hetzner Cloud by running: npm install -g hcloud-mcp

What MCP clients work with Hetzner Cloud?

Hetzner Cloud works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Hetzner Cloud docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare