# AI Agents (MCP) — Overview

> StepsKit ships an MCP server so AI coding agents like Claude Code, Cursor, and Codex can install StepsKit and author product onboarding tours straight from your codebase.

*Source: https://stepskit.com/docs/ai-agents*

StepsKit ships an [MCP](https://modelcontextprotocol.io) server,
[`@stepskit/mcp`](https://www.npmjs.com/package/@stepskit/mcp), so your AI coding
agent can install StepsKit and author in-app guidance — product tours, contextual
tooltips, NPS surveys, and announcement banners — from inside your codebase.
Because the agent already has your components and selectors on disk, the
experiences it drafts point at the right elements from the start.

It works with any MCP client — Claude Code, Cursor, Codex, Claude Desktop, and
others. The server is the same everywhere; only the way you register it differs
(see [Connect your agent](/docs/ai-agents/connect.md)).

## The flow

1. **Status** — the agent calls `get_integration_status` to see whether the
   embed is installed, which domains are allowed, and how many tours exist. A
   token that covers your whole account resolves which project it's writing to
   first — automatic when you own one, a `list_projects` call away when you own
   several (see [Pick a project](/docs/ai-agents/connect.md#pick-a-project)).
2. **Install** — if the embed isn't installed, the agent detects your framework
   and adds the snippet to the right file. You review the diff.
3. **Identify** — the agent finds where your app resolves the logged-in user and
   wires `identify()` there, passing the attributes your user object already
   carries. Without this, "show once" and audience targeting can't work — see
   [the install prompt](/docs/ai-agents/install-prompt.md) for what a proper
   install looks like.
4. **Verify** — after you load a page once, `verify_integration` confirms the
   embed actually pinged StepsKit *and* reports which user attributes it
   received, so the agent can tell whether step 3 really landed instead of
   guessing. No attributes means your visitors are still anonymous.
5. **Domain** — `add_allowed_domain` whitelists your production domain (localhost
   is always allowed).
6. **Create** — `create_tour` persists a tour from codebase context, **as an
   unpublished draft**.
7. **Review & publish** — you review the tour in the StepsKit dashboard and
   publish it deliberately. The agent never publishes on its own.

## The tools your agent gets

Grouped by what they touch — the full per-tool reference lives on the
[MCP server reference](/docs/ai-agents/mcp-server.md) page:

| Group | What it covers |
| --- | --- |
| Projects | List the projects the token can reach and choose which one to write to. Only comes into play with an account-wide token; a project-scoped one is pinned by the credential. |
| Setup & integration | Onboarding state and install snippet, embed verification, domain whitelisting, URL-pattern suggestions, and `get_capabilities` (the live can/can't list). |
| Tours | Create unpublished tours; list and read them; edit name, behavior settings, visibility/targeting, and per-tour theme. |
| Steps | Add, edit, delete, and reorder steps. Editing keeps step ids (and analytics). |
| Tooltips | Create and edit contextual indicators — a `?`/info glyph, dot/pulse, or NEW/BETA badge anchored to one element, opening a popover with an optional CTA. |
| NPS surveys | Create and edit bottom-corner NPS cards — question, rating scale, follow-up, thank-you, re-survey window. |
| Announcements | Create and edit top/bottom banner strips, with an optional schedule window. |
| Project themes | Read and set the four project-wide defaults — one each for tours, tooltips, announcement banners, and survey cards — that every item inherits. |

> **Note**
>
> Tours created via MCP are always **unpublished drafts**. Nothing goes live
> until you publish it from the dashboard — review every tour the agent writes.

## Next steps

- [Connect your agent](/docs/ai-agents/connect.md) — per-client setup for Claude
  Code, Cursor, Codex, and others.
- [Install prompt](/docs/ai-agents/install-prompt.md) — a copy-pasteable prompt that
  installs StepsKit properly in any agent, no MCP server required.
- [Capabilities & limits](/docs/ai-agents/capabilities.md) — what you can and
  can't ask it to do.
- [MCP server reference](/docs/ai-agents/mcp-server.md) — the `@stepskit/mcp`
  package: configuration, environment variables, every tool, guardrails, and
  token security.
- [Troubleshooting](/docs/ai-agents/troubleshooting.md) — when the server or a tour
  doesn't show up.
