
Apple Mail
io.github.redpopPublished by GitHub account redpopv0.3.0Updated Nov 3, 2026
Search and read Apple Mail on macOS, read-only: mailboxes, messages and threads.
Overview
Apple Mail's local MCP server; no sign-in required; STDIO.
No AI overview yet: these facts come from the registry entry and the server itself.
Installation
In SourceWeft
- Open Apple Mail in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
apple-mail-mcp
A read-only MCP server that lets an AI assistant search and read the mail in Apple Mail.
macOS only. It reads the local index that Mail.app keeps on your Mac.
Then grant Full Disk Access once with npx -y @redpop/apple-mail-mcp setup. For Claude
Desktop there is a one-click bundle: see Install.
What it does
The main use is "find the mail about X":
Four tools: list_mailboxes, search_messages, get_message, get_thread. Search covers
sender, recipient, subject, free text, mailbox, date range, unread, flagged and attachments,
and can also look inside message bodies. Results carry a message:// link that opens the
mail in Mail.app, where Mail stores the Message-ID (not on macOS 15). Details: docs/tools.md.
Why this one
- Fast. It queries Mail's SQLite index instead of scripting Mail.app with AppleScript.
On one real mailbox with about 240,000 message rows, a page of search results takes 4 to
90 ms in the helper, a subject search 25 ms after the first one; see
docs/architecture.mdfor the measurements and their limits. - Full Disk Access goes to a small helper, not to your terminal or your AI client. The server reaches Mail's files through a small app, "Mail MCP Helper", and macOS binds the permission to that app alone. Node, Terminal and Claude never get it.
- Read-only by construction, not by a flag. There is no code that sends, drafts, moves, deletes or flags mail, none that opens the database for writing, and none that opens a network connection.
- Mail.app does not have to be running and no Automation prompt appears. Your data is only as fresh as Mail's last sync, though, and a message that Mail never downloaded has no body.
- Threads and deep links.
get_threadreturns a conversation; messages carry amessage://link (not on macOS 15). - Security mails are withheld by default. Messages that look like verification codes, password resets or sign-in links are shown without their body, with digits in the subject masked, and cannot be found by body search. Detection is best effort, not a guarantee.
- Settings come from configuration, never from tool parameters, so a malicious mail cannot ask the model to switch them off.
- Works with apple-calendar-mcp: "find the
mail about Thursday's meeting". Same conventions: timestamps in ISO 8601 with offset, and
errors as an
isErrorresult with one plain-English sentence per error code.
Requirements
- macOS 15 or later. Verified with a real mailbox only on macOS 27.0.1 with Mail 16.0. The
database layout of macOS 15.8 and 26.6 passes the helper's column check, taken from runners
without a mail account. On macOS 15 Mail stores no Message-ID header, so results there carry
no
message://link. Support depends on the layout of Mail's database, not on the version number:doctorchecks it. Reports from other versions are welcome, see Reporting problems. - Node.js 22.16 or newer in the 22 line, or 24 and newer.
- Mail set up with at least one account.
- Exchange accounts are untested. Mailboxes and message metadata are listed, but bodies of
Exchange mail are not read yet:
get_messagereportsfile_not_found. Seedocs/exchange.md.
Security model in short
A mailbox holds secrets: codes, reset links, contracts. Read this before connecting it to a model that can also reach the internet.
- The helper holds Full Disk Access and runs only fixed commands. It has no free-form SQL and no path parameter, and it never parses mail content. Untrusted MIME is parsed in Node, which has no special permission.
- Mail text is untrusted input. The server tells the model so, but cannot force it.
- If your client also has a web or send tool, a malicious mail could try to make the model leak what it read. Use confirmations for those tools, or keep this server in a client without them.
- Any program running as your user can start the helper and read your mail with it. This is less than giving Full Disk Access to Terminal, but it is not nothing.
- The optional body index is a plain-text copy of your mail that any program of your user can read, without Full Disk Access. It is off by default; see Body index.
The full threat model and both residual risks: SECURITY.md.
Install
Claude Code and Cowork, as a plugin (settings in a dialog, updates with each release):
The plugin runs the npm package below at the plugin's version. Grant Full Disk Access once with
npx -y @redpop/apple-mail-mcp setup.
Claude Code without the plugin (or any client that starts a command):
setup walks you through the Full Disk Access grant. Settings are
environment variables, see Configuration.
Claude Desktop: download apple-mail-mcp-<version>.mcpb from the
latest release and open it. Claude
Desktop installs the extension and shows its settings page; the settings there are the same as
the environment variables. The first tool call without access opens System Settings and the
Finder window for the grant.
Each release lists SHA256SUMS and carries build provenance attestations for the bundle and
the helper zip.
Install from source
For development, or to run unreleased changes. You need the Xcode Command Line Tools (for Swift) and an Apple Development certificate in your keychain for a build that keeps its permission across rebuilds; without one the build is ad hoc and gets its own, weaker identity.
Then give the helper Full Disk Access (next section) and register the server:
APPLE_MAIL_HELPER_PATH points the server at your local build. Without it the server looks
for the release bundle Mail MCP Helper.app inside the package, which only the release
pipeline produces. A local build is named "Mail MCP Helper (Dev)" (Apple Development
signature) or "Mail MCP Helper (Ad hoc)" (no certificate). Both use their own bundle id, so
they never disturb the permission of the release app.
The build script never signs with a Developer ID certificate outside CI.
Grant Full Disk Access
macOS protects ~/Library/Mail and offers no dialog to ask for access. You grant it once, to
the helper app:
- Run
setup(from source:APPLE_MAIL_HELPER_PATH="$PWD/bin/Mail MCP Helper (Dev).app" node dist/index.js setup; from npm:npx -y @redpop/apple-mail-mcp setup). It opens System Settings at Privacy & Security > Full Disk Access, shows the helper in Finder, and waits until access works. - Drag Mail MCP Helper from the Finder window into the list and switch it on. (For a local
build the name is "Mail MCP Helper (Dev)".) Alternatively click +, press Cmd-Shift-G and
paste the path that
setupprints. setupreports success and prints the command to add the server to Claude Code.
Without a terminal (for example with the MCPB bundle) the first tool call that is denied opens System Settings and the Finder window by itself, once per server process, and the error message lists the same steps.
Notes:
- The permission belongs to the app's bundle id, not to its location. You can move the package or update it without granting again.
- If "Mail MCP Helper" is listed and switched on but access is still denied, the entry is stale. Remove it with the minus button and add it again.
- No restart is needed after granting.
More cases: docs/troubleshooting.md.
Configuration
Set these in the environment of the server, for example with claude mcp add -e NAME=value.
They cannot be changed through tool parameters. Booleans accept true, false, 1, 0.
An empty value counts as not set. An invalid value does not stop the server; every tool call
then fails with CONFIG_INVALID naming the setting, and nothing falls back to "allow all".
The server reads these settings once, at startup. After changing them, restart the client. In Claude Desktop, quit the app (Cmd-Q) and open it again: switching the extension off and on, or saving its settings, keeps the running server and its old settings.
Example: only the work account, no mailbox called Archive.
Body index
Without an index, bodyContains decodes messages while it searches, so one call looks at no
more than the 2,000 newest candidates or 3 seconds of work. A mail from years ago can take many
pages to reach. With APPLE_MAIL_BODY_INDEX=true the server keeps a full-text index of the
message bodies and searches all of them in one call, with the same matches, order and
matchContext as the scan.
- Disk space: about 14 KiB per mail. On the test mailbox, 121,000 mails took 1.7 GiB.
- Build time: about 3 ms per mail, just under 6 minutes for 120,000 mails. The server builds it in the background after its first successful tool call and continues after a restart. Tool calls go first.
- Until it is complete
bodyContainsscans as before, and thenotesays how far the build is. Terms shorter than 3 characters are always scanned. - It keeps itself current: new mail is added before each body search and every minute, deleted mail is removed every 30 minutes, and a changed configuration is applied at the next start.
- Where:
~/Library/Application Support/apple-mail-mcp/body-index/, directory 0700, files 0600, excluded from Time Machine. To rebuild it, delete the directory. - Turning it off deletes it at the next start of the server.
- Requires Node 22.16 or newer in the 22 line, or 24 and newer (for
node:sqlitewith FTS5). Without it the index stays off and the search scans live.
doctor shows the state under body-index. The index is a copy of your mail text that any
program of your user can read, without Full Disk Access. Read
SECURITY.md before you turn
it on.
Tools
All four are marked read-only. Parameters, results and error codes: docs/tools.md.
Diagnostics and bug reports
doctor checks the macOS version, the helper's signature, Full Disk Access, the database
layout, how many messages have a local file, the mailbox roles, how many removed accounts and
accounts with Mail switched off are hidden, the effective settings and the state of the body
index. Its default output contains no names, addresses or subjects, so you can paste it into an
issue as it is. --verbose adds mailbox names and account identifiers; --json is for
machines; --schema prints only the database fingerprint, any missing columns and the
CREATE TABLE statements of Mail's database (structure, no data). Exit code 1 means at least one check
failed.
Reporting problems
Open an issue at https://github.com/redpop/apple-mail-mcp/issues and attach the output of
doctor. If you run it on a macOS version other than 27, open a
Schema report
with the output of doctor --schema instead: that is the most useful report we can get.
Security problems go through GitHub Security Advisories, see SECURITY.md.
More documentation
docs/tools.md: every tool, its parameters, results and errorsdocs/architecture.md: how it works and what was measureddocs/troubleshooting.md: permission and database problemsdocs/exchange.md: what is known about Exchange accountsSECURITY.md: threat model and residual risksdocs/releasing.md: how releases are built, signed and published (maintainers)
Not included, on purpose
Sending, replying, drafts, moving, deleting, flagging, attachment contents, semantic search, link extraction. A read-only server is easier to trust.
Privacy Policy
This policy covers the server and its helper app, as published on npm, in the GitHub releases and in the MCP Registry.
What is collected
Nothing is collected by the author or by any service. The server has no telemetry, analytics or crash reporting, and neither the server nor the helper opens a network connection.
On your Mac, the server reads what its tools need: Mail's local index and message files under
~/Library/Mail, and the name and user name of mail accounts from
~/Library/Accounts/Accounts4.sqlite. Your configuration limits what is read (accounts, junk,
trash, excluded mailboxes, security mails).
How it is used and stored
Data is read only when your AI client calls a tool, and the result goes back only to that
client. The server keeps two kinds of files, both under
~/Library/Application Support/apple-mail-mcp/, directory 0700, files 0600:
state.json: when access to Mail last worked, plus the helper's version and checksum. No mail data.- The body index, only if you set
APPLE_MAIL_BODY_INDEX=true: a full-text copy of the bodies of the messages your configuration makes visible, never of security mails. See Body index andSECURITY.md.
With APPLE_MAIL_MCP_DEBUG=true the server writes one line per request to stderr, with timings
and counts but no mail content. Your client decides whether it keeps that output in its logs.
Sharing with third parties
The server shares nothing with anyone. What your AI client does with a tool result is covered by
the client's and the model provider's privacy policies: a cloud-hosted model receives the results
the client sends it. Installing or updating through npm or npx downloads the package from the
npm registry, under npm's terms.
Retention
state.json is overwritten in place and stays until you delete it. The body index stays current
while it is on and is deleted at the next server start after you turn it off. To remove
everything, delete ~/Library/Application Support/apple-mail-mcp/. The server never changes
or deletes anything under ~/Library/Mail.
Contact
Questions about this policy: open an issue at
https://github.com/redpop/apple-mail-mcp/issues. Security problems: report them privately as
SECURITY.md describes.
License
MIT, see LICENSE.
Source: README.md at commit 30c6cfa
Tools
0Version history
4- v0.3.0LatestNov 3, 2026
- v0.2.0Nov 3, 2026
- v0.1.1Nov 1, 2026
- v0.1.0Nov 1, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts
