Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
HOSTNoListen address.0.0.0.0
PORTNoListen port.3000
HETZNER_API_TOKENNoCloud API token for the default project. For several projects, use HETZNER_API_TOKEN_<PROJECT> instead, where the suffix becomes the lower-cased project name.
HETZNER_READ_ONLYNoSet to 1 to remove hetzner_execute and block every non-GET request.off
HETZNER_MCP_SECRETNoRequired in hosted mode. At least 32 characters; encrypts stored credentials and signs the browser cookie.
HETZNER_ROBOT_USERNoRobot webservice user, created in Robot under Settings → Web service and app settings.
HETZNER_MCP_DB_PATHNoSQLite file path. Put it on a persistent volume../data/hetzner-mcp.sqlite
HETZNER_MCP_TENANTSNoRequired in hosted mode if HETZNER_MCP_TENANTS_FILE is not set. Tenant JSON provided inline.
HETZNER_ALLOW_BILLEDNoSet to 1 to allow requests that cost money.off
HETZNER_MCP_ICON_PATHNoPath to an .svg, .png or .ico file, served as favicon and announced as the MCP server icon.
HETZNER_MCP_PUBLIC_URLNoRequired in hosted mode. Public https base URL; the connector URL is <this>/mcp.
HETZNER_ROBOT_PASSWORDNoRobot webservice password.
HETZNER_APPROVAL_DIALOGNoSet to 1 to ask for approval in a client dialog instead of requiring confirmed: true.off
HETZNER_DEFAULT_PROJECTNoOptional default project name when using project-specific Cloud API tokens. Without it, tools must be given a project.
HETZNER_MAX_OUTPUT_CHARSNoLonger results are truncated.40000
HETZNER_MCP_TENANTS_FILENoRequired in hosted mode if HETZNER_MCP_TENANTS is not set. Path to the tenant JSON.
HETZNER_MCP_CF_ACCESS_AUDNoCloudflare Access application AUD tag for protecting /connect pages.
HETZNER_SKIP_CONFIRMATIONNoSet to 1 to send billed and destructive requests without asking for approval first.off
HETZNER_MAX_REQUESTS_PER_RUNNoAPI calls allowed per code run.200
HETZNER_MCP_ACCESS_TOKEN_TTLNoLifetime in seconds of access tokens issued to MCP clients.3600
HETZNER_MCP_REFRESH_TOKEN_TTLNoLifetime in seconds of refresh tokens issued to MCP clients (90 days).7776000
HETZNER_EXECUTE_TIMEOUT_SECONDSNoMaximum runtime of one code run.120
HETZNER_REQUEST_TIMEOUT_SECONDSNoTimeout of a single API call.30
HETZNER_MCP_CF_ACCESS_TEAM_DOMAINNoCloudflare Access team domain for protecting /connect pages.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Hetzner Cloud API (servers, volumes, networks, firewalls, load balancers, IPs, images, DNS zones, Storage Boxes) and Hetzner Robot API (dedicated servers and their firewall, reset, rescue, rDNS, vSwitch) in code mode. Cloud resources are reached through the hetzner object, dedicated servers through the robot object; a server missing in one may live in the other. Workflow: 1) hetzner_search to find the operation and its parameters, 2) hetzner_query for reads (GET only), 3) hetzner_execute only for changes. Do the filtering and aggregation inside the code and return only what is needed, list responses are large.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
hetzner_searchA

Explore the Hetzner API reference (Cloud API incl. DNS zones, Storage Box API, and the Robot API for dedicated servers) by running JavaScript against it. Makes no API calls and needs no token. Use it before hetzner_query / hetzner_execute to find the right path, parameters and request body.

Globals available in the code: search(text) -> [{ operationId, method, path, summary, api }] where every word matches id, path, summary or tag. api is "cloud" | "hetzner" (both called via hetzner) or "robot" (called via robot) describe(ref) -> one operation, condensed: description, parameters, requestBody, response ("name*" = required). ref is an operationId or "METHOD /path". Robot operations have no JSON schema; their description lists Input, Output, Errors and the request limit, plus curl/JSON examples operations -> all operations with full JSON schemas: { api, operationId, method, path, summary, description, tags, deprecated, parameters, requestBody, response } apis -> { cloud, hetzner, robot }, each { baseUrl, overview, tags: [{ name, description }] }. overview is the general documentation in Markdown (pagination, label selectors, sorting, rate limits, errors)

Examples: async () => search('firewall') async () => describe('create_server') async () => describe('POST /servers/{id}/actions/rebuild') async () => search('robot firewall') async () => describe('robot_post_firewall_server_id') async () => operations.filter(o => o.tags.includes('Zone RRSets')).map(o => o.method + ' ' + o.path) async () => apis.cloud.overview.split('\n## ').find(s => s.startsWith('Label Selector'))

hetzner_queryB

Run JavaScript that reads from the Hetzner API. Only GET requests are possible, so nothing can be changed. Chain several calls and filter the data in the code instead of returning whole responses.

Globals available in the code: hetzner.request({ method = 'GET', path, query?, body?, api? }) -> parsed JSON body (null if empty) hetzner.get(path, query?) / hetzner.post(path, body?) / hetzner.put(path, body?) / hetzner.delete(path) hetzner.paginate(path, query?, { maxPages = 50 }?) -> all items of a list endpoint across pages hetzner.waitForAction(actionOrResponse, { timeoutMs = 90000 }?) -> finished action, throws if it failed sleep(ms), console.log(...) robot.get(path, query?) / robot.post(path, body?) / robot.put(path, body?) / robot.delete(path) / robot.request({...}) Paths are relative to the API root, e.g. "/servers/123" (no host, no /v1). Storage Box paths are routed to api.hetzner.com automatically. Array query values become repeated keys. Failed calls throw an Error with .status, .code and .details. No fetch, require or other network access exists. Every request is checked against the API reference before it is sent (operation exists, known query and body fields, required fields, types, enum values); a mismatch throws with code "validation_failed" and nothing is sent. Only if the reference itself is wrong: hetzner.request({ ..., validate: false }). hetzner is the Cloud API of the selected project. robot is the Robot webservice for dedicated servers (NOT available: no Robot webservice user is configured); it is account-wide and ignores project. Robot paths are singular ("/server", "/firewall/{server-number}"), have no pagination and no actions, and are rate limited per endpoint (see "Request limit" in describe()). Pass Robot bodies as plain objects; they are sent form-encoded, nested values become rules[input][0][action]=accept.

Examples: async () => (await hetzner.paginate('/servers')).map(s => ({ id: s.id, name: s.name, status: s.status, type: s.server_type.name, ip: s.public_net.ipv4?.ip, location: s.datacenter?.location?.name })) async () => (await hetzner.get('/servers', { label_selector: 'env=prod', status: ['running'] })).servers.length async () => (await robot.get('/server')).map(({ server: s }) => ({ number: s.server_number, name: s.server_name, ip: s.server_ip, product: s.product, dc: s.dc })) async () => (await robot.get('/firewall/321')).firewall async () => { const [servers, volumes] = await Promise.all([hetzner.paginate('/servers'), hetzner.paginate('/volumes')]); return volumes.filter(v => !v.server).map(v => ({ id: v.id, name: v.name, size: v.size })); }

hetzner_executeA

Run JavaScript that changes Hetzner resources (POST, PUT, DELETE as well as GET). Changes are real and immediate: they can create billable resources, cause downtime or delete data permanently. Through robot this includes ordering and cancelling dedicated servers, hardware resets, and firewall rules that can lock everyone out of a server (POST /firewall/{server-number} replaces the whole rule set: read it first and send all rules back, except output rules named "Block mail ports", which Hetzner prepends itself and would duplicate; the update is asynchronous, poll until status is no longer "in process"). Look the operation up with hetzner_search first, use hetzner_query for pure reads, and act only on resources the user named.

Guard: requests that cost money (creating servers, volumes, load balancers, IPs, snapshots, Storage Boxes, type changes, backups, Robot orders) are refused unless the operator switched billed requests on. Billed requests and destructive ones (every DELETE, rebuilding a server, disabling backups, importing a zone file, Robot cancellations and OS installations) are not sent on the first attempt: the result states what they do and the price. Report that to the user and wait for their answer.

Globals available in the code: hetzner.request({ method = 'GET', path, query?, body?, api? }) -> parsed JSON body (null if empty) hetzner.get(path, query?) / hetzner.post(path, body?) / hetzner.put(path, body?) / hetzner.delete(path) hetzner.paginate(path, query?, { maxPages = 50 }?) -> all items of a list endpoint across pages hetzner.waitForAction(actionOrResponse, { timeoutMs = 90000 }?) -> finished action, throws if it failed sleep(ms), console.log(...) robot.get(path, query?) / robot.post(path, body?) / robot.put(path, body?) / robot.delete(path) / robot.request({...}) Paths are relative to the API root, e.g. "/servers/123" (no host, no /v1). Storage Box paths are routed to api.hetzner.com automatically. Array query values become repeated keys. Failed calls throw an Error with .status, .code and .details. No fetch, require or other network access exists. Every request is checked against the API reference before it is sent (operation exists, known query and body fields, required fields, types, enum values); a mismatch throws with code "validation_failed" and nothing is sent. Only if the reference itself is wrong: hetzner.request({ ..., validate: false }). hetzner is the Cloud API of the selected project. robot is the Robot webservice for dedicated servers (NOT available: no Robot webservice user is configured); it is account-wide and ignores project. Robot paths are singular ("/server", "/firewall/{server-number}"), have no pagination and no actions, and are rate limited per endpoint (see "Request limit" in describe()). Pass Robot bodies as plain objects; they are sent form-encoded, nested values become rules[input][0][action]=accept.

Most Cloud changes return an "action" that runs asynchronously; await hetzner.waitForAction(response) before relying on the result.

Examples: async () => { const res = await hetzner.post('/servers/123/actions/reboot'); return await hetzner.waitForAction(res); } async () => { const res = await hetzner.post('/servers', { name: 'web-1', server_type: 'cx23', image: 'ubuntu-24.04', location: 'nbg1', ssh_keys: ['my-key'] }); await hetzner.waitForAction(res); return { id: res.server.id, ip: res.server.public_net.ipv4.ip }; }

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.2/5.0

Scored across 3 tools

Disambiguation5/5

The three tools map cleanly to discover (hetzner_search), read (hetzner_query), and mutate (hetzner_execute). Although hetzner_execute also permits GET, the descriptions explicitly direct pure reads to hetzner_query, leaving no real ambiguity about which tool to pick.

Naming Consistency5/5

All tools use the same hetzner_ prefix followed by a clear action verb (search, query, execute). The pattern is predictable and consistent throughout.

Tool Count5/5

Three tools is exactly right for a generic API-wrapper server: one for reference lookup, one for safe reads, one for guarded writes. Each tool has a distinct, essential role and none feels redundant.

Completeness5/5

The surface covers the full lifecycle for Hetzner's Cloud, Storage Box, and Robot APIs: discovery via search, reads via query, and all mutations via execute with validation and billing/destructive guards. No obvious operation category is missing.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues