> ## 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.

# Quickstart

> Boot a flow-driven MCP server in 60 seconds. No API key required.

A complete, runnable MCP server with one flow, in under 30 lines. No HTTP, no API key, no infrastructure. Runs over stdio so any MCP client can connect.

## 1. Install

```bash theme={null}
bun add @waniwani/sdk @modelcontextprotocol/sdk zod
```

## 2. Write the server

```ts hello.ts theme={null}
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { createFlow, END, MemoryKvStore, START } from "@waniwani/sdk/mcp";
import { z } from "zod";

const flow = createFlow({
  id: "hello",
  title: "Hello World",
  description: "Say hello and ask a question.",
  state: { name: z.string().describe("Your name") },
})
  .addNode({
    id: "ask",
    run: ({ interrupt }) =>
      interrupt({ name: { question: "What's your name?" } }),
  })
  .addNode({
    id: "greet",
    run: ({ state }) => ({ greeted: true }),
  })
  .addEdge(START, "ask")
  .addEdge("ask", "greet")
  .addEdge("greet", END)
  .compile({ store: new MemoryKvStore() });

const server = new McpServer({ name: "hello-mcp", version: "1.0.0" });
await flow.register(server);
await server.connect(new StdioServerTransport());
```

## 3. Run it

```bash theme={null}
bun run hello.ts
```

That's a complete MCP server with one flow-driven tool. Connect it to ChatGPT, Claude, or any MCP client over stdio.

State lives in memory and resets on restart. Good for development. For production, swap `MemoryKvStore` for a real backend (see [KV store adapters](/sdk/flows/kv-store)) or set `WANIWANI_API_KEY` to use the [Waniwani Platform](/sdk/platform/overview) for hosted state.

## Next

<CardGroup cols={2}>
  <Card title="Build a funnel" icon="filter" href="/sdk/guides/funnels">
    Sales funnels, lead gen, booking, quote flows.
  </Card>

  <Card title="Flow engine" icon="diagram-project" href="/sdk/flows/overview">
    Nodes, edges, interrupts, conditional branching.
  </Card>

  <Card title="Waniwani Platform" icon="layer-group" href="/sdk/platform/overview">
    What the SDK does without a key, and what unlocks when you connect the Platform.
  </Card>

  <Card title="Self-hosting" icon="server" href="/sdk/deployment/self-hosting">
    Deploy the OSS path end-to-end.
  </Card>
</CardGroup>

## Starter template

For a more complete project with chat widget, dev tunnel, and a sample funnel pre-wired:

```bash theme={null}
git clone https://github.com/WaniWani-AI/mcp-distribution-template.git my-mcp-server
cd my-mcp-server
bun install
bun dev
```
