Cloud · MODEL CONTEXT PROTOCOL

dkruyt 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.

WHAT IT CONNECTS

dkruyt mcp hetzner 为 AI Agent 提供什么

  • List, create, and manage Hetzner Cloud servers
  • Create, attach, detach, and resize volumes
  • Manage firewall rules and apply them to servers
  • Create and manage SSH keys for secure server access
  • View available images, server types, and locations
  • Power on/off and reboot servers
  • Simple, structured API for language model interaction
  • Claude Code integration for managing Hetzner resources directly from Claude
  • Python 3.11+
  • Hetzner Cloud API token
  • Clone this repository:
  • Install dependencies:
  • Create a `.env` file and add your Hetzner Cloud API token:
  • `stdio` (default): Standard I/O transport, typically used with Claude Code
  • `sse`: Server-Sent Events transport, suitable for HTTP clients
  • Setting the `MCP_HOST` and `MCP_PORT` environment variables in your `.env` file
  • Using the `--port` command line argument (overrides the environment variable)
  • `list_servers`: List all servers in your Hetzner Cloud account
  • `get_server`: Get details about a specific server
  • `create_server`: Create a new server
  • `delete_server`: Delete a server
  • `power_on`: Power on a server
  • `power_off`: Power off a server
  • `reboot`: Reboot a server
  • `list_volumes`: List all volumes in your Hetzner Cloud account
  • `get_volume`: Get details about a specific volume
  • `create_volume`: Create a new volume
  • `delete_volume`: Delete a volume
  • `attach_volume`: Attach a volume to a server
  • `detach_volume`: Detach a volume from a server
  • `resize_volume`: Increase the size of a volume
  • `list_firewalls`: List all firewalls in your Hetzner Cloud account
  • `get_firewall`: Get details about a specific firewall
  • `create_firewall`: Create a new firewall
  • `update_firewall`: Update firewall name or labels
  • `delete_firewall`: Delete a firewall
  • `set_firewall_rules`: Set or update firewall rules
  • `apply_firewall_to_resources`: Apply a firewall to servers or server groups
  • `remove_firewall_from_resources`: Remove a firewall from servers or server groups
  • `list_ssh_keys`: List all SSH keys in your Hetzner Cloud account
  • `get_ssh_key`: Get details about a specific SSH key
  • `create_ssh_key`: Create a new SSH key
  • `update_ssh_key`: Update SSH key name or labels
  • `delete_ssh_key`: Delete an SSH key
  • `list_images`: List available OS images
  • `list_server_types`: List available server types
  • `list_locations`: List available datacenter locations

SECURITY

MCP 收录不等于安全审核

MCP 服务器可能获得模型上下文、凭据、本地文件或调用外部系统的权限。连接 Agent 前,请检查代码、环境变量、网络行为、软件包来源与维护状态。