By · Founder, Stacktree · Last updated
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

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.

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
htmlstringyesA complete HTML document.
filenamestringnoDefaults to index.html.
passwordstringnoGate the page behind a password.
expiry_hoursnumbernoAuto-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 permanently. 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, machine-readable pricing, and an x402 catalog before their consumers were everywhere: agent-readable surfaces compound, and day one of the standard landing is day one of it working here. Stacktree is one of the live examples in the WebMCP demos list maintained by GoogleChromeLabs, 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 permanently in a free account.
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

References

Sources and further reading

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 →