By · Founder, Stacktree · Last updated
MCP server

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.

Get started free

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

  1. Add the server. Run npx stacktree-install for Claude Code, Cursor, Codex, OpenCode or Amp, add https://api.stacktr.ee/mcp as a custom connector in Claude.ai or as an MCP server in Cursor, or add Stacktree from ChatGPT's apps.
  2. 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.
  3. Ask for a link. "Publish this as a private page and give me the link." The agent calls publish_html and 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.

  1. 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. Pass expires_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. Pass accept_clamp to take the ceiling instead. The 24-hour anonymous default belongs to the raw HTTP API below, not this tool. Pass client (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, and client_path fixes 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.
  2. update_site — replace the content of an existing slug. The URL stays. This is the loop primitive.
  3. get_site — read a published page back.
  4. set_password — shared secret on top of the already-unguessable URL.
  5. set_expiry — minutes to years. Auto-delete after the deadline.
  6. set_email_gate — restrict viewers to a specific email domain; magic-link verified.
  7. 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 with list_feedback, fixes the page in place with update_site (same URL), then marks them done with resolve_feedback.
  8. list_sites — what has the agent published lately?
  9. delete_site — burn it now, not 24 h from now.
  10. link_wallet — link the wallet an agent pays from, to claim and manage the pages it published.
  11. list_feedback — read viewer annotations: comment, annotated element, selected text, intent (fix, change, question, approve), severity (blocking, important, suggestion). Unresolved first.
  12. resolve_feedback — mark a feedback item addressed, with an optional note.
  13. set_client — file an existing page under a client space, or pass null to detach it.
  14. list_client_spaces — the client spaces on the account, with page counts, last activity, and whether a space has its own address and portal.
  15. create_client_space — set a client up before any work exists. Rarely needed, since publishing with client creates the space.
  16. update_client_space — rename, archive or unarchive a space, or set the passcode or email-domain gate every page in it inherits.
  17. delete_client_space — remove the space. Pages filed under it detach and keep working on their existing URLs.
  18. 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.

FAQ

Frequent questions

Can AI agents publish HTML pages? +
Yes. With the Stacktree MCP server connected, an agent turns HTML it wrote into a private link with one tool call, 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? +
It is an MCP (Model Context Protocol) server, distributed on npm as 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? +
Anything that speaks MCP over stdio or streamable HTTP. Confirmed clients: Claude Code, Codex CLI, Claude.ai connectors, Cursor, generic MCP HTTP clients. Stdio is the default; HTTP is opt-in.
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? +
Yes, in the same call. 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? +
With no account, the REST API publishes a 24-hour page from one curl call and no key (see above). Over MCP you connect once: connect the hosted server at 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? +
The MCP wrapper is published to npm as 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.
Keep reading

Related guides

References

Sources and further reading

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 →