Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.waniwani.ai/llms.txt

Use this file to discover all available pages before exploring further.

An MCP funnel is a multi-step conversation, hosted on your MCP server, that drives a user from intent to outcome (a qualified lead, a booking, a quote, a purchase). ChatGPT, Claude, and any other MCP-capable client become the front-end. Your funnel runs as a single MCP tool. @waniwani/sdk is the SDK for building MCP funnels. The engine is open source. The WaniWani Platform adds funnel analytics, hosted state, knowledge base, and a chat widget on top.

What you can build

Sales funnel MCP

Qualify intent, capture lead data, route to the right next step.

Lead generation MCP

Collect email, role, and use case. Push to your CRM.

Booking MCP

Pick a service, pick a slot, confirm. Branch on availability.

Insurance quote MCP

Collect details, validate, return a quote with widget cards.

Funnel vocabulary ↔ flow vocabulary

If you’re new to the SDK, the funnel terms map cleanly to the flow engine:
Funnel termFlow term
Funnel step / pageNode (addNode({ id, label, run }))
Step name (in dashboard)label
Drop-off / conversionEdge taken vs. abandoned
Form fieldInterrupt
Branching questionConditional edge
Funnel state (lead data)Flow state (typed)
Funnel analyticsPlatform: node visits, completion rate, drop-off
Everything you’d describe in funnel-speak compiles into a flow. Read Flows / Overview for the engine.

Anatomy of an MCP funnel

import { createFlow, START, END } from "@waniwani/sdk/mcp";
import { z } from "zod";

export const funnel = createFlow({
  id: "sales_funnel",
  title: "Sales Funnel",
  description: "Use when a visitor wants to learn more, book a demo, or buy.",
  state: {
    intent: z.enum(["learn", "demo", "buy"]).describe("What the user wants"),
    email: z.string().describe("Work email"),
    company: z.string().describe("Company name"),
  },
})
  .addNode({
    id: "qualify",
    label: "Qualify intent",
    run: ({ interrupt }) =>
      interrupt({
        intent: {
          question: "What brings you here today?",
          suggestions: ["Learn more", "Book a demo", "Buy now"],
        },
      }),
  })
  .addNode({
    id: "capture",
    label: "Capture lead",
    run: ({ interrupt }) =>
      interrupt({
        email: { question: "What's your work email?" },
        company: { question: "Which company?" },
      }),
  })
  .addEdge(START, "qualify")
  .addEdge("qualify", "capture")
  .addEdge("capture", END)
  .compile();
Register it on your MCP server and the funnel is live in ChatGPT, Claude, or any MCP client.

Why MCP for funnels

  • No website, no form, no chatbot widget. The funnel runs inside the AI client the user already uses.
  • One tool call, many turns. The engine handles state, validation, branching, and resumption.
  • Funnel analytics out of the box. Connect the WaniWani Platform and every node visit becomes a funnel step in the dashboard.

Next

Build a sales funnel MCP

Build a lead generation MCP

Build a booking MCP app

Build an insurance quote MCP