Publish HTML as a share link, from any MCP agent.
Ask your agent for a link and it hands one back: a private, unguessable page your client opens in any browser, with no account. stacktree-mcp gives Claude Code, Cursor, Codex, Claude.ai and ChatGPT forty-nine tools to publish, replace in place, add a passcode, file work under a client, and see who opened it.
No card · 3 pages free · about a minute
What is the MCP server for publishing HTML?
stacktree-mcp is an MCP server (Model Context Protocol) on npm. It exposes forty-nine tools — publish_html, update_site, delete_site, restore_site, claim_site, set_password, set_expiry, create_share_link, list_share_links, revoke_share_link, set_client_feedback, set_email_gate, list_sites, get_me, list_client_spaces, set_client, create_client_space, update_client_space, delete_client_space, get_design_guide, get_site, get_content, get_passcode, get_activity, list_versions, restore_version, list_feedback, resolve_feedback, link_wallet, whos_it_for, unopened_pages, get_revision_brief, publish_revision, resolve_comments, request_approval, get_approval_status, list_responses, resolve_addressed_notes, open_html_file, stacktree_pages, publish_card_status, publish_card_open, publish_card_send, apply_suggested_edits, report_missing_feature, whats_new, add_custom_domain, verify_custom_domain, list_custom_domains — that any MCP client can call. The hosted server at api.stacktr.ee/mcp exposes the same 49 and takes either an API key or an OAuth token, so no browser is needed to connect. Agents use it to hand HTML they've written back to a human as a private, unguessable URL, optionally locked by password or company email domain, and optionally replaceable in place across revisions.
How it works
- Add the server. Run
npx stacktree-installfor Claude Code, Cursor, Codex, OpenCode or Amp, addhttps://api.stacktr.ee/mcpas a custom connector in Claude.ai or as an MCP server in Cursor, or add Stacktree from ChatGPT's apps. - Sign in once. The installer opens your browser and writes an API key into the agent's config; connectors sign in with OAuth. An unattended agent can send an API key instead, with no browser at all.
- Ask for a link. "Publish this as a private page and give me the link." The agent calls
publish_htmland replies with the URL. "Update the page" later replaces it at the same link, and "has anyone opened it?" gets an answer.
No account at all? One curl call publishes a page that lasts 24 hours.
The tools agents use most
The full list of 49 is in the FAQ below.
publish_html— upload a file (or inline HTML), get a link back. The default expiry follows the plan: permanent on paid plans, 7 days on free. Passexpires_in_hours(a number of hours, or"never"for a permanent link) to change it. A number longer than the plan allows is shortened to its ceiling and the response says so;"never"on the free plan is refused outright rather than quietly becoming 7 days, so an agent can never hand someone a link it has called permanent when it is not. Passaccept_clampto take the ceiling instead. The 24-hour anonymous default belongs to the raw HTTP API below, not this tool. Passclient(a name or slug, e.g."Acme Co") to file the page under a client space in the same call — the space is created on first use, andclient_pathfixes the page's path inside it. Every publish runs a pre-flight secret scan (API keys, JWTs, card numbers) that blocks by default on the MCP path; what it catches and why.update_site— replace the content of an existing slug. The URL stays. This is the loop primitive.get_site— read a published page back.set_password— shared secret on top of the already-unguessable URL.set_expiry— minutes to years. Auto-delete after the deadline.set_email_gate— restrict viewers to a specific email domain; magic-link verified.set_client_feedback— turn on comments so the people you send a page to can answer on it, with no account. The loop: viewers leave notes, the agent reads them withlist_feedback, fixes the page in place withupdate_site(same URL), then marks them done withresolve_feedback.list_sites— what has the agent published lately?delete_site— burn it now, not 24 h from now.link_wallet— link the wallet an agent pays from, to claim and manage the pages it published.list_feedback— read viewer annotations: comment, annotated element, selected text, intent (fix, change, question, approve), severity (blocking, important, suggestion). Unresolved first.resolve_feedback— mark a feedback item addressed, with an optional note.set_client— file an existing page under a client space, or passnullto detach it.list_client_spaces— the client spaces on the account, with page counts, last activity, and whether a space has its own address and portal.create_client_space— set a client up before any work exists. Rarely needed, since publishing withclientcreates the space.update_client_space— rename, archive or unarchive a space, or set the passcode or email-domain gate every page in it inherits.delete_client_space— remove the space. Pages filed under it detach and keep working on their existing URLs.get_design_guide— the house design guide to read before restyling a published page.
Install in each MCP client
One command covers every CLI-based client:
# Claude Code, Cursor, Codex, OpenCode, Amp — pick any combination
npx stacktree-install It signs you in via your browser and writes the right config in each place. For Claude.ai's hosted connectors, paste the HTTP URL into the connector dialog instead:
# Claude.ai connector (HTTP transport)
URL: https://api.stacktr.ee/mcp If you'd rather edit configs by hand, every client writes the same shape — command: "npx", args: ["-y", "stacktree-mcp"], plus an env.STACKTREE_API_KEY entry.
No MCP? Publish with one curl
MCP is the agent-native path, but the same publishing primitive is a plain REST endpoint. A single curl publishes a file to a private, unguessable URL with no install and no account. The first publish is anonymous and lives 24 hours:
# Anonymous: no account, no API key
curl -X POST https://api.stacktr.ee/sites -F file=@index.html
You get back JSON with the live url. To keep sites past the anonymous window, replace them in place, or publish from a server, add an API key (create one at app.stacktr.ee/api-keys). Pages live 7 days on the free plan (once someone else opens one, 30 days after their latest visit, up to 90 days in total) and stay until you delete them from Solo up:
# Authenticated: same URL on every update
curl -X POST https://api.stacktr.ee/sites \
-F file=@report.html \
-H "Authorization: Bearer stk_live_..."
# Replace the content in place (the URL stays the same)
curl -X PUT https://api.stacktr.ee/sites/<id> \
-F file=@report.html \
-H "Authorization: Bearer stk_live_..."
Send a .zip with an index.html at the root for multi-file sites. The full endpoint reference is in the docs and the machine-readable OpenAPI spec. There is also an installable skill for skills.sh-compatible agents: npx skills@latest add stevysmith/stacktree-skill.
Why "one job, done completely" matters
Most "hosting" products bolt on workflow features as you grow — folders, projects, deploy pipelines, team management, custom build steps. They're trying to be a platform. Stacktree is trying to be a primitive. Forty-nine verbs is enough to publish, gate, iterate, collect feedback, file the work under the client it belongs to, and delete; anything else is your agent's job, not Stacktree's.
The agent already knows what HTML to write. It already knows when to revise. It already knows who should see it. Stacktree just needs to give it a tool to call when each of those decisions has been made. Everything else lives in the file your agent already wrote.
Server-Sent Events and streamable HTTP
For clients that prefer HTTP transport (Claude.ai connectors, raw HTTP MCP clients), the server is reachable at https://api.stacktr.ee/mcp with OAuth 2.1 + Dynamic Client Registration. Authorization metadata is served at /.well-known/oauth-authorization-server as required by the MCP spec.
Set up your agent in one line
Paste this into your agent. It fetches the setup instructions, installs Stacktree, checks the connection, and learns the parts agents usually get wrong: replacing a page in place so a link you already sent keeps working, reading the real expiry instead of promising permanence, and filing work under the client it belongs to.
Fetch and follow the setup instructions at https://stacktr.ee/prompt.md Works in any agent that can fetch a URL. Nothing to install first, and the instructions are plain Markdown you can read before you run them.
Frequent questions
Can AI agents publish HTML pages? +
publish_html, and can replace it at the same link with update_site. With no MCP at all, one curl to the REST API does the same, with no account for the first page. The person you send it to opens it in any browser, with no account.What is the Stacktree MCP server? +
stacktree-mcp, that exposes forty-nine tool calls for publishing HTML to a private, unguessable URL. Any MCP-compatible client (Claude Code, Codex CLI, Cursor, Claude.ai, ChatGPT custom GPTs) can call those tools. The hosted server at api.stacktr.ee/mcp exposes the same tools and accepts an stk_live_ API key as well as OAuth, so an unattended agent can connect with no browser.Which MCP clients does it work with? +
Which tool calls does the server expose? +
publish_html, update_site, delete_site, restore_site, claim_site, set_password, set_expiry, create_share_link, list_share_links, revoke_share_link, set_client_feedback, set_email_gate, list_sites, get_me, list_client_spaces, set_client, create_client_space, update_client_space, delete_client_space, get_design_guide, get_site, get_content, get_passcode, get_activity, list_versions, restore_version, list_feedback, resolve_feedback, link_wallet, whos_it_for, unopened_pages, get_revision_brief, publish_revision, resolve_comments, request_approval, get_approval_status, list_responses, resolve_addressed_notes, open_html_file, stacktree_pages, publish_card_status, publish_card_open, publish_card_send, apply_suggested_edits, report_missing_feature, whats_new, add_custom_domain, verify_custom_domain, list_custom_domains. Forty-nine verbs total.Can an agent file a page under a client when it publishes? +
publish_html takes an optional client argument — a client name or slug, such as "Acme Co" — and files the page under that client space. The space is created on first use, so there is no setup call, and filing is free on every plan. client_path sets the page's path within the space, and set_client moves an already-published page.How does authentication work? +
https://api.stacktr.ee/mcp with OAuth, or run npx stacktree-install, which signs you in through your browser and writes an API key into your agent’s MCP config. Subsequent calls publish under your account with full lifecycle control. On the free plan pages last 7 days, and once someone else opens one, it stays up for 30 days after their latest visit, up to 90 days in total. On a paid plan they stay until you take them down.Is the source open? +
stacktree-mcp and its HTTP surface is the public Stacktree REST API documented at stacktr.ee/docs. You can talk to the API directly without the MCP shim if you prefer.Related guides
- Publish HTML from n8n Install the n8n-nodes-stacktree community node and any n8n workflow can publish HTML to a private, unguessable URL.
- Claude Code integration Stdio install, no config.
- Codex CLI integration Same MCP server, wired into Codex.
- Agent-loop hosting Why update_site is the most important verb.
- Client spaces What the client argument files into: one address per client, no client login.
- Share Claude artifacts Artifact hand-off patterns side-by-side.
- Deploy HTML from Claude Code The deploy paths compared: Netlify, Vercel, Wrangler, MCP.
- Stacktree is an n8n node now n8n-nodes-stacktree passed n8n's review and is live: any workflow can publish HTML to a private link.
Sources and further reading
- Model Context Protocol — official spec ↗ The protocol stacktree-mcp implements. Tool-call shapes match the spec exactly.
- MCP transports (stdio + streamable HTTP) ↗ Both transports are supported; stdio is the default.
- OAuth 2.1 Dynamic Client Registration (RFC 7591) ↗ The DCR flow MCP HTTP clients use to authenticate.
- npm — stacktree-mcp ↗ Published package, semver-tagged.
Install the MCP server.
One npm package. Forty-nine tool calls. The next time your agent writes HTML, it has somewhere to put it.
Sign up free →