mail-mcp
mail-mcp
Claude(및 기타 MCP 호스트)가 macOS의 Mail.app에 완전히 액세스할 수 있도록 하는 MCP 서버입니다. Mail.app에 구성된 모든 계정(iCloud, Exchange, IMAP 등)에서 검색, 읽기, 보내기, 답장, 플래그 지정, 이동 등의 작업을 수행할 수 있습니다.
필수 조건
macOS (Mail.app 필수)
Node.js 20 이상
MCP 호스트: Claude Desktop, Amazon Quick 또는 모든 stdio MCP 클라이언트
Related MCP server: Apple Mail MCP Server
설치
Claude Desktop — 원클릭 설치 (권장)
최신 릴리스에서
mail-mcp.dxt를 다운로드합니다..dxt파일을 더블 클릭하면 Claude Desktop이 자동으로 설치합니다.필요한 macOS 권한을 부여합니다(아래 참조).
수동 / Amazon Quick / 기타 호스트
npx @p-l-ta/mail-mcp또는 전역으로 설치:
npm install -g @p-l-ta/mail-mcp
mail-mcpMCP 호스트를 mail-mcp 바이너리(stdio 전송)로 지정합니다. 구성 예시:
{
"mcpServers": {
"mail-app": {
"command": "npx",
"args": ["@p-l-ta/mail-mcp"]
}
}
}필수 macOS 권한
MCP 호스트를 실행하는 애플리케이션(Claude Desktop, Amazon Quick 등)에 다음 권한을 부여하세요:
권한 | 부여 위치 |
전체 디스크 접근 권한 | 시스템 설정 → 개인정보 보호 및 보안 → 전체 디스크 접근 권한 |
자동화 → Mail | 시스템 설정 → 개인정보 보호 및 보안 → 자동화 |
MCP 서버 프로세스는 이를 실행하는 호스트 애플리케이션의 권한을 상속받습니다.
도구
도구 | 설명 |
| 풍부한 필터를 사용하여 Envelope Index 데이터베이스를 통해 메시지 검색 |
| RFC message-id를 사용하여 메시지의 전체 본문 읽기 |
| 읽지 않은 메시지 수를 포함하여 구성된 모든 계정 및 사서함 나열 |
| 특정 사서함의 최근 메시지 나열 |
| 메시지 및 읽지 않은 메시지 수를 포함한 발신자 요약 |
| 구성된 계정 중 하나에서 새 이메일 보내기 |
| RFC message-id를 사용하여 기존 메시지에 답장 |
| 메시지의 읽음 및/또는 플래그 상태 설정 |
| 메시지를 다른 사서함으로 이동 |
| 메시지를 삭제된 메시지함으로 이동 |
| 계정에 새 사서함/폴더 생성 |
| 사서함 및/또는 특정 발신자의 모든 메시지를 읽음으로 표시 |
| 메시지 헤더와 본문에서 구독 취소 URL 추출 |
| 사서함의 모든 메시지를 한 번에 삭제 (정크 메일, 휴지통 등) |
작동 방식
검색 및 읽기 — Mail 자체의 Envelope Index SQLite 데이터베이스를 직접 쿼리하여 모든 계정에서 빠르고 구조화된 결과 제공
작업 (보내기, 답장, 플래그 지정, 이동, 휴지통 이동) — Mail.app에 대한 AppleScript 자동화를 통해 수행되므로 메시지가 로컬 파일로 저장되지 않는 계정에서도 작동
개발
npm install
npm run dev # tsx watch — live reload
npm test # vitest unit tests
npm run build # compile TypeScript → dist/
npm run dxt # build Claude Desktop extension → build/mail-mcp.dxt대화형 MCP 테스트:
npm run build
npx @modelcontextprotocol/inspector node dist/server.js라이선스
ISC
Available Tools
24 toolsbulk_applyADestructive
Apply one action (mark_read, mark_unread, flag, unflag, trash, or move) to a list of messages by RFC message-id, in a single batched call — far faster than calling set_message_flags/trash_email/move_email once per message.
Inputs: op (required), message_ids (required), destination_account, destination_mailbox.
bulk_flagA
Flag or unflag multiple messages in one call — by mailbox, sender substring, or both. Queries the Envelope Index for matching IDs then updates in a single batched AppleScript call.
Inputs: flagged (required), from, limit, account, +1 more.
bulk_mark_readA
Mark multiple messages as read in one call — by mailbox, sender substring, or both. Far faster than calling set_message_flags per message.
Inputs: from, account, mailbox.
bulk_moveA
Move multiple messages to a destination mailbox in one call — by mailbox, sender substring, or both. Queries the Envelope Index for matching IDs then moves in a single batched AppleScript call.
Inputs: destination_mailbox (required), from, limit, account, +2 more.
bulk_trashADestructive
Move multiple messages to trash in one call — by mailbox, sender substring, or both. Queries the Envelope Index for matching IDs then trashes in a single batched AppleScript call.
Inputs: from, limit, account, mailbox.
check_compatibilityARead-only
Probe each mail-mcp dependency (Envelope Index schema, SyncedRules.plist, AppleScript, MailData directory) and report pass/fail. Run this after a macOS update to verify nothing broke.
Inputs: no named parameters.
create_mailboxA
Create a new mailbox (folder) in a Mail.app account.
Inputs: name (required), account.
create_ruleA
Create a new Mail.app rule. A timestamped backup of SyncedRules.plist is made before writing. Mail.app may need to be restarted for the rule to take effect.
Inputs: name (required), actions (required), conditions (required), match_all.
delete_ruleADestructive
Permanently delete a Mail.app rule by its RuleId. A timestamped backup of SyncedRules.plist is made before writing so the deletion can be undone. Mail.app may need to be restarted for the change to take effect.
Inputs: rule_id (required).
empty_mailboxADestructive
Delete every message in a mailbox at once — moves to Deleted Messages, or permanently removes if the mailbox is already Deleted Messages/Trash. Use for Junk, Trash, or bulk-cleanup folders.
Inputs: mailbox_name (required), account.
get_unsubscribe_linkARead-only
Extract unsubscribe URLs from a message — checks the List-Unsubscribe header first (reliable), then scans the plain-text body as a fallback.
Inputs: message_id (required).
list_accounts_and_mailboxesARead-only
List all configured Mail.app accounts and their mailboxes with unread counts.
Inputs: no named parameters.
list_recentBRead-only
List recent messages in a mailbox of a specific account.
Inputs: account (required), limit, mailbox, unread_only.
list_rulesARead-only
List all Mail.app rules with their conditions and actions. Reads directly from SyncedRules.plist.
Inputs: no named parameters.
list_sendersARead-only
Return a grouped count of senders across mailboxes — who sends how many messages, how many are unread, and when the last arrived. By default excludes Deleted Messages, Junk, Sent, and Drafts so counts reflect live mail only. Ideal for identifying bulk senders and noise.
Inputs: limit, account, mailbox, include_system_mailboxes.
move_emailA
Move a message to a different mailbox by RFC message-id. Use list_accounts_and_mailboxes to get exact mailbox names.
Inputs: message_id (required), destination_mailbox (required), destination_account.
read_emailARead-only
Read full body of a message by its RFC message-id. Uses Mail.app via AppleScript so it works for IMAP/iCloud/Exchange messages without filesystem access.
Inputs: message_id (required).
reply_to_emailBDestructive
Reply to an existing message identified by RFC message-id.
Inputs: body (required), message_id (required), reply_all.
search_emailsARead-only
Search Mail.app messages via the Envelope Index database. Returns rich metadata including RFC message-id (usable with read_email, reply_to_email, set_message_flags).
Inputs: from, limit, query, since, +3 more.
send_emailBDestructive
Send a new email via Mail.app from an existing account.
Inputs: to (required), body (required), subject (required), cc, +1 more.
set_message_flagsB
Set read and/or flagged status on a message identified by RFC message-id.
Inputs: message_id (required), read, flagged.
submit_feedbackA
Open a pre-filled GitHub issue for mail-mcp (p-l-ta/mail-mcp) in the default browser. Automatically includes macOS version and mail-mcp version in the issue body.
Inputs: description (required), title.
trash_emailADestructive
Move a message to Deleted Messages (trash) by RFC message-id. Does not permanently delete.
Inputs: message_id (required).
update_ruleA
Update an existing Mail.app rule by its RuleId (use list_rules to find IDs). A timestamped backup is made before writing. Mail.app may need to be restarted for changes to take effect.
Inputs: rule_id (required), name, actions, match_all, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 24 tools
The tool purposes are mostly distinct, and descriptions clarify usage. The specialized bulk_* tools overlap with generic bulk_apply, but the query-based vs. ID-list distinction is clear. Overall, an agent can reliably select the right tool.
All tools use a consistent snake_case verb_noun pattern, with bulk_ prefix uniformly marking batch operations. Minor deviations like list_recent are readable and don't disrupt the general convention.
At 24 tools, the server is on the heavy side of the typical range. The bulk operations could be consolidated into fewer generic tools, but the broad scope justifies most of the count.
Core email workflows (send, read, reply, search, move, trash, flags) and full rule CRUD are covered. Missing mailbox update/delete and forward/draft operations are workable gaps rather than critical failures.
Maintenance
Related MCP Connectors
Read, search and manage iCloud Mail, Calendar and Contacts from Claude and other MCP clients.
Your IMAP mailbox as an MCP server: read, search and (if you allow it) organize mail. Open source.
Email infrastructure for AI agents — send, receive, search, and reply to email over MCP.
Hosted email MCP for your own Gmail, Outlook.com, Microsoft 365, iCloud or IMAP inbox: read, search, draft, reply in thread, forward and file mail. It moves or flags up to 500 messages in one call, and a send leaves exactly one copy in Sent. A calendar is a separate connection, and connecting one adds diary and scheduling tools.
Related MCP Servers
- AlicenseAqualityBmaintenanceAn MCP server for Apple Mail that enables Claude to read, search, manage, and compose emails via AppleScript.2024 npm1MIT
- AlicenseAqualityDmaintenanceA read-only MCP server that lets Claude Desktop interact with Apple Mail on macOS via AppleScript. It enables listing mailboxes, searching emails, and reading email content without making network calls.3MIT
- AlicenseAqualityBmaintenanceAn MCP server that provides programmatic access to Apple Mail, enabling AI assistants like Claude to read, send, search, and manage emails on macOS.25MIT
- AlicenseAqualityDmaintenanceAn MCP server that lets Claude read, search, and send email over standard IMAP/SMTP.6MIT