Skip to main content
Glama

MCP Apple Mail

by LionSR

MCP Apple Mail Desktop Extension

A desktop extension for Claude that provides seamless Apple Mail integration through the Model Context Protocol (MCP) using JXA (JavaScript for Automation).

Features

No String Parsing - Uses JXA to return native JavaScript objects 🎯 Type-Safe - Full TypeScript support with interfaces 📧 Complete Mail Support - Read, search, send, manage emails 🔐 Account-Specific Sending - Send from any configured account 📁 Hierarchical Mailboxes - Full mailbox tree structure support

Installation

  1. Download the apple-mail.mcpb extension package
  2. Double-click to install in Claude Desktop
  3. Configure your preferences in the Claude Desktop settings

Manual Installation

For development or manual setup:

# Clone the repository git clone https://github.com/LionSR/mcp-apple-mail cd mcp-apple-mail # Install dependencies npm install # Build the extension npm run build # Create the MCPB package npm run pack

Then add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json):

{ "mcpServers": { "apple-mail": { "command": "node", "args": ["/path/to/mcp-apple/dist/index.js"], "env": { "MAIL_ENABLED_ACCOUNTS": "${user_config.enabled_accounts}", "MAIL_DISABLED_ACCOUNTS": "${user_config.disabled_accounts}", "MAIL_SEARCH_DEFAULT_LIMIT": "${user_config.search_limit}", "MAIL_PRIORITY_MAILBOXES": "${user_config.priority_mailboxes}", "MAIL_JXA_TIMEOUT": "${user_config.jxa_timeout}", "MAIL_MAX_MAILBOXES_CHECK": "${user_config.max_mailboxes_check}", "MAIL_MESSAGES_PER_MAILBOX": "${user_config.messages_per_mailbox}" } } } }

Configuration

When installed as a desktop extension, you can configure the following settings through the Claude Desktop UI:

SettingDescriptionDefault
Enabled AccountsComma-separated list of account names to enableAll accounts
Disabled AccountsComma-separated list of account names to disableNone
Search LimitDefault number of results for search operations20
Priority MailboxesComma-separated list of priority mailbox namesINBOX, Sent Messages, Sent, Drafts
JXA TimeoutTimeout for JXA operations (ms)30000
Max MailboxesMaximum mailboxes to check in operations10
Messages per MailboxMessages to check per mailbox50

Note: If both MAIL_ENABLED_ACCOUNTS and MAIL_DISABLED_ACCOUNTS are specified, only accounts in the enabled list will be active.

Available Tools

mail_get_accounts

Get all configured email accounts.

mail_get_mailboxes

Get mailbox hierarchy for a specific account.

mail_get_unread

Get unread emails (with configurable limit).

Search emails by text content.

mail_get_latest

Get latest emails from a specific account.

mail_send

Send email from a specific account.

mail_mark_read

Mark emails as read by ID.

mail_delete

Delete emails by ID.

Technical Details

JXA Implementation

This implementation uses JavaScript for Automation (JXA) instead of traditional AppleScript, which provides:

  • Direct JavaScript object returns (no parsing!)
  • Clean error handling
  • Type safety with TypeScript
  • ISO date formats
  • Proper arrays and nested structures

Example Response

// getAccounts() returns: [ { name: "Work", emailAddresses: ["user@company.com"], enabled: true, id: "ABC-123-DEF" }, // ... ] // No string parsing needed!

Development

# Run in development mode npm run dev # Run tests npm run test # Build for production npm run build # Create MCPB package npm run pack

Requirements

  • macOS (for Apple Mail access)
  • Node.js 16+ and npm
  • Apple Mail configured with at least one account

License

MIT

Credits

Clean implementation without string parsing, built with JXA for maximum reliability and performance.

-
security - not tested
F
license - not found
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

Enables 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.

  1. Features
    1. Installation
      1. As a Desktop Extension (Recommended)
      2. Manual Installation
    2. Configuration
      1. Available Tools
        1. mail_get_accounts
        2. mail_get_mailboxes
        3. mail_get_unread
        4. mail_search
        5. mail_get_latest
        6. mail_send
        7. mail_mark_read
        8. mail_delete
      2. Technical Details
        1. JXA Implementation
        2. Example Response
      3. Development
        1. Requirements
          1. License
            1. Credits

              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/LionSR/mcp-apple'

              If you have feedback or need assistance with the MCP directory API, please join our Discord server