Mailsac MCP Server
OfficialCreate and manage disposable Mailsac test inboxes so AI agents can receive and inspect emails your app sends.
Create unique test addresses instantly (no setup), optionally with a domain or readable prefix.
Wait for matching emails by subject, sender, or time, returning subject, text, links, actionLink, and candidate one-time codes.
List stored emails at an address, newest first.
Read one email as text (with links and codes), HTML, raw MIME, or parsed headers.
Delete one email or all emails at an address.
List private domains on the account for use with test addresses.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Mailsac MCP Server Sign up for a new account on localhost:3000 and confirm it by email."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Mailsac MCP server
The official Model Context Protocol server for Mailsac. It gives AI coding agents (Claude Code, Cursor, VS Code, Claude Desktop and other MCP clients) disposable test inboxes, so an agent can check the email your application sends: sign-up confirmations, password resets, magic links and one-time codes.
A typical conversation:
Sign up for a new account on http://localhost:3000 and confirm it by email.
The agent creates a unique address with Mailsac, fills in your sign-up form, waits for the confirmation email, follows the link, and tells you what it found. The same tools help it write and debug end-to-end tests for those flows.
Read the setup guide in the Mailsac docs or the announcement on the Mailsac blog.
Tools
Tool | What it does | Mailsac operations |
| A new unique address, e.g. | none |
| Waits until a matching email arrives (optionally by subject, sender or time), then returns the subject, text, links, the most likely confirm/reset/login link ( | 1 per check, plus 1 to read |
| Emails stored at an address, newest first. | 1 |
| One email as text (with links and codes), HTML, raw MIME or headers. | 1 |
| Delete one email, or all emails at an address. | 1 per call or message |
| Your account's private domains, to use with | 1 |
Related MCP server: agent-inbox
Set up
You need a Mailsac API key. The free plan works: create an account, then create a key.
Claude Code
claude mcp add mailsac -e MAILSAC_API_KEY=your-key -- npx -y @mailsac/mcpCursor (.cursor/mcp.json), Claude Desktop (claude_desktop_config.json) and other clients that use the
same format:
{
"mcpServers": {
"mailsac": {
"command": "npx",
"args": ["-y", "@mailsac/mcp"],
"env": { "MAILSAC_API_KEY": "your-key" }
}
}
}VS Code (.vscode/mcp.json):
{
"servers": {
"mailsac": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@mailsac/mcp"],
"env": { "MAILSAC_API_KEY": "your-key" }
}
}
}Settings
Variable | Default | Purpose |
| (required) | Your Mailsac API key |
|
| Domain for new test addresses. Set it to your private domain. |
|
| API base URL |
Public inboxes and private domains
Addresses at @mailsac.com are public: anyone who guesses an address can read its mail. They are ideal for
made-up test data and need no setup. For anything real, such as a staging environment that sends real
customer names, use a private domain: your own subdomain (for example test.example.com) or a zero-setup
yourteam.msdc.co subdomain from the domains page. Set MAILSAC_DOMAIN and every
new address uses it.
Operations and limits
Each API call uses one Mailsac operation. wait_for_email checks every 3 seconds
by default, so a message that arrives within a few seconds costs about 2 to 5 operations. The free plan
includes 1,500 operations a month; paid plans start at 25,000.
How Mailsac knows this is the MCP server
Requests from this server carry Mailsac-Client: mcp and a mailsac-mcp/<version> user agent. Mailsac
counts these in aggregate to see how many people use Mailsac through AI agents. Email content is never part of that
count.
Develop
npm install
npm test # builds, then runs the tests with a fake Mailsac API
MAILSAC_API_KEY=your-key node dist/index.js # runs the server over stdioLicense
MIT
Available Tools
6 toolscreate_test_addressCreate a test email addressA
Return a new, unique address that can receive email immediately, with nothing to set up. Use one address per test so tests never read each other's mail. Makes no API call.
Inputs: domain, prefix.
delete_emailsDelete emailsADestructive
Delete one email (messageId) or every email at an address (omit messageId). Clean up after a test.
Inputs: address (required), messageId.
list_domainsList private domainsA
List the private domains on this Mailsac account. Mail to a private domain is visible only to the account; pass one as domain to create_test_address.
Inputs: no named parameters.
list_emailsList emails at an addressA
List the emails currently stored for an address, newest first (no bodies). One operation.
Inputs: address (required).
read_emailRead an emailB
Read one email. format "text" (default) also returns links, actionLink and codes; "html" returns the HTML body; "raw" the full MIME source; "headers" the parsed headers.
Inputs: address (required), messageId (required), format.
wait_for_emailWait for an emailA
Poll an address until a matching email arrives, then return its subject, sender, text, links, the most likely confirm/reset/login link (actionLink) and candidate one-time codes. Each poll uses one Mailsac operation.
Inputs: address (required), fromContains, receivedAfter, timeoutSeconds, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Most tools have clearly distinct purposes (create address, list, read, delete, list domains). wait_for_email overlaps somewhat with list_emails/read_email since all retrieve mail, but the descriptions clarify that wait polls for arrival while the others inspect existing mail.
All six tools follow a clean snake_case verb_noun pattern (create_test_address, wait_for_email, list_emails, read_email, delete_emails, list_domains). Naming is fully predictable.
Six tightly scoped tools are ideal for a test-email service, each mapping to a distinct step in the inbox testing lifecycle. Nothing feels redundant or missing count-wise.
Covers the full receiving workflow: mint an address, await mail, list/read messages, delete for cleanup, and discover private domains. Outbound sending and message search aren't covered, but these are minor for a receive-focused testing tool.
Maintenance
Related MCP Connectors
Disposable inboxes for AI agents: create, wait for delivery, and extract email content or links.
Disposable email inboxes for AI agents: create an address, wait for mail, read OTP codes and links.
Disposable email inboxes for AI agents — read messages and verification codes.
Real email inboxes for AI agents: create inboxes, catch verification codes, extract OTPs, reply.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to create disposable email inboxes and automatically extract OTPs, magic links, and verification codes from incoming emails.10 npmMIT
- AlicenseAqualityDmaintenanceEnables AI agents to create temporary email addresses, receive confirmation emails, and extract verification links, automating sign-up and email verification workflows without manual intervention.632 npm64MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to generate temporary email addresses, receive emails, and automatically extract OTP codes and links from incoming messages for automation and testing workflows.MIT
- AlicenseAqualityCmaintenanceProvides disposable email inboxes for AI agents to automatically receive and extract OTPs and magic links, enabling seamless email verification during autonomous workflows.3345 npmMIT