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

# MCP Quickstart

> Connect Mailofly to your AI editor in 60 seconds. Send emails, inspect logs, and manage audiences directly from natural language.

# Quickstart

Supercharge your AI assistant with native email infrastructure capabilities. Once connected, your AI can compose emails, query sending quotas, inspect delivery logs, and manage subscriber audiences directly within your conversational flow.

***

<Steps>
  <Step title="Get your Mailofly API Key" icon="key">
    Generate an API key with send or full access permissions from the [Mailofly Dashboard](https://www.mailofly.com/user/settings/api-keys).

    ```bash theme={null}
    mf_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxx
    ```

    <Tip>
      Keep your API key secure. We recommend storing it as an environment variable or referencing your secrets manager in production configurations.
    </Tip>
  </Step>

  <Step title="Add Mailofly to your AI Assistant" icon="plug">
    Mailofly runs via `npx` with zero local installation. Select your editor below to configure the MCP server:

    <Tabs>
      <Tab title="Cursor">
        <div style={{ margin: "0.75rem 0 1.25rem 0" }}>
          <a href="cursor://anysphere.cursor-deeplink/mcp/install?name=mailofly&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBtYWlsb2ZseS9tY3AiXSwiZW52Ijp7Ik1BSUxPRkxZX0FQSV9LRVkiOiJZT1VSX0FQSV9LRVkifX0=">
            <img src="https://img.shields.io/badge/Install%20in%20Cursor-000000?style=for-the-badge&logo=cursor&logoColor=white" alt="Install in Cursor" />
          </a>
        </div>

        Or add to `.cursor/mcp.json` (or **Cursor Settings** > **Features** > **MCP**):

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

      <Tab title="Google Antigravity">
        Install with a single CLI command:

        ```bash theme={null}
        agy mcp add mailofly -- npx -y @mailofly/mcp
        ```

        Or add to your `.gemini/antigravity-ide/mcp_config.json` or `~/.gemini/config/mcp_config.json`:

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

      <Tab title="Claude Desktop">
        Open your Claude Desktop configuration file:

        * **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
        * **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`

        Add the `mailofly` entry under `mcpServers`:

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

      <Tab title="Windsurf">
        In Windsurf, open **Settings** > **Cascade** > **MCP Servers**, or update `~/.codeium/windsurf/mcp_config.json`:

        ```json theme={null}
        {
          "mcpServers": {
            "mailofly": {
              "command": "npx",
              "args": ["-y", "@mailofly/mcp"],
              "env": {
                "MAILOFLY_API_KEY": "mf_live_your_api_key_here"
              }
            }
          }
        }
        ```
      </Tab>
    </Tabs>
  </Step>

  <Step title="Verify the connection" icon="sparkles">
    Restart your editor or reload MCP servers. Ask your AI assistant to check your account status:

    ```text theme={null}
    Check my Mailofly email sending quota and verified domains.
    ```

    Your AI will call `mailofly_get_usage` and `mailofly_list_domains`, returning your plan limits, current usage, and DNS verification statuses in seconds.
  </Step>
</Steps>

***

## What you can ask your AI

Here are a few real-world examples you can paste directly into your AI chat:

<AccordionGroup>
  <Accordion title="Send a transactional or test email" icon="paper-plane">
    ```text theme={null}
    Send a test welcome email from alex@yourdomain.com to user@example.com
    with the subject 'Welcome to our platform' and a clean HTML card welcoming them.
    ```
  </Accordion>

  <Accordion title="Inspect delivery status and logs" icon="magnifying-glass">
    ```text theme={null}
    Look up the delivery status and error logs for the email sent to alex@example.com.
    ```
  </Accordion>

  <Accordion title="Manage audiences and subscribers" icon="users">
    ```text theme={null}
    Add sarah@example.com to our 'Beta Testers' audience segment with the tag 'vip'.
    ```
  </Accordion>

  <Accordion title="Check domain DNS and authentication" icon="shield-check">
    ```text theme={null}
    Show the SPF, DKIM, and DMARC verification status for yourdomain.com.
    ```
  </Accordion>
</AccordionGroup>

***

## Interactive Debugging (MCP Inspector)

If you'd like to test tools and inspect parameters in a graphical browser interface outside your editor:

```bash theme={null}
MAILOFLY_API_KEY=mf_live_your_api_key npx @modelcontextprotocol/inspector npx -y @mailofly/mcp
```

*(On Windows PowerShell):*

```powershell theme={null}
$env:MAILOFLY_API_KEY="mf_live_your_api_key"; npx @modelcontextprotocol/inspector npx -y @mailofly/mcp
```

This launches the official web-based MCP Inspector, allowing you to manually trigger tools, preview resource payloads, and inspect schema responses.

***

## Next Steps

<CardGroup cols={3}>
  <Card title="Client Setup" icon="desktop" href="/mcp-server/clients">
    Detailed configuration instructions for Cursor, Claude, Antigravity, Windsurf, Zed, and Cline.
  </Card>

  <Card title="Available Tools" icon="wrench" href="/mcp-server/tools">
    Explore all 19 tools with parameter references and practical prompt examples.
  </Card>

  <Card title="MCP Resources" icon="database" href="/mcp-server/resources">
    Understand how AI assistants use live URI resources for automatic context grounding.
  </Card>
</CardGroup>


## Related topics

- [MCP Server](/mcp-server/introduction.md)
- [MCP Server Guides](/guides/ai/mcp-ai-guides.md)
- [Supabase Quickstart](/guides/tutorials/supabase-quickstart.md)
- [Introduction](/introduction.md)
- [Examples](/examples/index.md)
