Skip to content
Kaiov0.8.0

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.

On the control plane, let /mcp reach the tools that deploy:

/etc/kaio/kaio.env
KAIO_MCP=write
KAIO_MCP_ALLOWED_HOSTS=kaio.example.net

Then add it to Claude Code, once:

Terminal window
claude mcp add --transport http kaio https://kaio.example.net/mcp

The 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.

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.

Claude Code on the left, Chrome on the right on the Kaio dashboard of kaio-test-node. The prompt asking for a Three.js site presenting Kaio's voxel mascot, deployed on kaio-test-node, is typed and sent. Claude writes index.html, calls kaio_nodes, then kaio_overview on kaio-test-node, then kaio_stack_deploy with wait: kaio-mascot appears in the stack list with its events, and the call answers once it is up and healthy, and a new tab opens kaio-test-node:8088 on Kaio, a voxel robot with a glowing K on a floating island, its stacks in orbit: it waves hello, then a press of D deploys redis, which drops into the orbit while the page logs it.
Claude Code on the left, the Kaio dashboard of kaio-test-node on the right: the stack shows up as the deploy call returns.

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:

compose.yml
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:.

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-mascot on kaio-test-node. Ask for a bigger wave and the redeploy is version 2, with the diff in the timeline and kaio_stack_rollback one call away;
  • a record: every write call lands in the audit log twice, on the control plane as mcp.kaio_stack_deploy with 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 with accept_risks, a second call you see in the log;
  • no race: while the deploy runs, any other change to kaio-mascot is refused with code busy, and an agent that passes the expected_version it read is refused with version_moved when 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.

An app that already ships an image needs no code and hardly a sentence:

Deploy Excalidraw on kaio-test-node.
Claude Code on the left, Chrome on the right on the Kaio dashboard of kaio-test-node, where kaio-mascot already runs. Deploy Excalidraw on kaio-test-node is typed and sent. Claude calls kaio_nodes, then kaio_overview on kaio-test-node, then kaio_stack_deploy with wait: excalidraw appears in the stack list with its events, and the call answers once it is up and healthy, and a new tab opens kaio-test-node:8090 on Excalidraw.
Four words and a node name: the agent picks the official image and a port, deploys, checks, and Excalidraw answers 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