# WebMCP on Stacktree: an AI agent can build and publish a page from this site

Source: https://stacktr.ee/webmcp

[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          the agentic web

#  An AI agent can build and publish a page from this site.

   Stacktree speaks WebMCP. A browsing AI agent reads our page-local tools and calls them directly, no screenshots, no clicking. The headline tool publishes a live site from a single call, with no sign-in. Live in the Chrome origin trial today.

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

##  Does Stacktree support WebMCP?

Yes. Stacktree registers WebMCP tools on `document.modelContext` across the marketing site and the dashboard, behind the Chrome origin trial so they are live for real visitors in supported Chrome. The headline tool, `stacktree_publish_html`, takes a complete HTML document and returns a live, unlisted URL with no account. An agent that lands on this page can generate a page and ship it without a sign-in, a file upload, or a dashboard.

One sentence in the ⌘K palette generates a complete HTML page and publishes it live. No sign-in.

##
The pages you publish speak it too.

Publishing a page is not the end of the conversation. Every page you publish
      registers its own tools, so an agent that opens your work can ask whether it is
      the current version and send a comment back, without you wiring anything up.

  stacktr.ee/p/ML1j3nD7h5M8B2eUGMnzSc/Quarterly reportAcme Q3 reportOn trackPrepared for the Acme teamRevenue£48,000New customers81Churn2.4%Checkout redesign shipped in week 2Onboarding emails rewrittenSupport volume fell despite growthThis page is a private link. It updates in place.AssistantWebMCPIs this the latest version of the report Jo sent me?This page offers 2 toolsstacktree_page_inforeadOnlyHintstacktree_leave_feedbackwritelast_updated: 2026-08-25is_current_version: trueYes. The page itself says it was last updated 25 August and is the current version, so nothing newer is waiting.Tell them the revenue figure looks stale.Send a comment to the page owner?AllowNot now✓Delivered to the page owner.The read ran unattended because it declares `readOnlyHint`. The write stopped for consent. Both tools ship on every page you publish.

## Real tools, not screenshot archaeology

The hard part of browser agents today is that the web was built for human eyes. An agent has to screenshot a page, infer what is clickable, and hope the layout did not move. WebMCP flips that: a site declares its actions as structured tools, with names, descriptions and JSON Schema inputs, and the agent calls them directly. It is the difference between guessing at pixels and calling a function. A publish primitive should be fluent in every protocol agents use to act, so we added WebMCP alongside our MCP server, REST API, and x402 rail.

## What Stacktree exposes over WebMCP

The headline tool is `stacktree_publish_html`. It hits the same anonymous publish endpoint as our curl and CLI paths, so there is no new backend and no auth required.

    ParameterTypeRequiredNotes   `html`stringyesA complete HTML document. `filename`stringnoDefaults to `index.html`. `password`stringnoGate the page behind a password. `expiry_hours`numbernoAuto-delete after N hours. Anonymous default is 24.
It returns the live URL plus a single-use claim link, so a human can sign in later and keep the site past the 24-hour window. Alongside it are read-only helpers: open the dashboard, view pricing, read the docs, and copy the install command. The same catalog drives the in-page ⌘K palette for humans, so an agent and a person learn the same verbs.

## Register a WebMCP tool, in full

This is the actual shape, not a sketch. Removal is by aborting a signal you pass at registration; the shipped Chrome API has no `unregisterTool`.

```
`function getModelContext() {
  const mc = document.modelContext ?? navigator.modelContext;
  return mc && typeof mc.registerTool === 'function' ? mc : null;
}

const mc = getModelContext();
if (mc) {
  const controller = new AbortController();
  mc.registerTool(
    {
      name: 'stacktree_publish_html',
      description: 'Publish an HTML page and get a live, shareable URL. No sign-in.',
      inputSchema: {
        type: 'object',
        properties: { html: { type: 'string', description: 'A complete HTML document.' } },
        required: ['html'],
      },
      async execute({ html }) {
        const fd = new FormData();
        fd.append('file', new Blob([html], { type: 'text/html' }), 'index.html');
        const res = await fetch('https://api.stacktr.ee/sites', { method: 'POST', body: fd });
        const out = await res.json();
        return { content: [{ type: 'text', text: JSON.stringify(out) }] };
      },
    },
    { signal: controller.signal },
  );
  // controller.abort() removes the tool.
}`
```

## Two ways to use it on stacktr.ee

  Your agent calls the tools. Open stacktr.ee in a WebMCP-capable Chrome and your in-browser agent sees `stacktree_publish_html` and the rest, ready to call. It can generate a page and publish it without you touching the keyboard.

  You drive it in plain English. Press ⌘K and the same palette runs a natural-language mode: describe a page (a coming-soon page, a one-pager, a manifesto) and a model generates a complete, considered HTML document and calls the publish tool for you. That mode is bring-your-own-key: your provider key is stored only in your browser and sent straight to the provider, never to Stacktree. The plain publish tool needs no key at all.

## Is it safe to expose tools to agents?

WebMCP widens the prompt-injection surface in general, which Chrome itself has flagged, so the right discipline is a small, side-effect-light public tool set. Ours is exactly that: publishing is anonymous, unlisted, ephemeral and rate-limited, and everything else is read-only navigation. There are no destructive or account-mutating actions behind the public WebMCP surface. Account-scoped actions live in the signed-in dashboard, not on the open marketing site.

## What is live, honestly

WebMCP is early, and pretending otherwise helps no one. The spec is a draft, and Chrome ships it behind an origin trial that runs through Chrome 156. Stacktree carries the origin-trial token, so the API is active for real visitors in supported Chromium browsers with no flag; everywhere else the registration is a harmless no-op. Most people's browsers cannot call our WebMCP tools yet, which is why the demo above is a recording. We shipped the surface anyway, for the same reason we published [llms.txt](/llms.txt), machine-readable [pricing](/pricing.md), and an [x402 catalog](/x402) before their consumers were everywhere: agent-readable surfaces compound, and day one of the standard landing is day one of it working here. The bet, in one line: on the agentic web, agent-readiness becomes a property of the host, not homework for every site owner. Stacktree applies it asymmetrically, on purpose: the product surface is maximally agent-readable (this page, the API, the MCP server, WebMCP), while the pages you publish stay private by default, unguessable, unindexed, and opted out of AI ingestion. Agents publish here; what they publish is yours to share. Stacktree is one of the live examples in the [WebMCP demos list maintained by GoogleChromeLabs](https://github.com/GoogleChromeLabs/webmcp-tools/blob/main/AWESOME_WEBMCP.md#demos), alongside the other sites shipping the API early.

FAQ

## Frequent questions

     What is WebMCP? +  WebMCP is an experimental browser API that lets a website expose its own actions to an AI agent as structured, callable tools, through document.modelContext. Instead of an agent screenshotting the page and guessing where to click, it reads a typed list of tools with JSON Schema inputs and calls them directly. It is authored in the W3C Web Machine Learning Community Group and is in a Chrome origin trial as of Chrome 149.   What WebMCP tools does Stacktree expose? +  The headline tool is stacktree_publish_html, which publishes a complete HTML document and returns a live, unlisted URL with no account. There are also navigation and utility tools (open the dashboard, view pricing, read the docs, copy the install command). The same catalog powers the in-page Command palette for humans, so an agent and a person learn the same verbs.   Can an AI agent publish a website without signing in? +  Yes. publish_html calls the same anonymous endpoint as our curl and CLI paths. An agent passes a full HTML document and gets back a live link instantly. Anonymous sites are unlisted and expire after 24 hours; the response includes a claim link so a human can sign in and keep the site, for 7 days on the free plan or indefinitely from Solo up.   How do I register a WebMCP tool on my own site? +  Call document.modelContext.registerTool() with a name, description, inputSchema (JSON Schema) and an async execute function that returns content blocks, the same result shape MCP servers use. Feature-detect first, since most browsers do not expose modelContext yet. To remove a tool, pass an AbortController signal at registration and abort it; the shipped Chrome API has no separate unregisterTool.   Which browsers support this today? +  WebMCP runs in Chromium browsers participating in the Chrome origin trial (Chrome 149 and up, through Chrome 156). Stacktree ships the origin-trial token, so the API is active for real visitors in supported Chrome with no flag. In other browsers the registration is a harmless no-op.   Is exposing tools to agents safe? +  The tools Stacktree exposes are deliberately low-risk: publishing is anonymous, unlisted, ephemeral (24h by default) and rate-limited, and the rest are read-only navigation. There are no destructive or account-mutating actions behind the public WebMCP surface. WebMCP does widen the prompt-injection surface in general, so we keep the public tool set small and side-effect-light by design.   Do I need an API key to use the natural-language mode? +  Only if you want the in-page assistant to generate a page from a sentence. That mode is bring-your-own-key: you paste your own provider key (Anthropic, Google, or OpenAI), it is stored only in your browser and sent straight to the provider, and Stacktree never sees it. The plain publish_html tool needs no key at all.
Keep reading

## Related guides

   -  [ Publish HTML from Claude Code Add Stacktree as an MCP server and Claude Code will publish the HTML it writes to a private, unguessable URL. ](/claude-code)
-  [ What is WebMCP? Our dashboard already speaks it The companion piece: the same idea, applied to managing sites in the dashboard. ](/blog/dashboard-speaks-webmcp)
-  [ Stacktree for AI agents Every integration: MCP, REST, the CLI, and pay-to-provision. ](/agents)
-  [ The MCP tool surface The server-side cousin of these in-browser tools. ](/mcp-publish-html)
-  [ Let an agent pay for its own hosting WebMCP for the page, x402 for the payment. ](/x402)
-  [ Docs REST API and MCP server reference. ](/docs)

References

## Sources and further reading

   -  [ WebMCP on Chrome for Developers ↗ Google's official documentation for the WebMCP API and origin trial. ](https://developer.chrome.com/docs/ai/webmcp)
-  [ WebMCP origin trial announcement ↗ The Chrome 149 origin-trial launch post. ](https://developer.chrome.com/blog/ai-webmcp-origin-trial)
-  [ webmachinelearning/webmcp ↗ The W3C community-group explainer and proposed API surface. ](https://github.com/webmachinelearning/webmcp)
-  [ WebMCP demos list (GoogleChromeLabs) ↗ Chrome's curated list of live WebMCP demos. Stacktree is featured here. ](https://github.com/GoogleChromeLabs/webmcp-tools/blob/main/AWESOME_WEBMCP.md#demos)
-  [ Lighthouse: agentic browsing ↗ Chrome's scoring for how ready a site is for AI agent interaction. ](https://developer.chrome.com/docs/lighthouse/agentic-browsing/scoring)

##  Your next visitor might be an agent.

 Stacktree gives an in-browser agent a live link in one call, no sign-in. Open it in Chrome, or press ⌘K and describe a page.

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

- [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)
- [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)
- [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
