hetzner — Claude Code MCP server: features and setup
Connect an MCP client to Hetzner Cloud to work with servers, networks, storage, DNS, and load balancers. Write actions can create billable resources.
claude mcp add hetzner -e HETZNER_API_TOKEN=<HETZNER_API_TOKEN> -e HETZNER_STORAGE_API_TOKEN=<HETZNER_STORAGE_API_TOKEN> -- npx -y @lazyants/hetzner-mcp-serverWhat hetzner does
The server gives an MCP client access to Hetzner Cloud resources, including servers, networks, volumes, DNS, and load balancers. The standard command exposes the full tool set; split commands let you launch a resource group such as hetzner-mcp-networking on its own.
You need Node.js 22.12 or newer and a Hetzner Cloud API token. A read-only token can inspect resources, while write operations can create charges, so review the agent's proposed actions before allowing changes. Storage Box tools accept a separate HETZNER_STORAGE_API_TOKEN; otherwise, they use HETZNER_API_TOKEN. Each server provides an API reference at reference://hetzner/api.
What it helps with
- inspect Hetzner Cloud resources from an MCP client
- manage cloud servers and networks through an agent
- check DNS and load balancer resources
- launch only a selected resource group of tools
Example prompts for the agent
- List the servers and networks in my Hetzner Cloud account.
- Check the DNS records and load balancers in Hetzner.
- Show me the Storage Box resources available to this account.
How to install hetzner
Platform CLI
claude mcp add hetzner -e HETZNER_API_TOKEN=<HETZNER_API_TOKEN> -e HETZNER_STORAGE_API_TOKEN=<HETZNER_STORAGE_API_TOKEN> -- npx -y @lazyants/hetzner-mcp-serverReplace <…> with your own values
Platform CLI
codex mcp add hetzner --env HETZNER_API_TOKEN=<HETZNER_API_TOKEN> --env HETZNER_STORAGE_API_TOKEN=<HETZNER_STORAGE_API_TOKEN> -- npx -y @lazyants/hetzner-mcp-serverReplace <…> with your own values
Config file
{
"mcpServers": {
"hetzner": {
"command": "npx",
"args": [
"-y",
"@lazyants/hetzner-mcp-server"
],
"env": {
"HETZNER_API_TOKEN": "<HETZNER_API_TOKEN>",
"HETZNER_STORAGE_API_TOKEN": "<HETZNER_STORAGE_API_TOKEN>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"hetzner": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@lazyants/hetzner-mcp-server"
],
"env": {
"HETZNER_API_TOKEN": "<HETZNER_API_TOKEN>",
"HETZNER_STORAGE_API_TOKEN": "<HETZNER_STORAGE_API_TOKEN>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e HETZNER_API_TOKEN=<HETZNER_API_TOKEN> -e HETZNER_STORAGE_API_TOKEN=<HETZNER_STORAGE_API_TOKEN> hetzner npx -y @lazyants/hetzner-mcp-serverReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about hetzner
How do I install hetzner in Claude Code?
Run `claude mcp add hetzner -e HETZNER_API_TOKEN=<HETZNER_API_TOKEN> -e HETZNER_STORAGE_API_TOKEN=<HETZNER_STORAGE_API_TOKEN> -- npx -y @lazyants/hetzner-mcp-server`. The server requires Node.js 22.12 or newer.
What does hetzner do?
It connects an MCP client to Hetzner Cloud so an agent can work with servers, networks, volumes, DNS, and load balancers.
Does Storage Box need its own token?
You can set HETZNER_STORAGE_API_TOKEN for Storage Box tools. If you do not, they use HETZNER_API_TOKEN.