hetzner-mcp
Manages Caddy reverse-proxy routes on registered hosts, with fenced edits, backups, validation, rollback, and reload.
Manages Cloudflare DNS zones and records, including listing zones, setting and deleting records, and checking DNS configuration.
Inspects and controls Docker workloads on managed hosts, including listing containers, viewing logs, and running Docker Compose actions.
Manages Hetzner Cloud and DNS resources, including servers, snapshots, firewalls, volumes, networks, floating IPs, SSH keys, and DNS records.
Click on "Deploy 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-mcprebuild srv-web-1 with the latest Ubuntu image"
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
An MCP server that lets Claude operate a Hetzner estate: Cloud servers, DNS (Cloudflare and Hetzner DNS), hosts over SSH, Coolify, and multi-step recipes. Every write is a dry run until confirmed, protected servers refuse destructive calls, and every call is audited.
Status: v0.1.0. Built and tested against mocked APIs, a real SSH host, real Docker and a real Caddy. Not yet pointed at a live Hetzner project.
Modules and tools (53 with everything configured)
Module | Switched on by | Tools |
fleet | always |
|
cloud |
|
|
dns |
|
|
host |
|
|
coolify |
|
|
recipes | SSH key (+ |
|
audit | always |
|
hz_capabilities is always present and says which modules are on and what each one needs.
Related MCP server: hetzner-mcp-server
Safety model
Dry run by default. Write tools return a plan unless called with
confirm: true. Delete and rebuild also needconfirm_nameequal to the server name.Protected resources. A server is protected when it is in
PROTECTED_SERVERS, has the Hetzner labelprotected=true, is markedprotectedin the host registry, or has Hetzner delete/rebuild protection on. Destructive calls on it are refused even withconfirm: true.Host registry. SSH only reaches hosts listed in
config/hosts.json. File reads and writes stay inside each host'sallowed_paths..envfiles return their keys, never values.Audit log. Every call (read, dry run, refused, executed) is appended to
data/audit.jsonlwith secrets masked.Caddy edits are fenced with markers, backed up, validated and rolled back on failure before a reload.
Stack
Node 22, TypeScript (strict), @modelcontextprotocol/sdk, zod, ssh2, Express (Streamable HTTP), Biome, Vitest, pnpm, Docker.
Quickstart (local, stdio)
pnpm install
cp .env.example .env # fill in what you have
cp config/hosts.example.json config/hosts.json
pnpm buildClaude Desktop / Claude Code config:
{
"mcpServers": {
"hetzner": {
"command": "node",
"args": ["C:\\path\\to\\hetzner-mcp\\dist\\index.js"],
"env": { "HCLOUD_TOKEN": "…", "SSH_KEY_PATH": "C:\\Users\\you\\.ssh\\hetzner_mcp_ed25519", "HOSTS_FILE": "C:\\path\\to\\hetzner-mcp\\config\\hosts.json" }
}
}
}Hosted (HTTP, behind Caddy on the app server): see docs/RUNBOOK.md.
CI checks
pnpm typecheck && pnpm lint && pnpm testCI runs the same three plus pnpm build and a gitleaks secret scan.
Growing it
Add a folder under src/modules/<id>/ exporting a Module (status() + register()), register tools through the ToolKit (t.read / t.write), and list it in src/modules/index.ts. The guard, audit and capability report come for free. See docs/CONTRIBUTING.md.
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
- emisarOAuthdev.emisar
Let AI operate servers without SSH. Choose actions, approve risky changes, and audit every step.
Work on your own computers from Claude or ChatGPT: run commands, edit and search files.
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Provides capabilities that let LLM agents perform a range of infrastructure management tasks.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables conversational management of Hetzner Cloud, DNS, and Storage Box infrastructure through 137 MCP tools for CRUD operations and actions like server power control, DNS zone management, and storage box snapshots.100MIT
- AlicenseAqualityDmaintenanceEnables Claude Code to manage Hetzner Cloud servers, including creating, deleting, powering on/off, and rebooting servers, as well as managing SSH keys and listing resources.1410 npm1MIT
- AlicenseBqualityDmaintenanceEnables agentic administration of Infomaniak accounts via Claude, offering 169 tools for web hosting, mail, domains, DNS, and more, with a strict two-phase commit for safe mutations.1001 npmMIT
- AlicenseAqualityBmaintenanceEnables infrastructure operations through Claude Code by exposing 195 tools across 7 providers including Coolify, VPS, Hetzner, Namecheap, Cloudflare, Supabase, and GitHub for server management, DNS, cloud resources, and more.93MIT