aydu-mail-mcp
Provides draft composition and optional sending for a single GoDaddy (Professional Email/Workspace Email) mailbox over IMAP/SMTP, using GoDaddy's servers as secure defaults. Agents can build valid multipart HTML+plain-text UTF-8 messages and append them to the Drafts folder for human review, and — only when explicitly enabled — deliver the same message over SMTP, plus check IMAP connectivity and report the drafts mailbox.
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., "@aydu-mail-mcp Draft an email to diana@example.com about the invoice and save it — don't send."
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.
aydu-mail-mcp
A minimal Model Context Protocol server for a single IMAP/SMTP mailbox.
It does two things well:
save_draft— prepares a message with correct MIME (HTML plus a plain-text alternative, both UTF-8) and appends it to the account'sDraftsfolder.send_email— sends over SMTP. Off by default. See Sending is opt-in.
That asymmetry is the design. Most email MCP servers treat compose and send as one capability, which means an agent that can write a message can also deliver it. Here they are separate tools, and the destructive one does not exist unless you ask for it.
Why this exists
I audited the popular email MCP servers for a job that only needed drafts. None fit:
Server | Saves drafts | Correct HTML + UTF-8 | Notes |
| yes | no | builds headers by hand: no |
| no | n/a | compose means send; no draft path |
| no | yes | excellent engineering, but zero draft support |
Drafts are the interesting case: a human reviews the message in their real mail client before anything leaves the building. So this server does that one thing properly by handing the message to Nodemailer's MailComposer, then APPENDing it with the \Draft flag — and exposes sending separately, behind an explicit opt-in.
Related MCP server: MailBridge MCP
Tools
Tool | Available | Purpose |
| always | Builds a |
| always | Verifies IMAP connectivity and reports which mailbox would receive drafts |
| only when | Sends the same validated message over SMTP |
When sending is not enabled the send_email tool is not registered at all — it does not appear in tools/list, so a client cannot call it and an agent never sees it. This is a capability boundary, not a guard clause.
Sending is opt-in
AYDU_MAIL_ALLOW_SEND=true # register send_emailWithout it, drafting is the only write path. Enable it when you actually want an agent to deliver mail.
send_email is irreversible outbound mail. If your workflow requires a human to press send, leave the variable unset and use save_draft.
Requirements
Node.js 20 or newer
An IMAP account with a
Draftsfolder (any provider)Optional:
secret-tool(libsecret) if you want the launcher to read the password from your OS keyring
Install
git clone https://github.com/rafaga2469/aydu-mail-mcp.git
cd aydu-mail-mcp
npm installConfiguration
Everything comes from the environment. Nothing is read from a config file.
Variable | Required | Default | Description |
| yes | — | Full mailbox address; used as IMAP/SMTP user and as |
| yes | — | Mailbox password or app password |
| no | unset (off) | Set truthy ( |
| no |
| IMAP host |
| no |
| IMAP port |
| no |
| Set |
| no |
| SMTP host |
| no |
| SMTP port |
| no |
| Set |
The defaults target GoDaddy (Professional Email / Workspace Email), which is what this was first written for. Point them anywhere: Gmail with an app password, Fastmail, a corporate relay.
A non-numeric port falls back to the default rather than producing NaN.
Keeping the password out of config files
MCP client configs are frequently plain text and frequently committed. The bundled launcher reads the password from the OS keyring instead:
secret-tool store --label='mailbox' service aydu-mail account you@example.comA password supplied through AYDU_MAIL_PASS takes precedence, which keeps the launcher usable from a shell, CI job, or systemd unit.
MCP client setup
{
"mcpServers": {
"mail": {
"command": "/absolute/path/to/aydu-mail-mcp/bin/aydu-mail-mcp",
"args": []
}
}
}Or skip the launcher and pass the environment directly:
{
"mcpServers": {
"mail": {
"command": "node",
"args": ["/absolute/path/to/aydu-mail-mcp/src/server.mjs"],
"env": {
"AYDU_MAIL_USER": "you@example.com",
"AYDU_MAIL_PASS": "app-password"
}
}
}
}Usage
Draft the message and let a human send it:
Draft the delivery email to diana@example.com with subject "Delivery final" and save it as a draft — don't send it.
save_draft returns the mailbox path and server-assigned UID:
{
"saved": true,
"mailbox": "Drafts",
"uid": 4212,
"to": "diana@example.com",
"subject": "Delivery final"
}With AYDU_MAIL_ALLOW_SEND=true, send_email returns delivery facts instead:
{
"sent": true,
"messageId": "<...@example.com>",
"accepted": ["diana@example.com"],
"to": "diana@example.com",
"subject": "Delivery final"
}Security notes
Send is a separate, opt-in capability. Not a flag inside a compose tool: the tool is absent unless enabled.
Header injection is rejected. Any
\r,\n, or NUL in a header value fails withDraftInputErrorbefore a message is built, so a crafted subject cannot injectBcc:or rewrite the envelope.Recipients are validated against an address pattern; malformed addresses are refused rather than passed through.
Send reuses the drafted bytes.
send_emailbuilds the message with the same validated code path and sends it asraw, so the delivered bytes match what a draft would have contained.Passwords are redacted from error messages, so a failed connection never echoes a credential into an agent transcript.
Connections are always closed, including on error paths.
See SECURITY.md for how to report a vulnerability.
Tests
npm testCovers MIME structure, UTF-8 handling, accent round-tripping, configuration defaults, the send opt-in rule, and rejection of header-injection attempts. No mail server required.
Limitations
One mailbox per process. Run separate instances for separate accounts.
Plain-text and HTML bodies only; no attachments yet.
Drafts are appended, never edited. Re-drafting the same message creates a second draft.
send_emaildoes not thread replies (noIn-Reply-To/References).
Contributing
See CONTRIBUTING.md. By participating you agree to the Code of Conduct.
License
MIT — see LICENSE. Every source file carries an SPDX identifier.
Available Tools
2 toolscheck_connectionA
Verify IMAP connectivity and report which mailbox would receive drafts. Sends nothing.
Inputs: no named parameters.
save_draftA
Save an email as a draft in the account's Drafts folder. It does not send: a human reviews and sends it. Provide both an HTML body and a plain-text alternative.
Inputs: to (required), html (required), text (required), subject (required), +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools serve entirely different purposes: one writes a draft, the other checks IMAP connectivity. There is no plausible way to confuse them, and the descriptions reinforce the boundary.
Both names follow a consistent snake_case verb_noun pattern (save_draft, check_connection). No mixing of conventions.
Two tools is on the thin side for a mail server; the surface is narrowly scoped to drafting. It works for the stated purpose but feels sparse.
The stated domain is draft handling, yet there is no way to list, retrieve, update, or delete drafts, only to save and verify connectivity. Notable gaps exist even within the narrow scope.
Maintenance
Related MCP Connectors
Give an agent its own inbox: send, receive, and pull signup codes from real email.
Gmail, Outlook, iCloud, Fastmail and any IMAP mailbox for your agent. Scoped OAuth, approved sends.
Safe email for AI agents: a mailbox with inbound scanning, outbound checks and human review.
Let AI agents send email from your own Gmail, Microsoft 365 or SMTP inbox, with guardrails.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to run real email operations across multiple IMAP/SMTP and provider OAuth accounts — syncing, searching, reading, drafting, attaching, and sending mail — while requiring explicit human approval for sending, deleting, or forwarding and recording an inspectable audit trail.319,330 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables AI clients to search and read IMAP email, extract bounded attachments, and prepare and safely send SMTP messages with local previews and confirmation. It also generates client configurations and optional background-service files while keeping credentials on the host.MIT
- AlicenseAqualityBmaintenanceEnables MCP clients to manage multiple IMAP/SMTP mailboxes by listing folders, searching and reading messages, preparing Markdown drafts and replies, and sending only a draft the user has reviewed and confirmed.973 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables AI clients to search and read several IMAP mailboxes without altering them, place reply drafts in Drafts folders, and request sends that go out only after the owner approves each frozen message on a confirmation page.1Apache 2.0