MCP examples
Worked recipes for driving MiniMailer through the MCP server: the natural-language instruction you give an agent, the tool call it produces, and what comes back. They assume the server is connected and the agent's token carries the mcp:use scope.
Every send resolves the sender from from or domain — omit from and it defaults to noreply@{domain} — and can only ever send from a domain on the authenticated account.
Send a password-reset email
You tell the agent:
Email a password-reset link to jane@example.com from our acme.com domain. Subject "Reset your password", link: https://app.acme.com/reset?t=abc123
The agent calls send-email-tool:
{ "domain": "acme.com", "from": "security@acme.com", "to": "jane@example.com", "subject": "Reset your password", "html": "<p>Reset your password with <a href=\"https://app.acme.com/reset?t=abc123\">this link</a>. It expires in 30 minutes.</p>", "text": "Reset your password: https://app.acme.com/reset?t=abc123 (expires in 30 minutes)" }
Include a text alternative on transactional mail — it helps spam filtering and accessibility. The tool returns the email's id and status; track it later with get-email-stats-tool.
Send a receipt or order confirmation
You tell the agent:
Send an order confirmation for order #4821 to customer@example.com from billing@acme.com.
The agent calls send-email-tool:
{ "from": "billing@acme.com", "to": "customer@example.com", "subject": "Your order #4821 is confirmed", "html": "<h1>Thanks for your order</h1><p>Order #4821 is confirmed and on its way.</p>", "text": "Thanks for your order. Order #4821 is confirmed and on its way." }
The domain is inferred from the from address, so passing a from on your verified acme.com domain is enough.
Reply to inbound mail an agent read
An agent that reads its own inbox can answer a message end to end.
You tell the agent:
Check the support inbox and reply to the newest question.
The agent calls list-inbound-emails-tool, then get-inbound-email-tool for the newest id to read the full message, then replies with send-email-tool:
{ "from": "support@acme.com", "to": "customer@example.org", "subject": "Re: Order question", "reply_to": "support@acme.com", "html": "<p>Thanks for reaching out — your order ships tomorrow.</p>", "agent_id": "support-bot" }
Reading inbound mail needs the inbound:read scope on the token. See Receiving.
Attribute sends to an agent
Pass agent_id on any send and MiniMailer tracks reputation for that agent specifically, surfacing it in agent.* webhooks before one misbehaving agent can drag down the rest of your sending:
{ "from": "notify@acme.com", "to": "user@example.com", "subject": "Your weekly summary", "html": "<p>Here's what happened this week.</p>", "agent_id": "weekly-digest-agent" }
Sends through MCP also carry an X-AI-Generated header by default, marking the message as AI-originated. Pass ai_disclosure: false to opt out — the header complements, and does not replace, any human-facing disclosure your use case requires. How reputation works →
Dispatch a prepared campaign
Prepare the campaign in the API or dashboard, then let an agent send it.
You tell the agent:
Send the "July product update" campaign.
The agent calls list-campaigns-tool to find the campaign id, then send-campaign-tool with it. Track the result with get-campaign-stats-tool.
Where to go next
- MCP — connect, the full tool list, and how agent sends are handled.
- Sending — the transactional attributes every send tool mirrors.
- Sender reputation — how per-agent reputation works.