macos-mail-draft-mcp
Allows creating email drafts in the macOS Mail app, supporting recipients, subject, body, attachments, sender selection, and optional compose window opening.
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., "@macos-mail-draft-mcpdraft an email to jane@example.com with subject 'Meeting' and body 'See you at 3pm'"
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.
macos-mail-draft-mcp
An MCP (Model Context Protocol) server that creates email drafts in the macOS
Mail app. The server itself runs locally: it drives Mail.app through AppleScript
(osascript), opens no network services of its own, and handles no credentials
— it never sends an email. Note, however, that Mail owns the draft once it is
saved: if the target account is an IMAP, Exchange, or Gmail account (anything
other than "On My Mac"), Mail syncs the draft — including its body and
attachments — to that account's mail server, just as it would for any draft you
create by hand.
Requirements
macOS with Mail.app configured with at least one account
Node.js >= 24 (runs the TypeScript source directly — there is no build step and no compiled artifacts;
erasableSyntaxOnlykeeps the source type-strippable)
Related MCP server: Mailbridge for Apple Mail
Setup
npm installRegister with Claude Code
claude mcp add macos-mail-draft -- node /absolute/path/to/macos-mail-draft-mcp/src/index.tsRegister with Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"macos-mail-draft": {
"command": "node",
"args": ["/absolute/path/to/macos-mail-draft-mcp/src/index.ts"]
}
}
}Automation permission
The first time a draft is created, macOS asks the host application (your terminal, Claude Desktop, etc.) for permission to control Mail. If a call fails with "Not authorized to send Apple events", grant access under System Settings > Privacy & Security > Automation.
Tool: create_mail_draft
Creates a draft in Mail's Drafts mailbox. No email is sent. If the draft is saved to a synced account (IMAP / Exchange / Gmail), Mail uploads it to that account's Drafts mailbox on the remote server.
Parameter | Type | Required | Description |
| array of address strings or | yes | Primary recipients |
| string | yes | Subject line |
| string | yes | Plain-text body |
| same shape as | no | CC / BCC recipients |
| array of absolute POSIX paths | no | Files to attach (a leading |
| email address | no | Account address to send from; defaults to Mail's default account |
| boolean | no | Open the draft in a compose window and bring Mail to the front (default on); |
Example call:
{
"to": [{ "address": "someone@example.com", "name": "Someone" }],
"subject": "Quarterly report",
"body": "Hi,\n\nDraft attached.\n\nJason",
"attachments": ["~/Documents/report.pdf"]
}Development
npm run dev # run the server from source (tsx)
npm run check # typecheck + lint + format check + tests
npm run test:watch # vitest in watch modeThe AppleScript is generated from validated (zod) input, and every interpolated value is escaped for AppleScript string literals, so recipient names, subjects and bodies cannot break out into script code. Attachment paths are checked to be existing regular files before any script runs.
Known Mail quirks
Mail silently drops attachments if a draft is saved in the same instant they are added, so the generated script waits one second before saving.
After saving, the invisible compose session is closed (
close ... saving no) so windows don't accumulate. Mail may still keep an inert entry in its scriptingoutgoing messageslist until it is next restarted; this is harmless and invisible.Rich text (HTML) bodies are not supported in v1: Mail's AppleScript dictionary cannot set HTML content on an outgoing message, and the available workarounds require GUI scripting via the clipboard.
This server cannot be deployed
Maintenance
Related MCP Connectors
Manage Gmail end-to-end: search, read, send, draft, label, and organize threads. Automate workflow…
Manage Gmail messages, threads, labels, drafts, and settings from your workflows. Send and organiz…
Your agent needs a mailbox of its own — to receive, thread, draft and send, with attachments, without borrowing your personal inbox or your company's SMTP. **What you can ask for** • "Create an inbox for this agent and tell me its address." • "Read the new messages in this thread and draft a reply." • "Send this message with the attachment and wait for the response." • "Search this inbox for everything from that domain." • "Show delivery metrics and the events on this inbox." **How to use it** Point any MCP client at https://mcp.aisa.one/mail/mcp and sign in with OAuth — there is no key to create or paste. 49 tools: create and delete inboxes, list and read messages, raw message bodies, attachments, threads, drafts and draft attachments, send and reply, message search, inbox events, metrics, and list entries — reads and writes. **Why this rather than the source** A real inbox an agent owns, rather than an SMTP credential it borrows from a human. **It is also a door to the rest** The same login reaches 26 sources and 580+ operations. Find the contact elsewhere in the catalogue, then write to them from here — without adding a second server. **What it costs** Finding and inspecting an operation is free. Running one is billed per call at API prices, with no seat and no monthly minimum, and every call takes max_price_usd so an agent cannot overspend by accident. **Where else it reaches** https://mcp.aisa.one/sales/mcp finds the person to write to.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables integration with Apple Mail on macOS using JavaScript for Automation (JXA). Supports reading, searching, sending, and managing emails across multiple accounts with full mailbox hierarchy support.5-
- AlicenseNot gradedqualityAmaintenanceEnables using Apple Mail accounts to search, read, manage, draft, and send messages from Codex or Claude Code locally.MIT
- AlicenseAqualityAmaintenanceGives Claude (or any LLM) full control over Apple Mail — read, search, compose, reply, move, flag, and delete messages — via AppleScript on your local machine, with no cloud intermediary.2231 npm2MIT
- AlicenseAqualityBmaintenanceEnables macOS users to programmatically read, send, search, and manage Apple Mail messages, including drafts, mailboxes, attachments, rules, and templates.25MIT