Skip to main content
Glama
dkruyt

Hetzner Cloud MCP Server

by dkruyt

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MCP_HOSTNoHost for the MCP server
MCP_PORTNoPort for the MCP server
HCLOUD_TOKENYesYour Hetzner Cloud API token

Capabilities

Server capabilities have not been inspected yet.

Tools

Functions exposed to the LLM to take actions

NameDescription
list_serversB
List all servers in your Hetzner Cloud account.

Returns a list of all server instances with their details.

Example:
- Basic list: list_servers()
get_serverB
Get details about a specific server.

Returns detailed information about a server identified by its ID.

Example:
- Get server details: {"server_id": 12345}
create_serverC
Create a new server.

Creates a new server with the specified configuration.

Examples:
- Basic server: {"name": "web-server", "server_type": "cx11", "image": "ubuntu-22.04"}
- With SSH keys: {"name": "app-server", "server_type": "cx21", "image": "debian-11", "ssh_keys": [123, 456]}
- Custom location: {"name": "db-server", "server_type": "cx31", "image": "ubuntu-22.04", "location": "fsn1"}
delete_serverC
Delete a server.

Permanently deletes a server identified by its ID.

Example:
- Delete server: {"server_id": 12345}
list_imagesB
List available images.

Returns a list of all available OS images that can be used to create servers.

Example:
- List images: list_images()
list_server_typesB
List available server types.

Returns information about all available server configurations.

Example:
- List server types: list_server_types()
list_locationsB
List available locations.

Returns information about all available datacenter locations.

Example:
- List locations: list_locations()
power_onB
Power on a server.

Powers on a server that is currently powered off.

Example:
- Power on server: {"server_id": 12345}
power_offA
Power off a server.

Powers off a server. Note: This is equivalent to pulling the power plug and may cause data loss.
Consider using a graceful shutdown if possible.

Example:
- Power off server: {"server_id": 12345}
rebootA
Reboot a server.

Performs a soft reboot (graceful shutdown and restart) of the server.

Example:
- Reboot server: {"server_id": 12345}
list_firewallsB
List all firewalls in your Hetzner Cloud account.

Returns a list of all firewall instances with their details.

Example:
- Basic list: list_firewalls()
get_firewallB
Get details about a specific firewall.

Returns detailed information about a firewall identified by its ID.

Example:
- Get firewall details: {"firewall_id": 12345}
create_firewallC
Create a new firewall.

Creates a new firewall with the specified name, rules, and resources.

Examples:
- Basic firewall: {"name": "web-firewall"}
- With rules: {"name": "web-firewall", "rules": [{"direction": "in", "protocol": "tcp", "port": "80", "source_ips": ["0.0.0.0/0"]}]}
- With resources: {"name": "web-firewall", "rules": [...], "resources": [{"type": "server", "server_id": 123}]}
update_firewallB
Update a firewall.

Updates the name or labels of an existing firewall.

Example:
- Update name: {"firewall_id": 12345, "name": "new-name"}
- Update labels: {"firewall_id": 12345, "labels": {"key": "value"}}
delete_firewallC
Delete a firewall.

Permanently deletes a firewall identified by its ID.

Example:
- Delete firewall: {"firewall_id": 12345}
set_firewall_rulesA
Set rules for a firewall.

Sets the rules of a firewall. All existing rules will be overwritten.
Pass an empty rules array to remove all rules.

Example:
- Set rules: {"firewall_id": 12345, "rules": [{"direction": "in", "protocol": "tcp", "port": "80", "source_ips": ["0.0.0.0/0"]}]}
apply_firewall_to_resourcesB
Apply a firewall to resources.

Applies a firewall to multiple resources like servers or server groups by label.

Examples:
- Apply to server: {"firewall_id": 12345, "resources": [{"type": "server", "server_id": 123}]}
- Apply by label: {"firewall_id": 12345, "resources": [{"type": "label_selector", "label_selector": "env=prod"}]}
remove_firewall_from_resourcesC
Remove a firewall from resources.

Removes a firewall from multiple resources.

Examples:
- Remove from server: {"firewall_id": 12345, "resources": [{"type": "server", "server_id": 123}]}
- Remove by label: {"firewall_id": 12345, "resources": [{"type": "label_selector", "label_selector": "env=prod"}]}
list_volumesB
List all volumes in your Hetzner Cloud account.

Returns a list of all volume instances with their details.

Example:
- Basic list: list_volumes()
get_volumeC
Get details about a specific volume.

Returns detailed information about a volume identified by its ID.

Example:
- Get volume details: {"volume_id": 12345}
create_volumeB
Create a new volume.

Creates a new volume with the specified configuration.

Examples:
- Basic volume: {"name": "data-volume", "size": 10}
- With location: {"name": "db-volume", "size": 100, "location": "fsn1"}
- Attached to server: {"name": "app-volume", "size": 50, "server": 123456, "automount": true}
- With format: {"name": "log-volume", "size": 20, "format": "ext4"}
delete_volumeC
Delete a volume.

Permanently deletes a volume identified by its ID.

Example:
- Delete volume: {"volume_id": 12345}
attach_volumeC
Attach a volume to a server.

Attaches a volume to a server and optionally mounts it.

Example:
- Attach volume: {"volume_id": 12345, "server_id": 67890}
- Attach and mount: {"volume_id": 12345, "server_id": 67890, "automount": true}
detach_volumeC
Detach a volume from a server.

Detaches a volume from the server it's currently attached to.

Example:
- Detach volume: {"volume_id": 12345}
resize_volumeC
Resize a volume.

Increases the size of a volume (size can only be increased, not decreased).

Example:
- Resize volume: {"volume_id": 12345, "size": 100}
list_ssh_keysB
List all SSH keys in your Hetzner Cloud account.

Returns a list of all SSH key instances with their details.

Example:
- Basic list: list_ssh_keys()
get_ssh_keyB
Get details about a specific SSH key.

Returns detailed information about an SSH key identified by its ID.

Example:
- Get SSH key details: {"ssh_key_id": 12345}
create_ssh_keyB
Create a new SSH key.

Creates a new SSH key with the specified name and public key data.

Examples:
- Basic SSH key: {"name": "my-ssh-key", "public_key": "ssh-rsa AAAAB3NzaC1..."}
- With labels: {"name": "user-key", "public_key": "ssh-rsa AAAAB3NzaC1...", "labels": {"environment": "production"}}
update_ssh_keyC
Update an SSH key.

Updates the name or labels of an existing SSH key.

Example:
- Update name: {"ssh_key_id": 12345, "name": "new-key-name"}
- Update labels: {"ssh_key_id": 12345, "name": "existing-name", "labels": {"environment": "staging"}}
delete_ssh_keyB
Delete an SSH key.

Permanently deletes an SSH key identified by its ID.

Example:
- Delete SSH key: {"ssh_key_id": 12345}

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dkruyt/mcp-hetzner'

If you have feedback or need assistance with the MCP directory API, please join our Discord server