loading…
Search for a command to run...
loading…
Self-hosted MCP server for any IMAP/SMTP inbox. Multi-account in one config. Built for Claude Code.
Self-hosted MCP server for any IMAP/SMTP inbox. Multi-account in one config. Built for Claude Code.
Self-hosted MCP server for IMAP and SMTP. Multi-account in one config. Built for Claude Code and any MCP-compliant client.
Buy on Gumroad — $49 · Landing page · Provider config docs
This is the public face of mcp-email, a paid product from OneShotForge. The source code lives in the paid bundle sold on Gumroad. This repo contains:
If you're shopping: this is enough to decide whether mcp-email fits your setup. The buy link is at the top.
If you've already purchased: the full TypeScript source, Docker setup, build configs, and complete installation guide are in the zip you received after checkout.
Anthropic's MCP spec lets agents talk to your tools. Email is the most-asked tool. But the existing "MCP email" servers I tried either lock you to Gmail, demand an OAuth setup that takes an afternoon, or break the moment you point them at a second account.
mcp-email is the one I built for myself after that triage. I sell it because it now solves a problem cleanly enough that I'd rather get paid to maintain it than maintain it for free.
What's different:
account argument. One server instance speaks to all of them.npm or in Docker. Bearer-token auth on the MCP endpoint. No telemetry, no SaaS proxy..env file — no OAuth dance, no service account JSON, no Google Cloud project. Generate app passwords on the provider side, drop them in, done.After checkout on Gumroad, you download a single zip containing:
@modelcontextprotocol/sdk, imapflow, nodemailer).env.example with the full template and inline commentsApproximate first-tool-call time after checkout: 5 minutes if your provider's app password is already generated.
I run on Hostinger and Gmail daily. Setup is documented and tested for the others.
| Provider | Authentication | IMAP host | SMTP host | Notes |
|---|---|---|---|---|
| Hostinger | Mailbox password | imap.hostinger.com:993 |
smtp.hostinger.com:465 |
What I use for [email protected]. 10/10 on mail-tester.com. |
| Gmail / Workspace | App password | imap.gmail.com:993 |
smtp.gmail.com:465 |
Enable 2FA first. Workspace admins can disable IMAP at the org level. |
| Fastmail | App password | imap.fastmail.com:993 |
smtp.fastmail.com:465 |
Clean implementation, no surprises. |
| iCloud Mail | App-specific password | imap.mail.me.com:993 |
smtp.mail.me.com:587 |
SMTP on 587/STARTTLS. |
| Outlook 365 | App password | outlook.office365.com:993 |
smtp.office365.com:587 |
Some tenants disable SMTP AUTH. Personal accounts always work. |
| Proton Mail | Via Proton Bridge | 127.0.0.1:1143 |
127.0.0.1:1025 |
Bridge must be running locally. |
| Yahoo Mail | App password | imap.mail.yahoo.com:993 |
smtp.mail.yahoo.com:465 |
App password under account security. |
| Zoho Mail | App password (or normal) | imap.zoho.eu:993 / .com |
smtp.zoho.eu:465 / .com |
EU vs US tenants use different hosts. |
| Generic | App password or normal | depends | depends | Anything RFC-compliant works. |
Full per-provider setup in docs/CONFIG.md.
All tools take an account parameter — the ID you declared in .env. Folders default to INBOX where applicable.
| Tool | Purpose |
|---|---|
email_list_folders |
List all IMAP folders with unread counts |
email_list_messages |
List messages in a folder with pagination and unseen filter |
email_search_messages |
Search by sender, subject, body, date, or has-attachment |
email_get_message |
Full message body (text + HTML + attachment metadata) by UID |
email_get_attachment |
Fetch an attachment's content (UTF-8 or base64) |
email_get_thread |
Reconstruct a conversation thread from Message-ID / In-Reply-To / References |
| Tool | Purpose |
|---|---|
email_send_message |
Send via SMTP, append a copy to Sent folder via IMAP |
email_create_draft |
Create a draft in the Drafts folder |
| Tool | Purpose |
|---|---|
email_move_message |
Move a message to another folder |
email_copy_message |
Copy a message to another folder |
email_delete_message |
Move to Trash (default) or \Deleted + expunge |
email_mark_message |
Set or unset \Seen / \Flagged / \Answered flags |
email_create_folder |
Create an IMAP folder |
email_rename_folder |
Rename an IMAP folder |
email_delete_folder |
Delete an IMAP folder |
After install (covered in the zip), add this to your project .mcp.json or ~/.claude.json global:
{
"mcpServers": {
"email": {
"type": "http",
"url": "http://localhost:3000/mcp",
"headers": {
"Authorization": "Bearer YOUR_MCP_AUTH_TOKEN"
}
}
}
}
Restart Claude Code (/mcp to verify the server is connected), then try:
"List my last 5 unread emails in account
main."
Or, for advanced usage with multi-account:
"Search account
supportfor unanswered messages from[email protected]in the last 7 days, summarize them, and draft a reply in accountmain."
$49 one-time. Perpetual commercial license, unlimited business use, no recurring fee.
Same-day refund if it doesn't fit your setup. Email [email protected] within 24 hours of buying and I'll process it (next morning if I'm asleep when you write).
INBOX, Sent, Drafts, Trash. Servers with prefixes like INBOX.Sent are handled with a fallback. Custom names require small code changes.email_get_message. The text body is always sent in full.SENT_FOLDER / DRAFTS_FOLDER / TRASH_FOLDER env overrides per accountVote with email — what do you want next? [email protected].
Commercial license — see LICENSE.
TL;DR: unlimited personal and business use after purchase, no resale or redistribution of the source.
[email protected] with a clear repro.Built by OneShotForge.
Run in your terminal:
claude mcp add mcp-email -- npx