mcp-hetzner
A Model Context Protocol (MCP) server for interacting with the Hetzner Cloud API. This server allows language models to manage Hetzner Cloud resources through structured functions.
claude mcp add --transport stdio dkruyt-mcp-hetzner python -m mcp_hetzner \ --env MCP_HOST="localhost or desired host" \ --env MCP_PORT="8080 or desired port" \ --env HCLOUD_TOKEN="Hetzner Cloud API token"
How to use
This MCP server provides a structured interface for managing Hetzner Cloud resources via a model-enabled API. It exposes functions for server lifecycle management, volumes, firewalls, SSH keys, and information about available images, server types, and locations. The server supports two transport modes: stdio (default) suitable for Claude Code integrations, and SSE (server-sent events) for HTTP clients. Run the server with the installed package or as a module, and connect your client (or Claude Code) to the MCP endpoint to issue function calls like list_servers, create_server, or attach_volume. The server handles authentication with the Hetzner Cloud API using your HCLOUD_TOKEN and exposes a clear set of operations that can be orchestrated from natural language prompts.
How to install
Prerequisites:\n- Python 3.11+\n- Hetzner Cloud API token (HCLOUD_TOKEN) with appropriate permissions\n\nMethod 1: Direct Installation\n1. Clone the repository:\nbash\ngit clone https://github.com/dkruyt/mcp-hetzner.git\ncd mcp-hetzner\n\n2. Install dependencies:\nbash\npip install -e .\n\n3. Create a .env file and add your Hetzner Cloud API token:\nbash\nHCLOUD_TOKEN=your_hetzner_cloud_api_token_here\n\n\nMethod 2: Install as a Package\nbash\n# Install directly from the repository\npip install git+https://github.com/dkruyt/mcp-hetzner.git\n\nAfter installing as a package, create a .env file in your working directory with your Hetzner Cloud API token.\n\nRunning the server:\n- Start a local server using the installed package or module:\nbash\n# Using the installed package (stdio by default)\nmcp-hetzner\n\n# Or using SSE transport with explicit port (example)\nmcp-hetzner --transport sse --port 8080\n\n# Or as a module (from source checkout)\npython -m mcp_hetzner\n# or\npython -m mcp_hetzner.server\n
Additional notes
Tips and common considerations:\n- Ensure HCLOUD_TOKEN is kept secure and has the least-privilege scope required for your workflows.\n- You can adjust host/port via MCP_HOST, MCP_PORT or by CLI flags when starting the server.\n- Claude Code integration is supported via SSE transport; this allows Claude to issue MCP calls over HTTP.\n- The repository includes example workflows and a test client for quick verification (python -m mcp_hetzner.client).\n- If you encounter authentication or API errors, verify your token permissions and network access to Hetzner Cloud.\n- When using volumes and firewalls, ensure correct resource IDs are referenced and that your token has permissions for those resources.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP