# MailSlurp — how to use (mcp.ai)

Connect your MailSlurp account and use 14 tools for email straight from your AI agent. Connect with your own API key. MailSlurp provides programmable email and SMS inboxes, sending, testing, webhooks, and deliverability tools through a REST API.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_mailslurp?ms=1787293440000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `mailslurp_create_inbox`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/mailslurp`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/mailslurp/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/mailslurp/create/inbox` — Create a MailSlurp HTTP or SMTP inbox. HTTP inboxes are the default and can send and receive; SMTP inboxes are receive-only.
  - body: { name?: string, tags?: string[], prefix?: string, domain_id?: string, favourite?: boolean, expires_at?: string, expires_in?: integer, inbox_type?: string, description?: string, domain_name?: string, email_address?: string, virtual_inbox?: boolean, use_domain_pool?: boolean, use_short_address?: boolean }
- `POST https://api.mcp.ai/api/mailslurp/delete/inbox` — Permanently delete one MailSlurp inbox by UUID, including its email address and all emails it contains. This destructive action cannot be undone.
  - body: { inbox_id: string }
- `POST https://api.mcp.ai/api/mailslurp/get/account/info` — Return the connected MailSlurp account identity, state, account type, subscription type, and creation time. Use this to check account availability before attempting quota- or plan-sensitive operations
- `POST https://api.mcp.ai/api/mailslurp/get/email` — Get one fully hydrated received email by UUID, including parsed headers, body content, recipients, and attachment IDs. Fetching hydrated content may mark the email as read.
  - body: { email_id: string }
- `POST https://api.mcp.ai/api/mailslurp/get/inbox` — Get one MailSlurp inbox by UUID, including its email address, type, labels, and lifecycle state.
  - body: { inbox_id: string }
- `POST https://api.mcp.ai/api/mailslurp/list/contact/groups` — List saved MailSlurp contact groups with optional creation-time filters. Returns one page and a continuation cursor.
  - body: { size?: integer, sort?: string, since?: string, before?: string, next_cursor?: string }
- `POST https://api.mcp.ai/api/mailslurp/list/contacts` — List saved MailSlurp contacts with optional search and creation-time filters. Returns one page and a continuation cursor.
  - body: { size?: integer, sort?: string, since?: string, before?: string, search?: string, next_cursor?: string }
- `POST https://api.mcp.ai/api/mailslurp/list/domains` — List custom domains configured for the connected MailSlurp account, including identifiers, domain type, and DNS verification state.
- `POST https://api.mcp.ai/api/mailslurp/list/emails` — List received emails across the account or one selected inbox with unread, exact-search, favorite, plus-address, and time filters. Returns one page and a continuation cursor.
  - body: { size?: integer, sort?: string, since?: string, before?: string, inbox_id?: string, favourited?: boolean, next_cursor?: string, unread_only?: boolean, search_filter?: string, plus_address_id?: string }
- `POST https://api.mcp.ai/api/mailslurp/list/inboxes` — List MailSlurp inboxes with optional search, tag, type, domain, favorite, and creation-time filters. Returns one page and a continuation cursor.
  - body: { tag?: string, size?: integer, sort?: string, since?: string, before?: string, search?: string, domain_id?: string, favourite?: boolean, inbox_type?: string, next_cursor?: string }
- `POST https://api.mcp.ai/api/mailslurp/list/sent/emails` — List sent-email records, optionally filtered by source inbox, exact identifier/address search, and creation time. Returns one page and a continuation cursor.
  - body: { size?: integer, sort?: string, since?: string, before?: string, inbox_id?: string, next_cursor?: string, search_filter?: string }
- `POST https://api.mcp.ai/api/mailslurp/list/templates` — List saved MailSlurp email templates with optional creation-time filters. Returns one page and a continuation cursor without large template bodies.
  - body: { size?: integer, sort?: string, since?: string, before?: string, next_cursor?: string }
- `POST https://api.mcp.ai/api/mailslurp/send/email` — Send an email from a specific MailSlurp inbox to addresses, saved contacts, or one contact group. Supports plain text or HTML, uploaded attachment IDs, and saved templates. The legacy endpoint confirm
  - body: { cc?: string[], to?: string[], bcc?: string[], body?: string, is_html?: boolean, subject?: string, inbox_id: string, reply_to?: string, contact_ids?: string[], template_id?: string, attachment_ids?: string[], use_inbox_name?: boolean, contact_group_id?: string, add_tracking_pixel?: boolean, template_variables?: object, filter_bounced_recipients?: boolean }
- `POST https://api.mcp.ai/api/mailslurp/update/inbox` — Update an inbox's name, description, tags, expiration, or favorite status. Provide at least one field to update. The inbox email address cannot be changed.
  - body: { name?: string, tags?: string[], inbox_id: string, favourite?: boolean, expires_at?: string, description?: string }

## Example prompts
- "What can I do in MailSlurp?"
- "Show me a summary of my MailSlurp account"

## More
- Page: https://mcp.ai/mailslurp
- Agent spec (llms.txt): https://mcp.ai/mailslurp/llms.txt
- Postman collection: https://mcp.ai/mailslurp/postman.json
