Deploy a project, publish a file
Every option below is one or the other. A deploy CLI wants a directory, a configuration and an account with a project in it; it gives you builds, previews and rollbacks in return. A publish call wants a document; it gives you a URL. If the artifact will not exist next week, the second one is the whole job.
The deploy CLIs
All three of the obvious ones work from inside an agent session, because they are just commands: a platform CLI that takes a directory and returns a deployment URL, a second that does the same with a different project model, and the edge-platform CLI that publishes a directory of static assets. Each needs a login, each creates something persistent, and each produces a public URL by default. That is the right trade for a site and the wrong one for a report.
Over MCP, in one tool call
Register the server once and publishing becomes something the agent does mid-task, without shelling out:
claude mcp add --transport http opentree https://read.botook.ai/mcp \
--header "Authorization: Bearer otr_live_YOUR_KEY"After that, "publish this and give me the link" resolves to publish_html, and "update
it" resolves to update_site against the same URL.
Or without installing anything
If you would rather not add a server, the agent can use the shell it already has:
curl -X POST https://read.botook.ai/sites \
-H "Authorization: Bearer otr_live_YOUR_KEY" \
-F file=@index.htmlSame endpoint, same defaults. The MCP route mainly buys you the agent knowing the verb exists without being told each time.
Step by step
- Get an API key from the dashboard at /app.
- Register the MCP server with the command above, or skip straight to
curl. - Ask the agent to publish the file it just wrote. It returns a URL with a 22-character token.
- Add a gate if the content deserves one —
set_passwordorset_email_gate. - Send the link. Re-ask for changes;
update_sitekeeps the same URL. - Read what the reader did when you want to know if it landed.
Side by side
| Deploy CLI | Publish call | |
|---|---|---|
| Wants | A directory and a project | One document |
| Login | Yes, interactive | An API key, or nothing for anonymous |
| Result | A public URL | An unguessable, expiring URL |
| Re-run | A new deployment | Same URL, new bytes |
| Cleanup | Delete the project later | It expires on its own |
Which to reach for
Publish when the file is finished and has a reader. Deploy when the file is the start of something with a lifecycle. The mistake worth avoiding is using a deploy platform for the first case, because the residue — a project per artifact — is what nobody cleans up.
Does this work in other agent clients?
Yes. The same HTTP MCP server registers in Codex, Cursor and the Claude.ai connector — see /agents for the exact command per client.
Can the agent publish without a key?
Yes, via POST /v1/publish — anonymous, rate-limited, and short-lived by default. Good
for a quick hand-off, not for anything you need to still exist next week.
What if the page has secrets in it?
The publish path scans content before storing it and refuses on a hit unless you override. That is the one place publishing is designed to fail loudly.
Can I use my own domain?
Yes — register the hostname, add the CNAME and TXT records it returns, and verify. See /custom-domains.