OpenTree DashboardSign in

$ claude mcp add --transport http …

Getting HTML out of Claude Code and onto a URL

Claude Code will happily write the page. The last step — turning the file it just wrote into something you can send to a person — is where sessions stall, usually because every obvious answer is a deploy tool and what you are holding is not a project.

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

Same endpoint, same defaults. The MCP route mainly buys you the agent knowing the verb exists without being told each time.

Step by step

  1. Get an API key from the dashboard at /app.
  2. Register the MCP server with the command above, or skip straight to curl.
  3. Ask the agent to publish the file it just wrote. It returns a URL with a 22-character token.
  4. Add a gate if the content deserves one — set_password or set_email_gate.
  5. Send the link. Re-ask for changes; update_site keeps the same URL.
  6. Read what the reader did when you want to know if it landed.

Side by side

Deploy CLIPublish call
WantsA directory and a projectOne document
LoginYes, interactiveAn API key, or nothing for anonymous
ResultA public URLAn unguessable, expiring URL
Re-runA new deploymentSame URL, new bytes
CleanupDelete the project laterIt 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.

Keep reading