Connect Hetzner to Codex
Manage cloud servers, networks, volumes, and firewalls. Add Toolspoke to Codex once and it can use 12 Hetzner actions. Your Hetzner credential stays in Toolspoke, and you choose which actions Codex may call.
Set it up in Codex
Three steps, the first one once for every toolkit you will ever add.
Add Toolspoke to Codex
~/.codex/config.toml
[mcp_servers.toolspoke] url = "https://toolspoke.com/mcp"Codex signs in to Toolspoke on its own the first time it connects, so there is no key to paste.
Install Hetzner and connect it
Add Hetzner to a project in your Toolspoke workspace.
API token. You provide it once, when you install the connector. Toolspoke encrypts it at rest and decrypts it only for the length of a single call, and the gateway attaches it to the outbound request itself, so it is never part of the arguments an agent sends.
- API token
- Cloud Console → your project → Security → API tokens → Generate API token. Read & Write is required for create_server and server_power.
Choose what Codex may do
All 12 actions start on. Switch off any of the 2 actions that change something in Hetzner, and Codex gets a refusal if it tries.
What you can ask Codex for
A few of the Hetzner actions that only read, so they are safe to try first.
- List the servers in the project with status, type, datacenter, and public IPs
- Fetch one server by id, including its attached volumes, private networks, and applied firewalls
- Poll a long-running action by id to see whether it is still running, succeeded, or errored
- List the server types available to the project with their cores, memory, disk, CPU type, and architecture
What Codex can do in Hetzner
10 actions read and 2 write.
Reads
List servers
List the servers in the project with status, type, datacenter, and public IPs. Call this first to get the numeric server id the other server actions need.
Get server
Fetch one server by id, including its attached volumes, private networks, and applied firewalls.
Server metrics
Read time-series metrics for one server, cpu (percent), disk (IOPS and bandwidth), or network (packets and bytes per second). Use it to diagnose load or saturation before resizing.
Get action
Poll a long-running action by id to see whether it is still running, succeeded, or errored. create_server and server_power both return an action id.
List server types
List the server types available to the project with their cores, memory, disk, CPU type, and architecture. Use it to pick the server_type value for create_server.
List images
List bootable images. Defaults to Hetzner's system images (the OS list); pass type=snapshot or type=backup to see your own. Use the name for create_server.
List locations
List the datacenter locations servers can be created in, with their city, country, and network zone.
List ssh keys
List the SSH keys stored in the project. Pass the names to create_server so the new machine is reachable.
List networks
List the project's private networks with their IP ranges, subnets, routes, and attached server ids.
List volumes
List block-storage volumes with their size, location, format, and the server each one is attached to.
Writes
Create server
Provision a new cloud server. Requires a name, a server type (see list_server_types) and an image (see list_images); pass ssh_keys so the machine is reachable, otherwise Hetzner returns a one-time root password in the response. Returns the server plus the action to poll with get_action.
Server power
Change a server's power state: poweron boots it, shutdown asks the guest OS to halt via ACPI, poweroff cuts power immediately, reboot sends an ACPI restart, and reset is a hard restart. The server and its disks are preserved in every case. Returns an action to poll with get_action.
Hetzner in Codex: questions
Does Codex see my Hetzner credential?
No. The credential is stored encrypted in Toolspoke, and the gateway adds it to each call. Codex only ever talks to Toolspoke, and the dashboard shows the last four characters of the credential and nothing more.
Can I stop Codex from changing things in Hetzner?
Yes. Each of the 12 actions can be switched off for a project. Turn off the 2 that change something and Codex can only read.
Will 12 actions crowd Codex's context?
No. Toolspoke shows Codex five bridge tools, plus a guide where a toolkit has one, and Codex searches for the Hetzner action it needs when it needs it. Adding more toolkits does not add more tools to its list.
Does the same work in ChatGPT?
ChatGPT and Codex share one OpenAI account. In ChatGPT, add a custom MCP connector in its settings and paste the same address.
What does it cost?
Tool calls are free on every plan, and a Hetzner call does not run in a sandbox, so it bills nothing.
Hetzner in your other apps
More infrastructure toolkits for Codex
Try Hetzner in Codex
Free to start, and tool calls cost nothing on any plan.