Hetzner Cloud MCP Server

by dkruyt

40 stars
447 downloads
Not rated
GitHub

About

Integrates with Hetzner Cloud API to enable management of cloud infrastructure resources including servers, volumes, firewalls, and SSH keys for automated provisioning and infrastructure-as-code scenarios.

Details

Author
dkruyt
Repository
dkruyt/mcp-hetzner
GitHub stars
40
Downloads
447
License
MIT License
Categories
Other, Developer Tools, AI, Automation, API, Cloud Service

- 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

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Hetzner Cloud MCP Server
    Command (node, npx, python, etc.) npx
    Arguments
    • Argument 1 -y
    • Argument 2 @highlight/mcp-server

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

1. Clone this repository:

git clone https://github.com/dkruyt/mcp-hetzner.git
cd mcp-hetzner

2. Install dependencies:

pip install -e .

3. Create a .env file and add your Hetzner Cloud API token:

HCLOUD_TOKEN=your_hetzner_cloud_api_token_here

pip install git+https://github.com/dkruyt/mcp-hetzner.git

After installing as a package, create a .env file in your working directory with your Hetzner Cloud API token.

list_servers

List all servers in your Hetzner Cloud account.

get_server

Get details about a specific server.

create_server

Create a new server with parameters: name (string), server_type (string), image (string), ssh_keys (optional array of integers).

delete_server

Delete a server with parameter: server_id (integer).

power_on

Power on a server with parameter: server_id (integer).

power_off

Power off a server with parameter: server_id (integer).

reboot

Reboot a server with parameter: server_id (integer).

list_volumes

List all volumes in your Hetzner Cloud account.

get_volume

Get details about a specific volume.

create_volume

Create a new volume with parameters: name (string), size (integer), location (string), format (string).

delete_volume

Delete a volume with parameter: volume_id (integer).

attach_volume

Attach a volume to a server with parameters: volume_id (integer), server_id (integer), automount (boolean).

detach_volume

Detach a volume from a server with parameter: volume_id (integer).

resize_volume

Increase the size of a volume with parameters: volume_id (integer), size (integer).

list_firewalls

List all firewalls in your Hetzner Cloud account.

get_firewall

Get details about a specific firewall.

create_firewall

Create a new firewall with parameters: name (string), rules (array of objects).

update_firewall

Update firewall name or labels with parameters: firewall_id (integer), name (string).

delete_firewall

Delete a firewall with parameter: firewall_id (integer).

set_firewall_rules

Set or update firewall rules with parameters: firewall_id (integer), rules (array of objects).

apply_firewall_to_resources

Apply a firewall to servers or server groups with parameters: firewall_id (integer), resources (array of objects).

remove_firewall_from_resources

Remove a firewall from servers or server groups with parameter: firewall_id (integer).

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 with parameters: name (string), public_key (string).

update_ssh_key

Update SSH key name or labels with parameters: ssh_key_id (integer), name (string).

delete_ssh_key

Delete an SSH key with parameter: ssh_key_id (integer).

list_images

List available OS images.

list_server_types

List available server types.

list_locations

List available datacenter locations.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "hetzner cloud mcp server": {
            "env": {},
            "args": [
                "-y",
                "@highlight/mcp-server"
            ],
            "command": "npx"
        }
    }
}

Linux

{
    "env": [],
    "args": [
        "-y",
        "@highlight/mcp-server"
    ],
    "command": "npx"
}

Macos

{
    "env": [],
    "args": [
        "-y",
        "@highlight/mcp-server"
    ],
    "command": "npx"
}

Windows

{
    "env": [],
    "args": [
        "/c",
        "npx",
        "-y",
        "@highlight/mcp-server"
    ],
    "command": "cmd"
}

Hetzner Cloud MCP Server

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.

MCP Hetzner Demo

Features

- 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

Requirements

- Python 3.11+
- Hetzner Cloud API token

Installation

Method 1: Direct Installation

1. Clone this repository:

git clone https://github.com/dkruyt/mcp-hetzner.git
cd mcp-hetzner

2. Install dependencies:

pip install -e .

3. Create a .env file and add your Hetzner Cloud API token:

HCLOUD_TOKEN=your_hetzner_cloud_api_token_here

Method 2: Install as a Package

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.