mailsearch: Fast Apple Mail Search with Rust, SQLite FTS5 and MCP
The search box in the macOS Mail app often finds nothing. I type a word that I know is in a message, and I get an empty list. Mail has no setting to repair its index, and I got tired of scrolling. So I wrote my own search: mailsearch , one Rust binary that indexes the Mail store into SQLite and gives me a command-line tool, a search-as-you-type terminal screen, and an MCP server, so an AI agent such as Claude Code can search my mail too. All screenshots in this post use a small, fictional demo mail store. The measurements come from my real store of about 67,000 messages. Read the files, not the app Mail keeps each message in one .emlx file under ~/Library/Mail . I call this folder the Mail store . An .emlx file is simple: a first line with a byte count, then that many bytes of standard RFC 822 email, then an XML property list that I ignore. mailsearch reads these files directly. It does not use Spotlight, it does not touch the database...