jxa-mail-mcp
v0.4.0Fast MCP server for Apple Mail with FTS5 search index
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_accounts
List all configured email accounts in Apple Mail. Returns: List of account dictionaries with 'name' and 'id' fields. Example: >>> list_accounts() [{"name": "Work", "id": "abc123"}, {"name": "Personal", "id": "def456"}]
list_mailboxes
List all mailboxes for an email account.
| Parameter | Type | Description |
|---|---|---|
account | Account name. Uses JXA_MAIL_DEFAULT_ACCOUNT env var or first account if not specified. |
get_emails
Get emails from a mailbox with optional filtering. Retrieves emails with standard properties: id, subject, sender, date_received, read status, and flagged status.
| Parameter | Type | Description |
|---|---|---|
account | Account name. Uses JXA_MAIL_DEFAULT_ACCOUNT env var or first account if not specified. | |
filter | string | Filter type: - "all": All emails (default) - "unread": Only unread emails - "flagged": Only flagged emails - "today": Emails received today - "this_week": Emails received in the last 7 days |
limit | integer | Maximum number of emails to return (default: 50) |
mailbox | Mailbox name. Uses JXA_MAIL_DEFAULT_MAILBOX env var or "Inbox" if not specified. |
get_email
Get a single email with full content. Retrieves complete email details including the full body text. Use this after finding an email via search to read its content.
| Parameter | Type | Description |
|---|---|---|
message_id * | integer | The email's unique ID (from search results) |
account | Account name (optional, helps find message faster) | |
mailbox | Mailbox name (optional, helps find message faster) |
search
Search emails with automatic FTS5 optimization. Uses the FTS5 index for fast search (~2ms) when available. Falls back to JXA-based search if no index exists.
| Parameter | Type | Description |
|---|---|---|
query * | string | Search term or phrase |
account | Account name (optional filter) | |
limit | integer | Maximum results (default: 20) |
mailbox | Mailbox name (optional filter) | |
scope | string | Where to search: - "all": Search subject, sender, AND body (default, uses FTS5) - "subject": Search subject only - "sender": Search sender only - "body": Search body content only |