By · Founder, Stacktree · Last updated
MCP server

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.

Get started free

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

  1. publish_html — upload a file (or inline HTML), get a slug back. Default expiry 24 h for anonymous publishes, indefinite for signed-in.
  2. update_site — replace the content of an existing slug. The URL stays. This is the loop primitive.
  3. set_expiry — minutes to years. Auto-delete after the deadline.
  4. set_password — shared secret on top of the already-unguessable URL.
  5. set_email_gate — restrict viewers to a specific email domain; magic-link verified.
  6. list_sites — what has the agent published lately?
  7. 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.

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 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? +
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 (create), update_site (replace in place), set_expiry, set_password, set_email_gate, list_sites, delete_site. Seven verbs total.
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. 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. Seven tool calls. The next time your agent writes HTML, it has somewhere to put it.

Sign up free →