Apple Mail MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| mail_list_mailboxesA | List all mailboxes/folders available in Apple Mail, grouped by account. Queries Apple Mail via AppleScript to retrieve every configured account and all mailboxes within each account (INBOX, Sent Messages, Drafts, custom folders, etc.). Strictly read-only — no emails are modified and no network calls are made. Args: params (ListMailboxesInput): Input containing: - response_format (str): 'markdown' (default) or 'json'. - include_counts (bool): Add per-mailbox message counts to help choose search scope. Slower on many-mailbox setups. Default false. Returns: str: Formatted list of all accounts and their mailboxes. Examples: - Use when: "What mailboxes do I have?" → default params - Use when: "List my email folders as JSON" → response_format="json" Error Handling: Returns an error string if Mail.app cannot be reached or there are no configured accounts. Prompts the user to open Mail.app if needed. |
| mail_search_emailsA | Search Apple Mail for emails by keyword and/or date range. Searches across all configured accounts in parallel, then merges, deduplicates and sorts the results newest-first. System/junk/duplicate-view mailboxes are excluded by default (see include_all_mailboxes). Returns matching emails with opaque email_id values for use with mail_read_email. IMPORTANT — date range strategy (always follow this order): Large date windows (since_days > 90) are slow on big IMAP accounts and frequently timeout. Always start narrow and expand only if needed: Args: params (SearchEmailsInput): Input containing: - keyword (str): Optional search term matched against subject and sender. Omit when filtering by date only. - since_days (int): Optional. Restrict to emails received in the last N days (1–365). Use 1=today, 7=week, 30=month. - limit (int): Max results to return (default 20, max 100). - account (str): Optional. Restrict to one account (e.g. 'iCloud'). - mailbox_name (str): Optional. Restrict to one mailbox (e.g. 'INBOX'). - before_days (int): Optional. Exclude emails newer than N days ago; combine with since_days to page an older window (e.g. since_days=90, before_days=30 → 30–90 days ago) without re-fetching newer results. - include_all_mailboxes (bool): Optional. Also search normally-skipped mailboxes (Trash, Junk/Spam/Bulk, Deleted Items, Gmail All Mail/ Important/Starred, Outbox). Default false. - response_format (str): 'markdown' (default) or 'json'. Returns: str: Results are merged across accounts, deduplicated by message id (Gmail label copies collapse to one), and sorted newest-first. System/junk/duplicate-view mailboxes (Trash, Deleted Items, Junk/Spam/Bulk, Gmail All Mail/Important/Starred, Outbox) are skipped unless include_all_mailboxes=true. Each result carries subject, sender, date, read-status and an opaque email_id. Timed-out accounts are listed as a warning (not a crash). Examples: - "Most recent 3 emails" → since_days=7, limit=3 (expand to 30/90 if < 3 found) - "Emails this week" → since_days=7 - "Invoices in the past month" → keyword="invoice", since_days=30 - "Find emails from Alice" → keyword="Alice", since_days=30 - "Search only Yahoo INBOX" → account="Yahoo", mailbox_name="INBOX", since_days=7 Error Handling: - Returns an error string if Mail.app cannot be reached. - Returns "No emails found" with filter description if no matches. - Accounts that exceed the 45 s per-account timeout are listed as warnings; other accounts' results are still returned. |
| mail_read_emailA | Read the full content of a specific Apple Mail email by its ID. Decodes the opaque email_id produced by mail_search_emails, locates the message in Apple Mail, and returns its complete content: subject, sender, recipients (To, CC), date received, read-status, and full body text. Strictly read-only — the message read-status is NOT changed by this call. Args: params (ReadEmailInput): Input containing: - email_id (str): Opaque ID from mail_search_emails. Required. - response_format (str): 'markdown' (default) or 'json'. Returns: str: Full email content. Examples: - Use when: "Read the email about invoices" (after searching) → pass the email_id from search results - Don't use when: You don't have an email_id yet → use mail_search_emails first Error Handling: - Returns an error if the email_id is malformed or expired. - Returns an error if the message cannot be found (e.g. deleted since search). - Returns an error if Mail.app cannot be reached. - Reads on very large mailboxes (>30k messages) can take up to a minute; the mailbox is rescanned per read. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/androidua/apple-mail-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server