Add email capabilities to Emacs through MCP. Integrate MultiMail with gptel or ellm for AI-assisted email within your Emacs workflow.
Emacs users can integrate MultiMail's MCP server through packages like mcp.el, bringing AI-powered email tools into the Emacs ecosystem. Combined with AI packages like gptel or ellm, you get a fully Emacs-native AI assistant that can send emails, manage inboxes, and handle contacts.
Configuration is done in Emacs Lisp within your init.el file. The mcp.el package handles the stdio transport protocol, connecting to the MultiMail MCP server and making its tools available to your AI assistant package. This fits naturally into the Emacs tradition of extending the editor to handle every task.
For Emacs users who already manage email through mu4e, notmuch, or Gnus, MultiMail adds a complementary AI agent layer. Your agent gets its own mailbox with oversight controls, separate from your personal email, letting AI handle operational email while your existing Emacs mail setup remains untouched.
Sign up at multimail.dev and create an API key from your dashboard. This key authenticates all MCP server requests.
Install the mcp.el package via your preferred package manager (use-package, straight.el, or package.el). This provides the MCP client protocol implementation for Emacs.
Install gptel, ellm, or another Emacs AI package that supports tool use. This provides the conversational interface for interacting with MCP tools.
Add the MultiMail MCP server configuration to your Emacs init file.
(use-package mcp
:config
(mcp-add-server "multimail"
:command "npx"
:args '("-y" "@multimail/mcp-server")
:env '(("MULTIMAIL_API_KEY" . "mm_live_your_key_here"))))In the MultiMail dashboard, create a mailbox for your Emacs AI assistant. Start with gated_send oversight mode so outbound emails require your approval.
Start a conversation with your AI assistant and ask it to list your MultiMail mailboxes. You can also check the *mcp* buffer for connection status and debug output.
| Tool | Description | Example |
|---|---|---|
| send_email | Send an email from your agent mailbox to any recipient. | Send meeting notes captured in org-mode to all attendees. |
| reply_email | Reply to a received email, maintaining the thread context. | Reply to a patch review email with your analysis from the code buffer. |
| check_inbox | Check a mailbox for new or unread messages. | Check for new emails during a break from your editing session. |
| read_email | Read the full content of a specific email including headers and body. | Read a task assignment email before creating org-mode TODOs from it. |
| create_mailbox | Create a new agent mailbox on your MultiMail account. | Create a mailbox for automated org-mode report distribution. |
| list_mailboxes | List all mailboxes on your MultiMail account. | View available mailboxes before choosing a sender address. |
| get_thread | Retrieve an entire email thread to see the full conversation history. | Review a project discussion thread before drafting a response. |
| search_contacts | Search your contact list by name, email, or tags. | Find a colleague's email to send them an exported org-mode document. |
| add_contact | Add a new contact to your MultiMail contact list. | Save a new collaborator's email from a received message. |
| tag_email | Tag or categorize an email for organization and filtering. | Tag emails by project name, matching your org-mode project structure. |
| list_pending | List all emails currently awaiting human approval. | Review pending outbound emails before approving them. |
| decide_email | Approve or reject a pending email in the oversight queue. | Approve a weekly report email after verifying the content. |
(use-package mcp
:config
(mcp-add-server "multimail"
:command "npx"
:args '("-y" "@multimail/mcp-server")
:env '(("MULTIMAIL_API_KEY" . "mm_live_your_key_here"))))Add this to your init.el to configure MultiMail with mcp.el.
(use-package mcp
:config
(mcp-add-server "multimail"
:command "npx"
:args '("-y" "@multimail/mcp-server")
:env `(("MULTIMAIL_API_KEY" . ,(getenv "MULTIMAIL_API_KEY")))))Use an environment variable instead of hardcoding the API key.
Take the meeting notes from the current org-mode buffer, format them as a clean email summary with action items highlighted, and send it to [email protected] with the subject 'Meeting Notes - Sprint Planning'.Ask the AI assistant to convert org-mode content into an email.
(use-package gptel
:config
(setq gptel-tools (mcp-get-tools "multimail")))Configure gptel to use MCP tools for email operations.
Emacs has a built-in secrets management system via auth-sources. Store your MultiMail API key in ~/.authinfo.gpg and retrieve it with (auth-source-pick-first-password :host "multimail.dev") instead of hardcoding it in init.el.
If you already use mu4e, notmuch, or Gnus for personal email, MultiMail adds a separate AI-operated mailbox. Your agent handles operational email (notifications, automated replies) while your existing setup handles personal correspondence.
Emacs excels at org-mode. Ask your AI assistant to read emails and create org-mode TODO items, or convert org-mode meeting notes into formatted emails. The combination of structured org-mode content and MultiMail's email tools is powerful.
If the MCP server fails to connect, check the *mcp* buffer in Emacs for error messages and debug output. This buffer shows the raw stdio communication, making it easy to diagnose configuration issues.
Email infrastructure built for AI agents. Verifiable identity, graduated oversight, and a 38-tool MCP server. Formally verified in Lean 4.