Hetzner MCP Server
Provides tools to manage Hetzner Cloud resources: servers, SSH keys, Cloud Volumes, Storage Boxes, and live metrics. Allows creating, listing, deleting, and modifying servers, volumes, storage boxes, etc.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Hetzner MCP ServerShow me all running servers"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Hetzner MCP Server
An MCP server that gives Claude Code 40 tools to manage Hetzner Cloud — servers, SSH keys, Cloud Volumes, Storage Boxes, and live metrics.
Quick Start
npm install -g @jurislm/hetzner-mcpAdd to your Claude Code MCP config (usually ~/.claude.json — run /mcp to confirm the location):
{
"mcpServers": {
"hetzner": {
"type": "stdio",
"command": "npx",
"args": ["@jurislm/hetzner-mcp"],
"env": {
"HETZNER_API_TOKEN": "your-api-token-here"
}
}
}
}Restart Claude Code. Done.
Related MCP server: Hetzner Cloud MCP Server — Cloud API + SSH management (60 tools)
Environment Variables
Variable | Required | Description |
| ✅ | Cloud API token — Read & Write. Generate at console.hetzner.cloud → project → Security → API Tokens. |
| Storage Boxes only | Unified API token for Storage Box tools. Generate at console.hetzner.com/account/security/api-tokens. Falls back to |
Why two tokens?
Storage Box tools call api.hetzner.com/v1 (unified API), while all other tools call api.hetzner.cloud/v1 (Cloud API). The two endpoints use different token namespaces. If you want the simplest setup, generate a single unified token from console.hetzner.com and use it for both variables.
Available Tools (40 total)
⚠️ marks destructive or hard-to-reverse operations.
Servers (7)
Tool | Description | ⚠️ |
| List all servers — status, IPs, specs, location | |
| Get full details for one server | |
| Create a new server (billed immediately) | |
| Permanently delete a server and all its data | ⚠️ |
| Power on a stopped server | |
| Hard power off (equivalent to pulling the power cord) | ⚠️ |
| Hard reboot (equivalent to pressing the reset button) | ⚠️ |
SSH Keys (4)
Tool | Description | ⚠️ |
| List all SSH keys in the project | |
| Get details for one SSH key | |
| Add a new SSH public key | |
| Remove an SSH key | ⚠️ |
Reference (3)
Tool | Description |
| Available server sizes with CPU, RAM, disk, and pricing |
| Available OS images |
| Available datacenters and their locations |
Cloud Volumes (4)
Tool | Description | ⚠️ |
| List all volumes — size, mount path, attached server | |
| Get details for one volume | |
| Attach a volume to a server | ⚠️ |
| Detach a volume from its server | ⚠️ |
Server Metrics (1)
Tool | Description |
| CPU, disk I/O, and network metrics — defaults to the last 5 minutes |
Server RAM via SSH (1)
Tool | Description |
| SSH into the server and run |
Prerequisites for hetzner_get_server_ram: the server's public IPv4 must be reachable and the SSH private key must be available in the system SSH agent or ~/.ssh/.
Storage Boxes (20) — requires HETZNER_API_TOKEN_UNIFIED
Core
Tool | Description | ⚠️ |
| List all Storage Boxes (auto-paginates) | |
| Get details for one Storage Box | |
| Create a new Storage Box (billed immediately) | |
| Update name or labels | |
| Permanently delete a Storage Box | ⚠️ |
| Upgrade or downgrade the Storage Box plan | ⚠️ |
| Enable or disable delete protection | |
| Reset the Storage Box password | ⚠️ |
| Configure SSH / Samba / WebDAV / ZFS / external access |
Folders
Tool | Description |
| List folders inside a Storage Box |
Subaccounts
Tool | Description | ⚠️ |
| List subaccounts (auto-paginates) | |
| Create a subaccount with scoped access | |
| Update subaccount settings | |
| Delete a subaccount | ⚠️ |
Snapshots
Tool | Description | ⚠️ |
| List snapshots (auto-paginates) | |
| Trigger an on-demand snapshot | |
| Delete a snapshot | ⚠️ |
| Roll back to a snapshot — overwrites current data | ⚠️ |
| Enable automatic scheduled snapshots | |
| Disable automatic scheduled snapshots |
Capabilities and Limitations
This MCP can:
Create, manage, and monitor servers
Manage SSH keys, Cloud Volumes, and Storage Boxes
Report CPU, disk I/O, network, and RAM usage
This MCP cannot:
Create Hetzner projects (do that in the web console)
Manage billing, firewalls, load balancers, floating IPs, or networks
See resources outside the project whose token you provide
⚠️ Creating servers costs real money. Hetzner bills by the hour — a
cx22runs€0.006/hr (€4/mo), acx52runs€0.119/hr (€86/mo). Always delete servers you are not using.
Troubleshooting
HETZNER_API_TOKEN environment variable is required — token is missing from the MCP config env block. Restart Claude Code after adding it.
401 Unauthorized on Storage Box tools — you need a unified token from console.hetzner.com/account/security/api-tokens, not a Cloud project token. Set it as HETZNER_API_TOKEN_UNIFIED.
hetzner_get_server_ram connection error — check that the server is running, port 22 is reachable, and ssh_user (default root) has SSH access via a key loaded in the agent.
Development
bun install
bun run build # compile TypeScript to dist/
bun run dev # watch mode
bun run test # vitest
bun run typecheck # tsc --noEmit
bun run lint # eslint --max-warnings=0To test locally without publishing:
HETZNER_API_TOKEN="your-token" bun dist/index.jsLicense
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/terry90918/hetzner-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server