# AI agents and MCP

The docs are built for AI assistants. Every page has a Markdown version, the full docs are available as a single file, and a ready-made prompt gives your agent the integration rules.

AI agent prompt: https://docs.melioralab.io/en/agent-prompt.txt

## Files for agents

| File | Contents |
|---|---|
| [llms.txt](https://docs.melioralab.io/en/llms.txt) | Table of contents: links to the Markdown of every page, with a short description. |
| [llms-full.txt](https://docs.melioralab.io/en/llms-full.txt) | The full docs in one Markdown file: guides and reference. |
| [openapi.json](https://docs.melioralab.io/en/openapi.json) | OpenAPI 3.1 spec: routes, parameters, response schemas and examples. |
| `/en/md/<page>.md` | Markdown of a single page, for example [/en/md/events-polling.md](https://docs.melioralab.io/en/md/events-polling.md) or [/en/md/reference/leads.md](https://docs.melioralab.io/en/md/reference/leads.md). |
| [agent-prompt.txt](https://docs.melioralab.io/en/agent-prompt.txt) | The AI agent prompt as plain text. |

Every guide and reference page has a "Copy page" menu to the right of the title. Use it to copy the page's Markdown, open the Markdown on its own, or open the page in ChatGPT or Claude with a question already filled in.

## Connect the docs

### Claude, ChatGPT and other chat assistants

Paste the [prompt](https://docs.melioralab.io/en/agent-prompt.txt) into the chat using the "Copy prompt" button. If the assistant has internet access, it reads `llms-full.txt` and `openapi.json` on its own. If it doesn't, attach the [llms-full.txt](https://docs.melioralab.io/en/llms-full.txt) file to your message.

To ask about a single page, open the "Copy page" menu and choose "Open in ChatGPT" or "Open in Claude".

### Cursor

Add the docs as a source: in Cursor's docs settings, enter `https://docs.melioralab.io/en/llms-full.txt`, then reference it in chat with `@`. You can save the prompt in your project rules, in the `.cursor/rules` folder.

### Claude Code and other terminal agents

Save the prompt in your project's instructions file, such as `CLAUDE.md` or `AGENTS.md`, or pass it at the start of the session. An agent with network access reads the docs from the links in the prompt. Without network access, download the files into your project:

```bash
curl -o docs/meliora-llms-full.txt https://docs.melioralab.io/en/llms-full.txt
curl -o docs/meliora-openapi.json https://docs.melioralab.io/en/openapi.json
```

## Your key and the agent

The agent needs a key only if it makes API requests itself. Reading the docs and writing code doesn't require a key.

> **Warning.** Don't paste your key into a chat with a model, and don't put it in the prompt. The model provider may store your conversation, and the key gives access to your organization's data.

If the agent needs to make requests:

1. Create a **separate key** for it, not the one your integration uses.
2. Grant **minimal permissions**. Campaigns and Leads are usually enough. Enable Message text only if you really need it.
3. Limit the **scope** to one test campaign.
4. Set an **expiration**, for example one week, and an IP allowlist if you can.
5. Pass the key through the **environment variable** `MELIORA_API_KEY` in the environment where the agent runs code. The prompt tells the agent to read the key from there and never print it.
6. **Revoke the key** when the work is done.

For details on permissions, scope and revoking keys, see [Authentication and keys](https://docs.melioralab.io/en/authentication/).

## MCP server

Meliora doesn't have its own MCP server yet. It is planned and listed on the [What's next](https://docs.melioralab.io/en/roadmap/) page. Agents that support MCP can work with the docs through their own web page or file reading tool: give them links to `llms-full.txt` and `openapi.json`, or the prompt.

Third-party MCP servers that present themselves as a Meliora server are not affiliated with us. Don't give them your keys.
