webmcp-tour Live demo

Guided tours for AI agents

webmcp-tour gives AI agents guided tours of your app, in one script tag. Any WebMCP agent can walk your users through it, highlighting and explaining each step. Declare a few targets when you want to shape the tour.

Try the live demo · Quick start · Tools reference

The Billing page of the demo app: the Change plan button is highlighted and a card beside it says "From the AI assistant" with the explanation and a Got it button.

It is a zero-dependency TypeScript library for the browser. It registers four WebMCP tools on the page, so any agent that can call WebMCP tools (a browser's built-in assistant, an MCP client driving Chrome, or a model called from your own page script) can point at things.

The library is experimental (0.x): the API may change between minor versions, and WebMCP itself is still evolving. These docs describe the code in the repository as it is.

Two ways to use it #

The zero-shot primitive. Add one script tag. The agent calls tour_list_targets to read a visible outline of the page (headings, and controls with role, name and context), then tour_show_step({ text: "Change plan", message: "…" }) to point at a control by its visible text. No markup, no configuration. This works on any page and is the way to start. See Quick start.

The declared map. You tell the tour what your app has: targets (data-tour-id) with labels and descriptions, pages with URLs, and how to navigate. The agent then answers from your descriptions, can say "that control is on the Security page" and offer a Go to Security card, and the step resumes on the new page after the user presses Go. See Concepts.

Zero-shotDeclared map
SetupA script tagdata-tour-id attributes, pages, navigate
The agent finds controls byVisible text, accessible name, or a CSS selectorThe same, plus ids you chose
DescriptionsWritten by the agent each timeWritten by you, shown by default
Other pagesNot knownSuggested with a card; resumes after Go
Best forA quick start, a site you do not controlYour own product, where wording matters

You can mix them freely: declared targets are an addition, not a mode.

What the user sees #

  • A spotlight ring around the control, and a card beside it labelled From the AI assistant (so a page cannot pass the text off as its own) with a Got it button.
  • Optionally Take me there, which scrolls to the control, focuses it and pulses the ring.
  • For a control on another page: a card in the middle of the viewport, Go to Security or Not now, and nothing moves until the user picks.

The overlay uses system colours, supports light and dark, forced-colors and reduced motion, and is announced to screen readers (Accessibility).

Where to go next #