# Waniwani for developers

> API documentation, OpenAPI specification, MCP server, OAuth authentication, SDK, and CLI for Waniwani, the AI distribution platform.

Waniwani is the AI distribution platform: an MCP app that represents your product inside ChatGPT, Claude, Gemini, and Perplexity, plus the analytics and compliance layer around it.

HTML version: https://waniwani.ai/developers

## Waniwani API documentation

The developer portal covers the Waniwani platform API, the SDK, and the hosted MCP server. It is public, needs no login, and ships an agent-readable index.

- [Waniwani developer documentation](https://docs.waniwani.ai): Full documentation site: SDK guides, MCP server reference, platform configuration, deployment.
- [Waniwani docs llms.txt](https://docs.waniwani.ai/llms.txt): Agent-readable index of every documentation page, with a one-line summary per link.
- [Waniwani docs llms-full.txt](https://docs.waniwani.ai/llms-full.txt): The entire documentation set concatenated as plain markdown, for agents that want one fetch.
- [Waniwani SDK quickstart](https://docs.waniwani.ai/sdk/quickstart): Get a flow running in under five minutes, in OSS, free-tier, or self-hosted mode.

## Waniwani OpenAPI specification

Machine-readable descriptions of the HTTP surfaces. Point a code generator or a function-calling agent at either file.

- [Waniwani website API OpenAPI spec](https://waniwani.ai/openapi.json): OpenAPI 3.1 description of the public endpoints on waniwani.ai, including the shared JSON error model.
- [Waniwani platform API reference](https://docs.waniwani.ai/api-reference/openapi.json): OpenAPI document behind the API reference section of the developer portal.
- [Waniwani website API index](https://waniwani.ai/api): JSON service index listing every endpoint on this domain, the error envelope, and links back to the specs.

## Waniwani MCP server

Waniwani runs a hosted Model Context Protocol server over Streamable HTTP. Connect Claude, Cursor, or ChatGPT and operate the platform conversationally: environments, API keys, analytics, session breakdowns.

- [Waniwani MCP server (US)](https://mcp.waniwani.ai/mcp): Streamable HTTP endpoint, OAuth 2.1 with PKCE, four tools: whoami, set_active_org, search, execute.
- [Waniwani MCP server (EU)](https://eu.mcp.waniwani.ai/mcp): Same server, EU data residency. Use the region your organization's data lives in.
- [Waniwani MCP server card](https://waniwani.ai/.well-known/mcp/server-card.json): Discovery manifest for the MCP server: endpoints, transport, auth, and the advertised tool list.
- [Waniwani MCP server documentation](https://docs.waniwani.ai/mcp-server/overview): What the server does, example prompts, and the capability categories it exposes.
- [Connect an AI client to Waniwani MCP](https://docs.waniwani.ai/mcp-server/connect): Client-by-client setup for claude.ai, Claude Code, Cursor, and ChatGPT, plus troubleshooting.

## Waniwani authentication

The MCP server is an OAuth 2.1 protected resource. It advertises its authorization server through RFC 9728 metadata and returns a WWW-Authenticate challenge on unauthenticated calls, so an agent can discover the flow without reading any prose.

- [Waniwani OAuth protected resource metadata](https://mcp.waniwani.ai/.well-known/oauth-protected-resource): RFC 9728 document naming the authorization server (app.waniwani.ai) and the supported scopes.
- [Waniwani MCP scopes and consent](https://docs.waniwani.ai/mcp-server/how-it-works): How the four tools work, how scopes are checked, and what the sandboxed execute tool can reach.
- [Waniwani API key setup](https://docs.waniwani.ai/sdk/configuration/api-key): Create a WANIWANI_API_KEY on the free tier for SDK tracking, KV state, and the knowledge base.
- [Waniwani security and key management](https://docs.waniwani.ai/sdk/configuration/security): Encryption at rest, key management, and rotation.

## Waniwani SDK and CLI

@waniwani/sdk is MIT licensed. A typed state graph compiles to a single MCP tool, so a multi-step funnel survives being driven by a model.

- [@waniwani/sdk on npm](https://www.npmjs.com/package/@waniwani/sdk): TypeScript SDK for building MCP funnels: createFlow, StateGraph, KvStore adapters.
- [@waniwani/cli on npm](https://www.npmjs.com/package/@waniwani/cli): Wire a local repo to a Waniwani agent: login, connect, dev, playground bridge.
- [Waniwani SDK on GitHub](https://github.com/WaniWani-AI/sdk): Source, issues, and the AGENTS.md rules for coding agents.
- [Waniwani MCP distribution template](https://github.com/WaniWani-AI/mcp-distribution-template): Starter repo for a production distribution MCP.
- [Waniwani agent skills](https://skills.sh/waniwani-ai): Published skills for coding agents. Install with npx skills add WaniWani-AI/sdk -s waniwani-sdk.

## Waniwani agent-readable files

Predictable URLs on this domain, for agents that would rather fetch a file than parse a page.

- [waniwani.ai/llms.txt](https://waniwani.ai/llms.txt): What Waniwani is, what it does, and where the developer resources live.
- [waniwani.ai/developers.md](https://waniwani.ai/developers.md): This page as plain markdown.
- [waniwani.ai/sitemap.xml](https://waniwani.ai/sitemap.xml): Every indexable URL on the marketing site, with lastmod dates.

## Connect the Waniwani MCP server

Streamable HTTP, OAuth 2.1 with PKCE, no API key to paste.

```json
{
  "mcpServers": {
    "waniwani": {
      "type": "http",
      "url": "https://mcp.waniwani.ai/mcp"
    }
  }
}
```

EU data residency: `https://eu.mcp.waniwani.ai/mcp`.

## Error handling

Every endpoint on waniwani.ai fails as JSON, never as an HTML error page:

```json
{
  "error": {
    "code": "missing_field",
    "message": "The \"email\" field is required.",
    "hint": "Include a work email address, e.g. {\"email\":\"you@company.com\"}.",
    "status": 422,
    "documentation_url": "https://waniwani.ai/developers#api-documentation",
    "field": "email"
  },
  "request_id": "req_1a4b7c9e2d5f8036b1c4e7a9"
}
```

Branch on `error.code`. The full list is in https://waniwani.ai/openapi.json.
