Skip to content

Releases

v3.3.0

Choose a tag to compare

@github-actions github-actions released this 03 Nov 03:36
daaf963

Added

  • list_email_attachments and save_email_attachment accept message_id (the id search_emails returns) and mailbox, looking the message up directly instead of by subject, so recurring subjects can't pick the wrong month (#128 by @proscar87).
  • read_email(account, message_id, mailbox) returns one message as headers, plain-text body and attachment list, looked up directly by the id search_emails returns, with the body capped at max_chars and the cut stated (#128 by @proscar87).

Security

  • The write-path denylist now also checks the path as requested, not only its
    symlink target. A symlink inside a protected folder (e.g.
    /opt/homebrew/bin/python3) resolves outside it, so writing through it was
    allowed (#125 by @proscar87, follow-up to #103).
  • Hardened the file-path guard for file-writing tools (#103, follow-up to #19).
    The old denylist missed shell startup files, so a prompt-injected
    save_email_attachment(save_path="~/.zshrc") could plant an attacker-supplied
    attachment that ran on the next shell. save_email_attachment,
    export_emails and create_rich_email_draft's output_path (previously
    unchecked) now refuse every dotfile and dot-folder directly in $HOME
    (~/.zshrc, ~/.ssh, ~/.gitconfig, ~/.config, ~/.netrc, ...),
    .git/hooks, .git/config and .envrc anywhere, autostart and persistence
    locations (~/Library/LaunchAgents, /Library/LaunchDaemons,
    ~/Library/Application Support, ~/Library/Preferences, ...) and PATH
    folders (~/bin, /usr/local/bin, /opt/homebrew/bin). Everything else
    stays writable, including paths outside $HOME such as the temp dir.
  • Attachment paths for compose_email and reply_to_email may now be any
    readable file (previously $HOME only) except secrets: ~/.ssh, ~/.gnupg,
    ~/.aws, ~/.netrc, git/cloud credentials, .env files,
    ~/Library/Keychains and browser profiles and cookie stores.
  • New opt-in restriction: APPLE_MAIL_MCP_WRITE_DIRS and
    APPLE_MAIL_MCP_ATTACH_DIRS (colon-separated), or the repeatable
    --write-dir / --attach-dir flags, confine writes or attachments to the
    listed folders; the denylist still applies inside them.
  • All checks live in one shared module (apple_mail_mcp/paths.py) instead of
    three copies, resolve .. and symlinks before checking, and compare
    case-insensitively to match APFS (~/.ZSHRC is ~/.zshrc).

Fixed

  • list_inbox_emails in text output and get_mailbox_unread_counts(summary_only=True)
    ignored account and returned every account; they now filter by it
    (#135 by @proscar87).
  • search_emails on a mailbox over the whose-clause limit now stops its
    bounded index scan at the first message outside a date_from window
    (newest-first) or date_to window (oldest-first), instead of reading the
    full 4000-message cap. A one-week search of a 6,000-message mailbox no
    longer holds the automation lock for minutes (#133 by
    @joel-alturaeducation, related to #87 and #132).
  • The Claude Code plugin manifests (plugin/.claude-plugin/plugin.json,
    .claude-plugin/marketplace.json) were stuck at 3.1.2, so claude plugin update reported installs as current. They are now at 3.2.1 and
    scripts/check_versions.py and RELEASING.md cover them (#127 by
    @proscar87).
  • move_email no longer treats a negative older_than_days as a filter (it
    added no date condition, so the call moved everything), and manage_trash
    rejects an unrecognised action instead of falling through to
    move_to_trash (#124 by @proscar87).
  • reply_to_email now restores the user's clipboard. The restore step sat
    after the script's return, so it never ran and every reply (send, draft
    or open) left the reply body on the clipboard. The error path now restores
    it too, as does forward_email's error path when a message was pasted
    (#106).

What's Changed

New Contributors

Full Changelog: v3.2.1...v3.3.0

v3.2.1

Choose a tag to compare

@github-actions github-actions released this 15 Oct 02:00
c5cd14b

Fixed

  • The server failed to start on any fresh install since the mcp SDK 2.0
    release (ModuleNotFoundError: No module named 'mcp.server.fastmcp', #97).
    server.py imported FastMCP from the SDK's bundled v1 module instead of
    from the declared fastmcp dependency, so once fastmcp 4.x pulled in
    mcp 2.x the import path vanished. Now imports from fastmcp import FastMCP. --read-only also called FastMCP.remove_tool(), which is
    deprecated in fastmcp 3.x and removed in 4.x; it now goes through
    local_provider.remove_tool(), which both support.
  • search_emails no longer hangs Mail or returns nothing on very large
    mailboxes such as a Gmail INBOX (#41, #87). Above 5,000 messages the full
    whose scan is skipped in favour of a bounded index scan (newest first for
    date_desc), capped at 4,000 messages per call; when the cap is reached
    the response says so (scan_limited in JSON, a NOTE line in text) instead
    of silently returning less. Body-text search on large mailboxes is bounded
    too.
  • Reply and forward drafts render in the intended sans-serif font instead of
    Mail's small serif default (#100, #101). The reply/forward HTML now carries
    an explicit font style rather than font: inherit.
  • Removed the redundant plugin/commands/email-management.md slash command.
    It shadowed plugin/skills/email-management/ under the same
    apple-mail:email-management listing key, so every session showed two
    near-duplicate entries with different descriptions (#82). Claude Code
    invokes skills directly as slash commands, so /email-management still
    works via the skill alone.
  • create_rich_email_draft's save_as_draft no longer claims or silently
    retries a save that can never succeed. Mail opens a .eml as a read-only
    message viewer, not a compose object, so the AppleScript every outgoing message whose subject is ... query can never match it — the old retry
    loop always returned False after ~5s of polling (#83). The tool now
    skips the futile retry and reports plainly that save_as_draft isn't
    supported for this workflow, pointing to compose_email(mode="draft") or
    manage_drafts for a real, sendable HTML draft.

What's Changed

New Contributors

Full Changelog: v3.2.0...v3.2.1

v3.2.0

Choose a tag to compare

@github-actions github-actions released this 05 Jul 03:28
4b41d0d

Added

  • get_email_source — new tool exposing an email's raw RFC 822 source
    (full headers + MIME body) for debugging threading, authentication results,
    and encoding issues (#66). Supports a headers_only mode and a configurable
    byte cap with an explicit truncation marker so huge messages can't flood the
    context. Uses Mail's message id property and resolves localized inbox
    names via build_mailbox_ref.
  • list_inbox_emails now surfaces message_id, internet_message_id and a
    mail_link
    in both its JSON and text output, matching search_emails
    (#76) — inbox listings can be cited as Apple Mail deep links
    (message://…) and targeted by id without a second lookup.
    Backward-compatible with older 5-field records.

Fixed

  • Stored XSS in the inbox dashboard (#77). Attacker-controlled email
    subjects/senders containing </script> could break out of the dashboard's
    embedded JSON <script> block and inject arbitrary HTML. JSON injected into
    the template now escapes <, >, &, and U+2028/U+2029; remaining
    unescaped template interpolations in the account cards were also fixed.
  • Umlauts, ß, and emoji no longer garble when pasting HTML bodies into
    Mail
    (#79). The Cocoa HTML→RTF importer auto-detected the charset and
    defaulted to Latin-1, double-decoding UTF-8 bytes into mojibake
    ("Grüße" → "Grüße") on both the plain and HTML compose paths. The
    importer is now pinned to UTF-8 via NSCharacterEncodingDocumentAttribute.

What's Changed

  • fix: pin HTML->RTF importer to UTF-8 so umlauts/ß/emoji survive paste to Mail by @patrickfreyer in #79
  • feat: add get_email_source tool for raw RFC 822 access by @ahharvey in #66
  • feat: surface message_id + mail_link in list_inbox_emails (parity with search) by @elfensky in #76
  • Fix stored XSS in inbox dashboard (script-context breakout + innerHTML sinks) by @atlascodesai in #77
  • release: v3.2.0 by @patrickfreyer in #81

New Contributors

Full Changelog: v3.1.8...v3.2.0

v3.1.8

Choose a tag to compare

@github-actions github-actions released this 23 Jun 09:18

Fixed

  • HTML replies/compositions no longer paste the body twice (a rendered
    copy plus a second copy of the raw <p>/<b> source). reply_to_email,
    compose_email, and forward_email placed the raw HTML source on the
    clipboard under NSPasteboardTypeHTML; for any HTML that wasn't a complete
    document, Mail rendered it AND surfaced the literal markup, so the message
    appeared twice. The body is now converted to an NSAttributedString and
    written back as RTF (a single unambiguous rich-text flavor) plus a
    rendered plain-text fallback. create_rich_email_draft was unaffected
    (it already builds a proper multipart/alternative .eml).

Added

  • Release workflow now builds and attaches the .mcpb bundle to the GitHub
    Release automatically on each tag (verifies the bundle contains the
    apple_mail_mcp package and doesn't leak venv//__pycache__).
  • scripts/extract_changelog.py — pulls the current version's section from
    this file to use as the GitHub Release body.

What's Changed

  • ci: auto-build and attach the .mcpb bundle to each GitHub Release by @patrickfreyer in #69
  • feat: full flag color support (set, report, query) by @samalone in #67
  • move_email: add message_ids fast path for precise targeting by @brendandebeasi in #50

New Contributors

Full Changelog: v3.1.7...v3.1.8

v3.1.7 — PyPI fix + one-click .mcpb bundle

Choose a tag to compare

@patrickfreyer patrickfreyer released this 13 Jun 03:56
13266b6

Apple Mail MCP v3.1.7

First 3.x release published to PyPI — uvx mcp-apple-mail now works with no workaround. Versions 3.0.0–3.1.6 were tagged but never uploaded, so PyPI had been stuck on the broken 2.2.0 wheel (ModuleNotFoundError: No module named 'apple_mail_mcp'). Fixes #42; addresses #57.

Install

uvx / pip (MCP server):

claude mcp add apple-mail -- uvx mcp-apple-mail
# or: pip install -U mcp-apple-mail

Claude Desktop (one-click bundle): download apple-mail-mcp-v3.1.7.mcpb below → Claude Desktop → Settings → Developer → MCP Servers → Install from file → grant Mail.app permissions.

What's new in the release process

  • PyPI Trusted Publishing (OIDC, no stored tokens) — tagged releases now publish automatically.
  • CI builds the wheel and runs a packaging guard (verify_wheel.py) on every push/PR, so a "dist-info only" wheel can't ship again.
  • Added CHANGELOG.md + RELEASING.md.

The .mcpb bundle includes the full apple_mail_mcp package (all 27 tools), the MCP Apps dashboard UI, and the Email Management Expert skill.

v3.1.6 — Fix handler-script breakage from the timeout wrap

Choose a tag to compare

@patrickfreyer patrickfreyer released this 10 Jun 04:12

Fixed

  • search_emails and smart inbox tools broken on v3.1.5 (#63, #64): the central with timeout wrap introduced in #61 nested AppleScript handler definitions (on name(...)) inside a block, which is illegal — every handler-bearing tool failed instantly with Expected "end" but found "on" (-2741). The wrap now skips handler-defining scripts; they keep their own inner timeouts and remain covered by the Python-side process kill and in-flight child tracking, so the orphaned-osascript protection from #58/#61 stays intact.

Thanks to Adrian Giles (fortress.games) for the second precise external bug report in two days.

Note: v3.1.5 was never published to PyPI; publish 3.1.6 instead.

🤖 Generated with Claude Code

v3.1.5 — Reliable body paste (no more silent empty sends)

Choose a tag to compare

@patrickfreyer patrickfreyer released this 10 Jun 01:10

Highlights

Fix: silent empty-body sends in reply_to_email / compose_email (HTML path) (#62)

The HTML body is inserted via a blind Cmd+V into the Mail compose window, which only lands if Mail is frontmost when the keystroke fires. The previous code relied on a single activate + fixed delay, which intermittently fired the paste before the compose window had keyboard focus — sending a message containing only the signature, while still reporting success.

This release polls until frontmost of process "Mail" is true (re-asserting focus each iteration, up to ~4s) before pasting, in both the reply and new-message paths.

A content-read-back guard was intentionally not used: Mail's GUI editor buffer is decoupled from the scriptable content property (verified empirically — it reads 0 chars even after a successful paste), so such a guard would false-fail every send. This is documented in code comments.

Also included since v3.1.4

  • Prevent orphaned osascript from pinning Mail.app's main thread (#58, #61)
  • Reconcile version strings + add a version-drift guard (#59, #60)

Verification

  • 77/77 tests pass, including new PasteFocusHardeningTests (focus poll present and ordered before the paste; fragile fixed delay removed; no content read-back reintroduced)
  • All generated AppleScript variants pass osacompile
  • Live draft-mode round-trip confirmed the body lands

🤖 Generated with Claude Code

v3.1.4 — HTML attachment fix + accumulated improvements

Choose a tag to compare

@patrickfreyer patrickfreyer released this 29 May 05:29

Highlight — HTML emails with attachments now actually send the attachment

The headline fix: when calling compose_email with both body_html and attachments, the attachment was being silently dropped before send. The HTML clipboard injection used Cmd+A + Cmd+V to paste the body, but the attachment was added BEFORE the paste — so the Select All grabbed the inline attachment placeholder and the paste replaced it with the HTML clipboard payload.

Impact: every HTML send with an attachment since v3.1.0 has silently lost the file. The MCP returned success because AppleScript completed without error, but recipients got no attachment.

Fix (commit 2594e8f): attachments are now added in a fresh tell newMsg block AFTER the HTML paste completes. Verified end-to-end — files arrive intact on the recipient side.

New tools

  • list_account_addresses (#43) — enumerate all configured email addresses per account, useful for picking the right from_address for multi-alias accounts.
  • synchronize_account (#53) — force-sync an account to pull new messages from the server before subsequent searches.

Other fixes

  • Localized inbox names (#52) — get_inbox_overview, list_inbox_emails, and related tools now resolve the inbox mailbox correctly when Mail.app is configured in FR/DE/ES/IT/PT/NL/JA (where "Inbox" is "Boîte de réception" / "Posteingang" / "Bandeja de entrada" / etc.).
  • Account default sender + from_address override (#35) — compose_email and reply_to_email now respect each account's "Send new messages from" default, and accept an optional from_address parameter to pick a specific alias.
  • Strip CDATA wrappers (#54) — email bodies wrapped in <![CDATA[...]]> are now unwrapped before sending so the literal tags don't appear in the recipient's email.
  • Reply attachment scope (commit 70d5ef1) — the attachment block in reply_to_email is now correctly scoped to replyMessage so AppleScript's "last paragraph" reference resolves.

Installation

Download the .mcpb file and install via Claude Desktop: Settings → Developer → MCP Servers → Install from file.

Full changelog

v3.1.3...v3.1.4 — 7 commits.

v3.1.3

Choose a tag to compare

@patrickfreyer patrickfreyer released this 05 May 18:10
1e74122

What's new

  • mail_link in text output — The message:// deep link was already available in JSON search results but hidden from the default text format. It now appears as a Link: line, making it easy to copy-paste into Apple Reminders or other apps that support message:// URLs.

Example

✓ Meeting reminder
   From: sender@example.com
   Date: 2026-05-02T10:30:00
   Mailbox: INBOX
   Link: message://%3C12345678-ABCD-1234-EFGH-123456789ABC@example.com%3E

Install / Upgrade

Claude Code plugin (recommended):
Download apple-mail-mcp-v3.1.3.mcpb below and install via Claude Code or Claude Desktop.

PyPI:

pip install --upgrade mcp-apple-mail

v3.1.1

Choose a tag to compare

@patrickfreyer patrickfreyer released this 01 Apr 04:35

What's Changed

  • fix: Update remaining PyPI package name reference in README
  • chore: Remove stale artifacts, fix pyproject.toml for plugin/ layout
  • chore: Add mcp-name verification string for official MCP Registry
  • chore: Add server.json for MCP Registry schema validation

Full Changelog: v3.1.0...v3.1.1

⌂ 换网址