# For AI Agents

Use Happ from Claude Code, Cursor, ChatGPT, and other AI tools — MCP server, llms.txt, OpenAPI

> Full REST + WebSocket API reference: https://api.happ.tools/reference

Everything on this site is machine-readable. Point your AI tool at it instead of reading manually.

## MCP server [#mcp-server]

The [`@happ-ai/platform-mcp`](https://www.npmjs.com/package/@happ-ai/platform-mcp) server exposes the Happ platform as tools: manage companies, assistants, channels, chats, knowledge, and more — straight from your AI assistant.

### Claude Code [#claude-code]

```bash
claude mcp add happ -- npx -y @happ-ai/platform-mcp
```

### Cursor / Windsurf / any MCP client [#cursor--windsurf--any-mcp-client]

```json
{
  "mcpServers": {
    "happ": {
      "command": "npx",
      "args": ["-y", "@happ-ai/platform-mcp"]
    }
  }
}
```

### OpenAI Agents SDK [#openai-agents-sdk]

```python
from agents.mcp import MCPServerStdio

happ = MCPServerStdio(params={
    "command": "npx",
    "args": ["-y", "@happ-ai/platform-mcp"],
})
```

Then log in with the `happ_login` tool, or provide an access token from [my.happ.tools](https://my.happ.tools).

## Docs as Markdown [#docs-as-markdown]

| What                 | URL                                                                                                                                         |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| Index of all pages   | [/llms.txt](https://docs.happ.tools/llms.txt)                                                                                               |
| All docs in one file | [/llms-full.txt](https://docs.happ.tools/llms-full.txt)                                                                                     |
| Any page as Markdown | prefix path with `/llms.mdx`, append `.md` — e.g. [/llms.mdx/en/docs/quickstart.md](https://docs.happ.tools/llms.mdx/en/docs/quickstart.md) |

Every docs page also has **Copy Markdown**, **Open in Claude**, and **Open in ChatGPT** buttons.

## API for code generation [#api-for-code-generation]

| What                 | URL                                                                        |
| -------------------- | -------------------------------------------------------------------------- |
| OpenAPI 3.0 spec     | [api.happ.tools/api/swagger-json](https://api.happ.tools/api/swagger-json) |
| API reference (docs) | [/en/api](/api)                                                            |
| Interactive client   | [api.happ.tools/reference](https://api.happ.tools/reference)               |

Feed the OpenAPI spec to your tool and ask it to generate the integration:

```text
Read https://api.happ.tools/api/swagger-json and write a client that
creates an assistant, uploads knowledge, and connects a Telegram bot.
Authenticate with the X-Access-Token header.
```
