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

# What is the Kit?

> @waniwani/kit builds an MCP app from a folder. You write tools, widgets and flows; one CLI turns the folder into a deployable MCP server and owns every piece of plumbing.

`@waniwani/kit` builds an MCP app as a folder. You write tools, widgets and flows into a directory, and one CLI turns that directory into a deployable MCP server. Your repo holds none of the plumbing. The server bootstrap, the transport wiring and the build configuration live in the package.

Your side is the distribution MCP itself, meaning the tools, the widgets, the funnel and the content. The kit owns everything technical underneath it: the server, the transport, bundling, the deploy files, and keeping up with framework upgrades.

```text theme={null}
oney/                          # what you write
├── waniwani.config.ts
├── tools/check-eligibility.ts
├── widgets/select-plan/{widget.ts,ui.tsx}
└── flows/split-payment.ts

waniwani build                 # → .waniwani/, an ordinary npm project
```

> [card] [Quickstart](https://docs.waniwani.ai/kit/quickstart.md)
>
> Scaffold an app with `init` and have the dev server running in one command.

> [card] [Folder convention](https://docs.waniwani.ai/kit/folder-convention.md)
>
> Which folder becomes which MCP surface, and how names are derived.

> [card] [Widgets](https://docs.waniwani.ai/kit/widgets.md)
>
> Two files per widget, one schema for input, output and props.

> [card] [Deploy](https://docs.waniwani.ai/kit/deploy.md)
>
> Vercel, Docker or Alpic. The build writes the config, so deploying is a push.

## Kit or SDK?

The kit and the SDK are the two packages people mix up. The SDK is a **library**: you keep the `McpServer`, the transport and the build, and add flows, tracking or a knowledge base inside them. The kit is a **framework** built on the SDK, and it owns the server, the transport, the bundler and the deploy files, so your repo can hold none of them.

[Choose a package](https://docs.waniwani.ai/sdks/overview.md) compares all four `@waniwani` packages, including the chat widget and the platform CLI.

## Kit against SDK, in code

With the SDK, the server is a file you write and keep:

```ts src/server.ts theme={null}
// yours to maintain
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";

const server = new McpServer({ name: "oney", version: "1.0.0" });

server.registerTool(
  { name: "check-eligibility", title, description, inputSchema, annotations },
  async (input) => { /* … */ },
);
await flow.register(server);
await server.connect(new StreamableHTTPServerTransport(/* … */));
```

Around that file you also own a `tsconfig.json`, a bundler config for any widget UI, a `Dockerfile` and the deploy config each host wants.

With the kit, you write the part that answers the question and nothing around it:

```ts tools/check-eligibility.ts theme={null}
export default defineTool({ title, description, input, output, hints, run });
```

The kit finds that file, derives its tool name, registers it, bundles any widget that goes with it, and emits a deployable project. One copy of the plumbing exists, it lives in the package, and fixing it costs one publish plus a dependency bump per app.

The kit depends on the SDK, and the SDK knows nothing about the kit. Inside a kit app, `createFlow(...)` comes from the SDK, while `defineApp`, `defineTool`, `defineWidget` and the server that registers them come from the kit.

## What the kit gives you

* **Names from the filesystem.** `tools/check-eligibility.ts` registers as `check-eligibility`. Nothing is listed in a registry, so no widget can sit defined and unwired.
* **Failures surface at build time.** Structure is validated from the filesystem, then every server-safe module is imported for real. A flow that names a widget which does not exist fails the build instead of a request.
* **One runtime for every app.** Error envelopes, annotation defaults, the CSP block and tracking through `withWaniwani` sit in one place.
* **Leaving is one command.** `waniwani eject` writes the plumbing into your repo and steps out. See [Eject](https://docs.waniwani.ai/kit/eject.md).

## Next

Run through the [Quickstart](https://docs.waniwani.ai/kit/quickstart.md), or read the [folder convention](https://docs.waniwani.ai/kit/folder-convention.md) first if you would rather know the rules before typing.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.