Summary
Build the Apple Mail adapter as the first real-world adapter using the native-applescript transport plugin. This adapter proves out the full MCPAQL pipeline (interrogation → schema → generation) for native macOS applications.
Context
Apple Mail exposes a rich AppleScript API for reading accounts, mailboxes, messages, and message properties. It is an ideal golden path because:
- Read-heavy — Most useful operations are READ, making it safe for initial development
- Well-documented — Apple Mail's scripting dictionary is mature and stable
- Immediately useful — Email access is a high-value capability for LLM agents
- Representative — The API surface covers all CRUDE categories (read messages, create/delete rules, flag/unflag messages, etc.)
Adapter Operations
READ Operations
| Operation |
Description |
maps_to |
list_accounts |
List all configured mail accounts |
TELL Mail GET name of every account |
list_mailboxes |
List mailboxes for an account |
TELL Mail GET name of every mailbox of account {account} |
get_unread_count |
Get unread message count for a mailbox |
TELL Mail GET unread count of mailbox {mailbox} of account {account} |
list_messages |
List messages with metadata (subject, sender, date, read status) |
Parameterized with limit, offset, mailbox, account |
get_message |
Get full message content by ID |
TELL Mail GET content of message id {id} |
get_message_metadata |
Get message metadata (headers, recipients, attachments) |
Multiple property reads |
search_messages |
Search messages by subject, sender, or content |
TELL Mail GET messages whose {field} contains {query} |
UPDATE Operations
| Operation |
Description |
Danger Level |
mark_read |
Mark message as read |
safe |
mark_unread |
Mark message as unread |
safe |
flag_message |
Set flagged status |
safe |
move_message |
Move message to another mailbox |
reversible |
DELETE Operations
| Operation |
Description |
Danger Level |
delete_message |
Move message to trash |
destructive |
EXECUTE Operations
| Operation |
Description |
Danger Level |
check_mail |
Trigger new mail check |
safe |
CREATE Operations (future)
| Operation |
Description |
Danger Level |
create_outgoing_message |
Compose a new outgoing message (draft) |
reversible |
Pipeline Validation
This adapter should validate the full pipeline:
- Interrogation — Parse Mail.app's scripting dictionary (
/Applications/Mail.app/Contents/Resources/Mail.sdef) and produce a discovery bundle
- Schema Build — Build adapter schema from discovery bundle with overrides for CRUDE classification
- Generation — Generate the adapter MCP server package
- Conformance — Run conformance tests against the generated adapter
Acceptance Criteria
Dependencies
Non-Goals
- Sending email (intentionally omitted from v1 — high risk, low initial value)
- Rule management (complex, defer to v2)
- Attachment download/processing (binary handling, defer)
Summary
Build the Apple Mail adapter as the first real-world adapter using the
native-applescripttransport plugin. This adapter proves out the full MCPAQL pipeline (interrogation → schema → generation) for native macOS applications.Context
Apple Mail exposes a rich AppleScript API for reading accounts, mailboxes, messages, and message properties. It is an ideal golden path because:
Adapter Operations
READ Operations
list_accountsTELL Mail GET name of every accountlist_mailboxesTELL Mail GET name of every mailbox of account {account}get_unread_countTELL Mail GET unread count of mailbox {mailbox} of account {account}list_messagesget_messageTELL Mail GET content of message id {id}get_message_metadatasearch_messagesTELL Mail GET messages whose {field} contains {query}UPDATE Operations
mark_readmark_unreadflag_messagemove_messageDELETE Operations
delete_messageEXECUTE Operations
check_mailCREATE Operations (future)
create_outgoing_messagePipeline Validation
This adapter should validate the full pipeline:
/Applications/Mail.app/Contents/Resources/Mail.sdef) and produce a discovery bundleAcceptance Criteria
Dependencies
native-applescripttransport plugin specificationNon-Goals