Hetzner Cloud (unofficial)

v0.2.0
io.github.mguttmann/the-real-hetzner-mcp Checked 15 hours ago Published 1 month ago

Unofficial MCP server for the Hetzner Cloud API: one typed tool per operation, read and write.

Values you need

VariableWhat it is
HETZNER_API_TOKENrequired secret Hetzner Cloud API token from the Cloud Console (project > Security > API tokens). The server can do exactly what this token allows; use a Read token if the client only needs to read.
HETZNER_READ_ONLYoptional true: every tool that is not read-only, and hcloud_raw_request with a method other than GET, returns an error without sending a request. Any value other than true, 1, yes, false, 0, no or empty stops the server at startup. Default: false
HETZNER_CONFIRM_WRITESoptional true: every tool that is not read-only returns a preview unless the call carries confirm "YES". Friction against mistakes, not a security boundary. Default: false
HETZNER_DENY_TOOLSoptional Comma-separated tool name globs (for example hcloud_delete_*,hcloud_raw_request) that always return an error. Deny hcloud_raw_request as well, otherwise denied endpoints stay reachable through it. A pattern that matches no tool stops the server at startup.
LOG_LEVELoptional Log level of the JSON logs on stderr. Default: warn

npm (npx) discovery passed

Requires Node.js 18+

Run in a terminal
claude mcp add the-real-hetzner-mcp -e 'HETZNER_API_TOKEN=<HETZNER_API_TOKEN>' -- npx -y @mguttmann/hetzner-cloud-mcp@0.2.0
Add to claude_desktop_config.json
{
  "mcpServers": {
    "the-real-hetzner-mcp": {
      "args": [
        "-y",
        "@mguttmann/hetzner-cloud-mcp@0.2.0"
      ],
      "command": "npx",
      "env": {
        "HETZNER_API_TOKEN": "<HETZNER_API_TOKEN>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "the-real-hetzner-mcp": {
      "args": [
        "-y",
        "@mguttmann/hetzner-cloud-mcp@0.2.0"
      ],
      "command": "npx",
      "env": {
        "HETZNER_API_TOKEN": "<HETZNER_API_TOKEN>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "HETZNER_API_TOKEN",
      "id": "hetzner-api-token",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "the-real-hetzner-mcp": {
      "args": [
        "-y",
        "@mguttmann/hetzner-cloud-mcp@0.2.0"
      ],
      "command": "npx",
      "env": {
        "HETZNER_API_TOKEN": "${input:hetzner-api-token}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.the-real-hetzner-mcp]
command = "npx"
args = ["-y", "@mguttmann/hetzner-cloud-mcp@0.2.0"]
env = { "HETZNER_API_TOKEN" = "<HETZNER_API_TOKEN>" }

For AI agents

  1. Ask the user for: HETZNER_API_TOKEN. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: hcloud_apply_firewall_to_server, hcloud_certificate_retry_action, hcloud_create_certificate, hcloud_create_firewall, hcloud_create_floating_ip, hcloud_create_load_balancer, hcloud_create_network, hcloud_create_placement_group, ….
  5. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json