# The MCP server for publishing HTML · Stacktree

Source: https://stacktr.ee/mcp-publish-html

[Skip to content](#main) [Stacktree](/)[Developers](/developers)[Agents](/agents)[Docs](/docs)[Use cases](/use-cases)[Pricing](/pricing)[Blog](/blog)[Dashboard](https://app.stacktr.ee)[Sign in →](https://app.stacktr.ee)      By [ Steve Smith ](/about) · Founder, Stacktree  ·  Last updated September 27, 2026          MCP server

#  Twenty-nine tool calls. One job: publish HTML.

   stacktree-mcp is the Model Context Protocol server agents call when they're done writing HTML. Install it once in any MCP client and the agent gets twenty-nine verbs to publish, gate, replace, delete, file work under a client, and collect viewer feedback on artifacts.

  [ Get started free ](https://app.stacktr.ee/?join=1&from=seo_mcp_publish_html)   install npx stacktree-install
Copy
     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 twenty-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_agentation`, `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`, `list_versions`, `restore_version`, `list_feedback`, `resolve_feedback`, `link_wallet` — that any MCP client can call. The hosted server at `api.stacktr.ee/mcp` exposes the same 29 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.

## The full surface

  - publish_html — upload a file (or inline HTML), get a slug back. Over MCP the default expiry is 7 days; 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](/client-spaces) 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](/blog/do-ai-agents-leak-secrets).
 - 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_agentation — toggle the on-page Agentation toolbar so viewers can annotate the page. [The loop](/client-feedback-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.
 - 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 pass null to 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 with client creates 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](https://app.stacktr.ee/api-keys)). Pages live 7 days on the free plan 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](https://stacktr.ee/docs) and the machine-readable [OpenAPI spec](https://stacktr.ee/openapi.json). 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. Twenty-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](/prompt.md)
are plain Markdown you can read before you run them.

FAQ

## Frequent questions

     What is the Stacktree MCP server? +  It is an MCP (Model Context Protocol) server, distributed on npm as `stacktree-mcp`, that exposes twenty-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_agentation`, `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`, `list_versions`, `restore_version`, `list_feedback`, `resolve_feedback`, `link_wallet`. Twenty-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](/client-spaces). 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? +  Two modes. Anonymous: the first publish from a fresh install mints a 24-hour link with no account. Authenticated: `stacktree login` stores a token at `~/.stacktree/credentials`; subsequent calls publish under your account with full lifecycle control.   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](https://stacktr.ee/docs). You can talk to the API directly without the MCP shim if you prefer.
Keep reading

## 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. ](/n8n)
-  [ Claude Code integration Stdio install, no config. ](/claude-code)
-  [ Codex CLI integration Same MCP server, wired into Codex. ](/codex)
-  [ Agent-loop hosting Why update_site is the most important verb. ](/agent-loop-hosting)
-  [ Client spaces What the client argument files into: one address per client, no client login. ](/client-spaces)
-  [ Share Claude artifacts Artifact hand-off patterns side-by-side. ](/share-claude-artifacts)
-  [ Deploy HTML from Claude Code The deploy paths compared: Netlify, Vercel, Wrangler, MCP. ](/deploy-html-from-claude-code)
-  [ 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. ](/blog/stacktree-n8n-node)

References

## Sources and further reading

   -  [ Model Context Protocol — official spec ↗ The protocol stacktree-mcp implements. Tool-call shapes match the spec exactly. ](https://modelcontextprotocol.io/specification/2025-11-25)
-  [ MCP transports (stdio + streamable HTTP) ↗ Both transports are supported; stdio is the default. ](https://modelcontextprotocol.io/specification/2025-11-25/basic/transports)
-  [ OAuth 2.1 Dynamic Client Registration (RFC 7591) ↗ The DCR flow MCP HTTP clients use to authenticate. ](https://datatracker.ietf.org/doc/html/rfc7591)
-  [ npm — stacktree-mcp ↗ Published package, semver-tagged. ](https://www.npmjs.com/package/stacktree-mcp)

##  Install the MCP server.

 One npm package. Twenty-nine tool calls. The next time your agent writes HTML, it has somewhere to put it.

 [ Sign up free → ](https://app.stacktr.ee/?join=1&from=cta_mcp_publish_html)   install npx stacktree-install
Copy
       Private hosting for the HTML your agents make.

[](https://betalist.com/startups/stacktree?utm_campaign=badge-stacktree&utm_medium=badge&utm_source=badge-featured)[Featured on](https://devhunt.org/tool/stacktree)[](https://buildlist.io)[Get started free](https://app.stacktr.ee/?join=1)

## Product

- [Page video](/page-video)
- [Ask this page](/ask-this-page)
- [Client spaces](/client-spaces)
- [Templates](/templates)
- [Example deliverables](/examples)
- [Custom domains](/custom-domains)
- [Client feedback](/client-feedback-loop)
- [One-time links](/one-time-view-links)
- [See how pages get read](/page-engagement)
- [Made with Stacktree](/made-with)
- [Security](/security)
- [Watch the demo](/demo)

## Agents

- [All integrations](/agents)
- [Claude Code](/claude-code)
- [OpenAI Codex](/codex)
- [Cursor](/cursor)
- [Claude.ai connector](/claude-ai-connector)
- [Claude Cowork](/what-is-claude-cowork)
- [Meta Muse](/muse)
- [MCP server](/mcp-publish-html)
- [Deploy from Claude Code](/deploy-html-from-claude-code)
- [Skills](/skills)
- [Slack app](/slack)
- [n8n node](/n8n)
- [Agent payments (x402)](/x402)

## Alternatives

- [All comparisons](/alternatives)
- [Head-to-head comparisons](/compare)
- [Tiiny Host](/tiiny-host-alternative)
- [GitHub Pages (private)](/github-pages-private-alternative)
- [Vercel](/vercel-alternative-for-agents)
- [ngrok](/ngrok-alternative-for-html)
- [Display.dev](/display-dev-alternative)
- [Static.app](/static-app-alternative)
- [OpenAI Codex Sites](/openai-codex-sites-alternative)
- [here.now](/here-now-alternative)
- [Shippage](/shippage-ai-alternative)
- [Best private hosting](/best-private-html-hosting)

## Use cases

- [All use cases](/use-cases)
- [Share with clients](/share-with-clients)
- [Send a file to a client](/share-html-file-with-client)
- [Share Claude artifacts](/share-claude-artifacts)
- [Share Jupyter notebooks](/share-jupyter-notebook-html)
- [Host Storybook privately](/host-storybook-privately)
- [Architecture diagrams](/share-architecture-diagrams)
- [AI-generated reports](/host-ai-reports)
- [Internal HTML tools](/internal-tool-hosting)
- [Private HTML hosting](/private-html-hosting)
- [Vibe-coded page hosting](/vibe-coding-hosting)
- [Leave a website builder](/website-builder-migration)

## Learn

- [Blog](/blog)
- [Glossary](/glossary)
- [FAQ](/faq)
- [Where AI output should live](/where-ai-output-lives)
- [Agent-loop hosting](/agent-loop-hosting)
- [Why agents need a publish primitive](/blog/why-agents-need-a-publish-primitive)
- [MCP servers explained](/blog/mcp-servers-explained-for-developers)
- [What changed in the 2026-07 MCP spec](/blog/mcp-2026-spec-changes)
- [Sites in Codex explained](/blog/sites-in-codex-explained)
- [Private-by-default hosting](/blog/private-by-default-html-hosting)
- [An agent paid us $1 (x402)](/blog/agent-paid-to-provision-itself)
- [When a loop hits a paywall](/blog/loop-engineering-paywall)
- [Pricing](/pricing)
- [Self-host (new)](/self-host)
- [Changelog](/changelog)
- [Docs](https://stacktr.ee/docs)
- [About](/about)
© 2026 Stacktree · stacktr.ee

[Privacy](/privacy)[Terms](/terms)[Security](/security)[Dashboard](https://app.stacktr.ee)[npm](https://www.npmjs.com/package/stacktree-mcp)[Sitemap](/sitemap.xml)[llms.txt](/llms.txt)[API spec](/openapi.json)

---
Full markdown summary of the Stacktree marketing surface: https://stacktr.ee/llms-full.txt
