Multi-account email MCP server for Gmail, IMAP, and JMAP: search, send, drafts, labels.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Give your AI tools access to your email. Search, read, send, and manage messages across multiple accounts without leaving your terminal.
mailbox-mcp is an MCP server that connects your email to Claude Code, Cursor, Windsurf, or any AI tool that supports the Model Context Protocol. Instead of switching between your terminal and Gmail, you ask the AI to find that invoice, summarize a thread, or draft a reply β and it does.
What makes this different from the 60+ other email MCP servers:
Add to your Claude Code MCP config (~/.claude.json). The package runs straight from npm via npx:
MAILBOX_MCP_PASSPHRASE is the passphrase used to encrypt IMAP/JMAP credentials at rest; it's required before adding an IMAP or JMAP account, and unused for Gmail-only setups.
Then point the config at the build with "command": "node", "args": ["/path/to/mailbox-mcp/dist/server.js"].
@gmail.com address you use to authenticate, not a workspace alias)~/.mailbox-mcp/oauth-keys.jsonIn Claude Code, run: authenticate alias="personal" provider="gmail" email="you@gmail.com"
This opens a browser window to complete the OAuth flow. Your tokens are stored locally in ~/.mailbox-mcp/accounts/.
In Claude Code, run:
Credentials are encrypted at rest using AES-256-GCM.
In Claude Code, run:
JMAP auto-discovers the API endpoint via .well-known/jmap. Credentials are encrypted at rest using AES-256-GCM.
Supported JMAP servers: Fastmail, Stalwart, Topicbox, Cyrus IMAP, and any RFC 8620-compliant server.
JMAP advantages over IMAP:
| Tool | Description |
|---|---|
list_accounts | List configured accounts |
authenticate | Add a new account |
reauth | Re-run OAuth for an existing Gmail account (use when refresh token expires with invalid_grant) |
remove_account | Remove an account |
search_emails | Search messages (optional folder to scope the search) |
multi_account_search | Run the same query across every configured account in parallel |
read_email | Read a message |
read_thread | Read a conversation thread (Gmail + JMAP) |
send_email | Send a new email (supports from, attachments) |
reply_email | Reply to a message (supports from, attachments) |
forward_email | Forward a message (supports from, attachments) |
create_draft | Create a draft (supports reply drafts via in_reply_to, plus from, attachments) |
list_drafts | List drafts for an account |
send_draft | Send an existing draft |
trash_emails | Trash messages |
mark_read | Mark a message as read or unread |
star_email | Star or unstar a message |
archive_email | Archive a message (remove from inbox) |
list_labels | List labels/folders |
create_label | Create a label/folder |
delete_label | Delete a label/folder |
modify_email | Modify message labels |
batch_modify_emails | Bulk modify labels |
bulk_modify | Add/remove labels on every message matching a query (search-then-batch; dry_run supported) |
bulk_trash | Trash every message matching a query (dry_run supported) |
list_recent_bulk_ops | List recorded bulk operations from the transaction log |
undo_bulk_op | Reverse a recorded bulk operation against the exact ids it touched |
count_unread_by_label | Show unread message counts per label/folder |
download_attachment | Download an attachment |
export_email | Save a message as a .eml file |
export_thread | Save every message in a thread as .eml files (Gmail + JMAP) |
emails_since | List messages received after a given timestamp |
inbox_summary | Inbox overview |
| Tool | Description |
|---|---|
update_draft | Replace the contents of an existing draft (thread association preserved) |
delete_draft | Permanently delete a draft |
create_filter | Create a filter |
list_filters | List filters |
delete_filter | Delete a filter |
save_template | Save a template |
list_templates | List templates |
delete_template | Delete a template |
send_template | Send from template |
get_signature | Get signature |
set_signature | Update signature |
get_vacation | Get vacation settings |
set_vacation | Configure vacation reply (supports date ranges, domain-only) |
unsubscribe | Find unsubscribe link |
bulk_unsubscribe | Bulk unsubscribe |
list_send_as | List send-as aliases |
49 tool schemas cost roughly 6,000 tokens in clients that load every definition into context. In everyday use a handful of tools do most of the work, so you can expose only the groups you need with MAILBOX_MCP_TOOLS (comma-separated). Unset means everything loads.
| Group | Tools | What it covers |
|---|---|---|
core | 19 | accounts, search, read, send, reply, forward, drafts, inbox summary (~2,900 tokens) |
organize | 9 | labels, star, archive, trash, modify |
bulk | 4 | query-wide modify/trash with dry-run and undo |
attachments | 3 | download attachments, export .eml |
gmail-extras | 14 | filters, templates, signatures, vacation, unsubscribe, send-as |
Calls to tools in disabled groups fail with an error naming the group to enable.
send_email, reply_email, forward_email, and create_draft accept an optional attachments parameter β an array of local file paths. The server reads each file, detects its MIME type from the extension, and embeds it in the outgoing message (or draft).
One account often speaks for several addresses. send_email, reply_email, forward_email, create_draft, and update_draft accept an optional from parameter; without it, the account's primary address is used.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/mailbox-mcp-2)<a href="https://allmcps.com/mcp/mailbox-mcp-2"><img src="https://allmcps.com/api/badge/mailbox-mcp-2?style=directory" alt="Mailbox MCP on AllMCPs" /></a>