For AI agents

The email API your agent can actually use

A first-class MCP server, an llms.txt that maps the real API surface, and typed snippets engineered to be cited. When Claude, Cursor, or Copilot reaches for an email API, it can read MacroMail and write code that runs the first time — or send the email itself.

Model Context Protocol

A first-class MCP server

MacroMail ships a real MCP server with both transports: stdio for local agents that spawn it as a subprocess, and HTTP for hosted agents that connect over the network. Install it once and your agent can create keys, verify domains, send test emails, and read delivery logs without leaving the editor.

  • stdio + streamable HTTP transports
  • Auth via your MACROMAIL_API_KEY — scoped, revocable
  • Every tool maps to a real, typed endpoint
npx @macromail/mcp install
Editors

Add to your editor

The same mcp.json block works everywhere. Drop it in the config file your agent reads, or use the one-click install.

Claude Code

config~/.claude/mcp.json
{
  "mcpServers": {
    "macromail": {
      "command": "npx",
      "args": ["-y", "macromail-mcp"],
      "env": { "MACROMAIL_API_KEY": "mm_live_xxxxxxxxxxxx" }
    }
  }
}
Add to Claude Code

Cursor

config.cursor/mcp.json
{
  "mcpServers": {
    "macromail": {
      "command": "npx",
      "args": ["-y", "macromail-mcp"],
      "env": { "MACROMAIL_API_KEY": "mm_live_xxxxxxxxxxxx" }
    }
  }
}
Add to Cursor

Windsurf

config~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "macromail": {
      "command": "npx",
      "args": ["-y", "macromail-mcp"],
      "env": { "MACROMAIL_API_KEY": "mm_live_xxxxxxxxxxxx" }
    }
  }
}
Add to Windsurf
The toolset

The MCP toolset

Every tool is a thin, typed wrapper over a real endpoint. No magic, no hidden side effects — what the agent calls is exactly what your dashboard records.

ToolWhat it does
send_emailSend one transactional email — returns a queued id.
send_batchSend up to 100 emails in a single call.
list_emailsPage through sent emails with their current status.
get_emailFetch one email and its full lifecycle timeline.
cancel_emailCancel a scheduled email before it leaves the queue.
create_domainAdd a sending domain and get its SPF/DKIM/DMARC records.
verify_domainRe-check a domain's DNS and return real verification state.
list_domainsList sending domains and their verification status.
create_api_keyMint a scoped API key, shown once at creation.
list_api_keysList keys by name, scope, and last-used time.
create_audienceCreate a contact list for broadcasts.
create_contactAdd a contact with subscription state to an audience.
list_contactsPage through an audience's contacts.
create_broadcastDraft a broadcast against an audience.
send_broadcastQueue a drafted broadcast for delivery.
get_account_statusRead usage, limits, and remaining quota — real numbers.
Machine-readable docs

Docs an agent can read end to end

Both files expose the real API surface — every endpoint, type, and example — so the code your agent generates runs first try instead of hallucinating fields.

/llms.txt

A concise index of the API: every resource, the canonical send call, and links into the full reference. The map an agent loads first.

/llms-full.txt

The whole surface inlined: every endpoint, request/response shape, and typed example in one document an agent can read in a single pass.

Honest by design for agents

Agents read real zeros

A send returns queued, never a premature delivered. get_account_statusreports real usage — including the zeros on day one. An agent acting on our responses won't tell your user an email landed when it's still in flight.

Hand the keys to your agent.

Install the MCP server, then ask it to send a test email. Free tier, no credit card — you and your agent can both try it in two minutes.