One prompt, one deployed site
Kaio’s MCP server turns “build it and put it on that
server” into a sentence. The agent writes the code, and Kaio is how it reaches
the server: no SSH key handed over, no Docker socket, no deploy script. One
entry for the control plane, and every node that joined it is a node away.
1. Connect the agent to the control plane
Section titled “1. Connect the agent to the control plane”On the control plane, let /mcp reach the tools that deploy:
KAIO_MCP=writeKAIO_MCP_ALLOWED_HOSTS=kaio.example.netThen add it to Claude Code, once:
claude mcp add --transport http kaio https://kaio.example.net/mcpThe node needs nothing: it closes its own /mcp once it joined, and the
control plane signs every call it relays. write is enough for everything
below, and nothing destructive is in reach. Behind a proxy that names its
callers, give the agent a credential of its own instead of
yours.
2. Ask
Section titled “2. Ask”I'd like you to create a website presenting Kaio, the project's mascot, as a voxel character.Use Three.js and be creative. Once the site is done, deploy it on kaio-test-node.That is the whole prompt. Nothing in it says how to deploy, and nothing has to.

3. What the agent does
Section titled “3. What the agent does”It writes the page first, a voxel Kaio on a floating island with its stacks in orbit and a key for each action (deploy, rollback, copy, scan, wave, travel), then turns to Kaio itself:
| Call | Why |
|---|---|
kaio_nodes |
Finds kaio-test-node among the servers that joined, and that it answers |
kaio_overview with node: kaio-test-node |
Reads what already runs there and in what state, before adding to it |
kaio_stack_deploy with node: kaio-test-node and wait: true |
Writes the Compose file, brings the stack up and answers once every container runs, so “deployed” means running, not accepted. A port another stack already publishes there is refused with code port_taken, naming the holder and a free port to try, before anything is created. A stack that does not come up is rolled back and the call says why |
The site travels inside the Compose file itself, as an inline config served by nginx, so there is no image to build and no file to copy beside it:
services: web: image: nginx:1.27-alpine ports: - "8088:80" configs: - source: index target: /usr/share/nginx/html/index.html restart: unless-stopped
configs: index: content: | <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>Meet Kaio</title> <script type="importmap"> { "imports": { "three": "https://cdn.jsdelivr.net/npm/three@0.170.0/build/three.module.js" } } </script> </head> <body> <script type="module"> import * as THREE from 'three'; ... </script> </body> </html>Inline content needs Docker Compose 2.23.1 or later on the node. A site that
outgrows one file is better built into an image in CI and deployed by tag, the
same call with a different image:.
4. What you are left with
Section titled “4. What you are left with”Not a container somebody started by hand. A stack, like the ones you deploy yourself:
- a version: the Compose file the agent wrote is version 1 of
kaio-mascotonkaio-test-node. Ask for a bigger wave and the redeploy is version 2, with the diff in the timeline andkaio_stack_rollbackone call away; - a record: every
writecall lands in the audit log twice, on the control plane asmcp.kaio_stack_deploywith the node in front of the target, and on the node as a cluster call under the same user; - the same view for everyone: the stack shows up in the dashboard, on the
cluster board, in the TUI and in
kaio-cli node kaio-test-node run stack ls, because they all read the same server; - the same guard rails: a Compose file that hands the host to a service,
privileged: true, a bind mount of the Docker socket or of/, is refused until the agent sends it again withaccept_risks, a second call you see in the log; - no race: while the deploy runs, any other change to
kaio-mascotis refused with codebusy, and an agent that passes theexpected_versionit read is refused withversion_movedwhen you deployed in between, rather than overwriting what it never saw.
Move it to production later with the same sentence: “copy kaio-mascot to
prod-01” is kaio_stack_copy, with a dry run that catches the port already
taken there.
5. Or just name the app
Section titled “5. Or just name the app”An app that already ships an image needs no code and hardly a sentence:
Deploy Excalidraw on kaio-test-node.
The same three calls, minus the writing: kaio_nodes, kaio_overview to read
what already runs there, and kaio_stack_deploy with a
one-service Compose file on excalidraw/excalidraw and wait: true, which
answers only once it is up.
Kaio, built by Régis Gaidot