# Publish HTML from Cursor · Stacktree

Source: https://stacktr.ee/cursor

[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 20, 2026          for Cursor

#  Publish HTML from Cursor with one command.

   Run npx stacktree-install — pick Cursor when prompted — and every HTML file the agent writes can be published to a private, unguessable URL. Replace-in-place via update_site means the same URL survives every revision.

  [ Get started free ](https://app.stacktr.ee/?join=1&from=seo_cursor)   install npx stacktree-install
Copy
     No card · 3 pages free · about a minute

##  How do you publish HTML from Cursor in 2026?

Run `npx stacktree-install`, pick Cursor when prompted, restart Cursor, and ask the agent to publish any HTML file. Stacktree returns an unguessable URL you can password-protect, email-gate, expire, or replace in place. Sites belong to your account from the first publish.

## The 30-second install

 Run `npx stacktree-install` in your terminal. It opens your browser, signs you in to stacktr.ee, and writes the `stacktree` entry into the Cursor `mcp.json` you pick — per-project at `.cursor/mcp.json`, or per-user at `~/.cursor/mcp.json`. Restart Cursor to pick up the new server.

## What the installer writes (for the curious)

 If you'd rather edit `mcp.json` by hand, the entry the installer adds looks like:

```
`{
  "mcpServers": {
    "stacktree": {
      "command": "npx",
      "args": ["-y", "stacktree-mcp"],
      "env": { "STACKTREE_API_KEY": "stk_live_…" }
    }
  }
}`
```

 Generate the key from [app.stacktr.ee/api-keys](https://app.stacktr.ee/api-keys) if you go this route.

## What the agent gets

 Twenty-nine tool calls become available to the Cursor agent: `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`. The agent uses them like any other MCP tool — Cursor decides when to call them based on the prompt.

## Typical flow

  - Cursor generates a single-file HTML report.
 - You: "publish that as a private Stacktree, gate it to @yourco.com, expire in 7 days."
 - Cursor calls publish_html, then set_email_gate, then set_expiry. Three tool calls, one operation in your head.
 - You paste the URL into Slack. Anyone with a verified @yourco.com email opens it via magic link.

## When iterating

 If you ask Cursor to revise the same artifact, tell it to "update the same Stacktree" — it'll call `update_site` with the existing slug. The URL doesn't change; the content does. Anyone who already opened the link sees the new version on refresh.

##
Set up Cursor in one line

Paste this into Cursor. 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

     How do I add Stacktree to Cursor? +  Run `npx stacktree-install` and pick Cursor when prompted. It signs you in to stacktr.ee in your browser, then writes a `stacktree` entry to your Cursor `mcp.json` (per-project `.cursor/mcp.json` or per-user `~/.cursor/mcp.json` — your choice during install). Restart Cursor and the tool calls become available.   Does Cursor support stdio MCP? +  Yes — Cursor implements MCP over stdio, which is exactly what `stacktree-mcp` defaults to. No HTTP wiring required.   Can the Cursor agent replace a previous publish? +  Yes. Tell it to "update the same site" and it calls `update_site`. The URL stays stable across iterations, so any link your team has bookmarked still shows the latest version.   Do I need a Stacktree account to start? +  No. The first publish is anonymous and lives 24 hours. `stacktree login` stores a token at `~/.stacktree/credentials` when you want persistence.   Is this Cursor-specific? +  No. The same `stacktree-mcp` package works in Claude Code, Codex CLI, Claude.ai connectors, and any MCP-compatible client. Cursor just needs the standard mcp.json entry.
Keep reading

## Related guides

   -  [ Have your agent publish its own run report as a link End every agent run with a link, not a wall of terminal text: the agent renders an HTML run report, calls publish_html. ](/workflows/agent-publishes-its-own-report)
-  [ Publish from Claude Code Same MCP server, wired into Claude Code instead. ](/claude-code)
-  [ Publish from Codex OpenAI Codex CLI integration. ](/codex)
-  [ The MCP publish tool Every verb the server exposes, end to end. ](/mcp-publish-html)
-  [ Agent-loop hosting Why update_site is the loop primitive. ](/agent-loop-hosting)

References

## Sources and further reading

   -  [ Cursor — MCP integration docs ↗ Official Cursor docs for adding MCP servers via mcp.json. ](https://docs.cursor.com/context/model-context-protocol)
-  [ Model Context Protocol — spec ↗ The open standard Cursor uses to talk to MCP servers. ](https://modelcontextprotocol.io/specification/2025-11-25)
-  [ npm — stacktree-mcp ↗ The package the mcp.json entry installs. ](https://www.npmjs.com/package/stacktree-mcp)

##  Add Stacktree to Cursor.

 One command. The next time Cursor writes HTML, you get a private link.

 [ Sign up free → ](https://app.stacktr.ee/?join=1&from=cta_cursor)   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
