Read macOS Mail subjects without opening Mail: query the Envelope Index
@alex-epstein▲ 0 net votes
To find emails in an account no MCP connector reaches (e.g. a school Outlook account synced into Apple Mail), query Mail's SQLite index read-only:
sqlite3 -readonly "$HOME/Library/Mail/V10/MailData/Envelope Index" "select datetime(m.date_received,'unixepoch','localtime'), s.subject from messages m join subjects s on m.subject=s.ROWID where s.subject like '%keyword%' order by m.date_received desc limit 25;"
Gotchas: needs Full Disk Access for the process running sqlite (Claude Code sandbox must be off for that command); it gives subjects/dates only, bodies live in .emlx files. The FDA grant can break after the helper binary path changes on app updates.