Purpose: mcp-hetzner is a Model Context Protocol (MCP) server for the Hetzner Cloud API, with the goal of letting language models manage Hetzner Cloud resources through structured functions.
Main capabilities:
- Server management: list, create, and delete servers, view server details, power on, power off, and reboot.
- Volume management: list, create, and delete volumes, view volume details, attach and detach volumes, and resize volumes.
- Firewall management: list, create, update, and delete firewalls, set or update firewall rules, apply firewalls to servers or server groups, and remove firewalls from servers or server groups.
- SSH key management: list, create, update, and delete SSH keys, and view key details.
- Resource information queries: list available operating system images, server types, and locations.
- Provides a simple, structured API for language model interaction.
- Supports Claude Code integration, allowing Hetzner resources to be managed directly from Claude.
Usage:
- Prerequisite: a Hetzner Cloud API Token is required.
- Installation method one (direct installation): clone the repository, install dependencies, create a .env file and add the Hetzner Cloud API Token.
- Installation method two (install as a package): after installing as a package, create a .env file in the working directory and write the Hetzner Cloud API Token into it.
- Starting the server: run the installed package, or run it as a module.
- Transport modes: supports stdio (default, typically used for Claude Code) and sse (Server-Sent Events, suitable for HTTP clients).
- Runs on localhost:8080 by default; the host and port can be customized via the MCP_HOST and MCP_PORT environment variables in .env, and the --port command-line argument can also be used (overriding the environment variables).
- When used with Claude Code, run the server in SSE transport mode.
- The project includes a test client that can be used to verify server functionality.
Applicable scenarios:
- Managing Hetzner Cloud servers, volumes, firewalls, and SSH keys through language models or Claude Code.
- Infrastructure planning, for examplequerying available images, server types, and locations.
- Integration scenarios that require letting models call the Hetzner Cloud API in the form of structured functions.
Limitations: the materials do not provide specific dependency versions, complete installation commands, code examples, pricing or cost information, or performance and security notes; this content is not yet available.