> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mailofly.com/llms.txt
> Use this file to discover all available pages before exploring further.

# AI onboarding

> Everything you need to onboard your AI agent to Mailofly.

Give your AI coding assistants (Claude Desktop, Cursor, Antigravity) and autonomous agents full programmatic access to send transactional emails, query delivery logs, and inspect templates.

***

## 1. Get an API Key

Generate an API key with sending permissions:

1. Open your [Mailofly Dashboard](https://www.mailofly.com/user/api-keys).
2. Click **Create API Key**.
3. Name it (e.g. `claude-assistant` or `cursor-agent`).
4. Copy your secret key (`mfly_live_...`).

***

## 2. Connect via MCP (Model Context Protocol)

Add the Mailofly MCP server to your agent configuration:

```json theme={null}
{
  "mcpServers": {
    "mailofly": {
      "command": "npx",
      "args": ["-y", "@mailofly/mcp-server"],
      "env": {
        "MAILOFLY_API_KEY": "mfly_live_your_api_key"
      }
    }
  }
}
```

***

## 3. What Your AI Agent Can Do

Once connected, your AI agent can invoke:

* **`send_email`**: Send transactional messages with HTML or dynamic template variables.
* **`get_email_status`**: Check if an email was delivered, opened, clicked, or bounced.
* **`list_domains`**: Verify DNS and DKIM status for your sending domains.
* **`query_logs`**: Search real-time delivery logs for specific recipients.


## Related topics

- [What sending feature to use?](/guides/sending/what-sending-feature-to-use.md)
- [MCP Server](/mcp-server/introduction.md)
- [Introduction](/receiving/introduction.md)
- [Index](/changelog/index.md)
