mail-mcp
Provides tools for searching, reading mail, and creating/updating/deleting drafts with HTML and attachments for Thunderbird email workflows.
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., "@mail-mcpsearch my inbox for recent emails from Alice"
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.
mailbox
Built on davidvornholt/standards.
mailbox is a command-line tool for AI agents to search, read, and draft email in IMAP accounts. It works with any IMAP server that accepts a password or app password, and with Outlook.com and Microsoft 365 accounts through Microsoft sign-in. It never sends mail: drafts go to the account's drafts folder, where you review and send them from your mail client.
Install
bun install
just installThis builds a standalone binary to ~/.local/bin/mailbox and installs the agent skill to ~/.agents/skills/mailbox, where Codex and Claude Code find it. Run it again after pulling changes.
Related MCP server: imap-mcp
Configure
Copy apps/cli/accounts.example.toml to ~/.config/mailbox/accounts.toml (or set MAILBOX_CONFIG) and add one [[accounts]] block per account. Then log in to each account and check that it works:
mailbox login
mailbox statusmailbox login checks each login against the server before storing it under the keyring service mailbox. On Linux this needs a running Secret Service provider such as gnome-keyring.
Outlook and Microsoft 365
Microsoft does not accept passwords over IMAP, so these accounts need auth = "microsoft" and host = "outlook.office365.com". mailbox login then shows a code to enter at Microsoft's sign-in page in any browser and stores the resulting refresh token instead of a password. Each command trades it for a short-lived access token, and a sign-in lasts until Microsoft revokes it or it goes 90 days unused.
mailbox uses Mozilla Thunderbird's public app ID, so Microsoft's consent screen asks you to allow Thunderbird. Work or school tenants can block IMAP, device code sign-in, or apps that an administrator has not approved; in that case, ask the administrator.
Use
Run mailbox --help for the commands and mailbox <command> --help for their options. The skill in apps/cli/skills/mailbox tells agents how to draft and reply.
Develop
bun run check runs the standards drift check, lint, type checks, tests, and the build. It must pass before a change is done. Run the command from source with bun apps/cli/src/app/cli.ts.
License
MIT © David Vornholt
This server cannot be deployed
Maintenance
Related MCP Connectors
Your IMAP mailbox as an MCP server: read, search and (if you allow it) organize mail. Open source.
Email infrastructure for AI agents — send, receive, search, and reply to email over MCP.
A MCP server for Gmail that lets you search, read, and draft emails and replies.
Manage Gmail end-to-end: search, read, send, draft, label, and organize threads. Automate workflow…
Related MCP Servers
- FlicenseAqualityFmaintenanceA lightweight MCP server for interacting with IMAP email accounts to read messages, manage folders, and compose draft replies. It supports standard providers and local bridges, providing tools for searching, fetching attachments, and organizing mailboxes without the ability to send or delete emails.1910-
- FlicenseNot gradedqualityDmaintenanceAn IMAP client MCP server for reading mail from Dovecot or Synology MailPlus mailboxes, with optional webhook triggers for new messages. It provides tools for managing emails and automates workflows by firing webhooks when matching messages arrive.-
- AlicenseBqualityCmaintenanceUniversal IMAP/SMTP MCP server that works with any email provider, providing tools to read, search, send, and manage emails.10242 npm1MIT
- AlicenseAqualityCmaintenanceA high-fidelity IMAP/SMTP MCP server that enables reading, searching, and sending emails from providers like iCloud and Gmail, handling real-world IMAP quirks automatically.151MIT