Seven 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 seven verbs to publish, gate, replace, and delete artifacts.
What is the MCP server for publishing HTML?
stacktree-mcp is an MCP server (Model Context Protocol) on npm. It exposes seven tools — publish, update, set-expiry, set-password, set-email-gate, list, delete — that any MCP client can call. 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. Default expiry 24 h for anonymous publishes, indefinite for signed-in.update_site— replace the content of an existing slug. The URL stays. This is the loop primitive.set_expiry— minutes to years. Auto-delete after the deadline.set_password— shared secret on top of the already-unguessable URL.set_email_gate— restrict viewers to a specific email domain; magic-link verified.list_sites— what has the agent published lately?delete_site— burn it now, not 24 h from now.
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 permanently, replace them in place, or publish from a server, add an API key (create one at app.stacktr.ee/api-keys):
# Authenticated: permanent site, 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 "seven verbs, one job" 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. Seven verbs is enough to publish, gate, iterate, 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.
Frequent questions
What is the Stacktree MCP server? +
stacktree-mcp, that exposes seven 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.Which MCP clients does it work with? +
Which tool calls does the server expose? +
publish_html (create), update_site (replace in place), set_expiry, set_password, set_email_gate, list_sites, delete_site. Seven verbs total.How does authentication work? +
stacktree login stores a token at ~/.stacktree/credentials; subsequent calls publish under your account with full lifecycle control.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
- 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.
- Share Claude artifacts Artifact hand-off patterns side-by-side.
- Deploy HTML from Claude Code The deploy paths compared: Netlify, Vercel, Wrangler, MCP.
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. Seven tool calls. The next time your agent writes HTML, it has somewhere to put it.
Sign up free →