Outlookcache – Read Outlook for Mac mail offline A tool called outlookcache, published by developer stn1slv, reads the local HxStore.hxd cache file that new Outlook for Mac keeps on disk and prints accounts, folders, messages and message bodies as JSON without using Microsoft Graph, EWS, IMAP, OAuth or the network. The tool installs via a Homebrew cask (stn1slv/tap/outlookcache), Go 1.27.4 or later, or a source build, and can also run as a read-only MCP server for AI assistants with a default 3-minute cache TTL. It requires a signed-in new Outlook for Mac, does not support legacy Outlook for Mac's Outlook.sqlite store, and needs Full Disk Access granted to the terminal or MCP host if macOS denies access to the store. outlookcache reads the mail that new Outlook for Mac keeps on your computer. It prints accounts, folders, messages and message bodies as JSON, and it can also run as a read-only MCP server for AI assistants. It does not use Microsoft Graph, EWS, IMAP, OAuth or the network. It reads only what the signed-in Outlook client already stores on your disk. To read mail through Microsoft Graph, you need an app registration and permissions such as Mail.Read , and many organizations allow them only after admin consent. New Outlook for Mac already keeps recent mail in a local cache file, HxStore.hxd . outlookcache reads it from there. With Homebrew on macOS: brew install --cask stn1slv/tap/outlookcache Binaries for macOS Apple silicon and Intel are on the releases page https://github.com/stn1slv/outlookcache/releases . The binaries are not signed. The Homebrew cask removes the macOS quarantine flag after install, so macOS does not block the binary. If macOS blocks a binary you downloaded yourself, run xattr -d com.apple.quarantine outlookcache . With Go 1.27.4 or later: go install github.com/stn1slv/outlookcache/cmd/outlookcache@latest Or build from source with make build ; the binary is written to bin/outlookcache . You need new Outlook for Mac that has been signed in at least once. Legacy Outlook for Mac Outlook.sqlite is not supported. If macOS denies access to the store, give your terminal app or the app that starts the MCP server Full Disk Access in System Settings, Privacy & Security. outlookcache accounts mail accounts and the IDs of their standard folders outlookcache folders folders with total, unread and unconfirmed counts outlookcache messages --folder inbox --unread unread messages in the Inbox, newest first outlookcache messages --days 7 messages of the last 7 days outlookcache search "quarterly budget" text in subject, preview, sender, recipients or attachment names outlookcache search "budget" --body also search the body text slower outlookcache read 18800001 one message with its body as plain text outlookcache thread 18800101 messages of a conversation, oldest first the newest 20 by default messages and search print messages without bodies. Use the id of a row with read , and its conversation id with thread . By default read and thread cut off quoted and forwarded text, so each message shows only its new text; --quoted keeps it. These commands print JSON to stdout and a summary to stderr, for example 12 result s , 3 record s skipped, 0 damaged section s , 123 undecoded block s , 2 unconfirmed . The values are explained in Honest output honest-output . | Command | Flags and defaults | |---|---| | messages | --folder , --unread , --days 0 , --limit 50 , --confirmed-only | | search QUERY | the same as messages , plus --body | | read MESSAGE ID | --quoted | | thread CONVERSATION ID | --quoted , --limit 20 the newest messages are kept | | mcp | --cache-ttl 3m a Go duration, such as 180s or 3m | --limit 0 means no limit. --days 0 means all dates. --folder takes a folder ID, a role inbox , sent , drafts , deleted , junk , archive , outbox or a folder name, in this order. Global flags: | Flag | Meaning | |---|---| | --account ID OR ADDRESS | Only one account, by ID or e-mail address see outlookcache accounts . With mcp , every tool serves only this account. | | --store PATH | Read this HxStore.hxd instead of the one of the default profile. | | --max-content N | Characters of body text in read , thread and the MCP results 0 means no limit, default 4000 . | | -v , --verbose | Log load statistics to stderr. | Environment variables: | Variable | Meaning | |---|---| | OUTLOOKCACHE STORE | Default for --store . | | OUTLOOKCACHE MAX CONTENT | Default for --max-content . | | OUTLOOKCACHE CACHE TTL | Whole number of seconds the MCP server reuses a decoded store default 180 . | The default store is ~/Library/Group Containers/UBF8T346G9.Office/Outlook/Outlook 15 Profiles/Main Profile/HxStore.hxd . outlookcache mcp runs a read-only MCP server on stdin and stdout. Example configuration for Claude Desktop or Claude Code: { "mcpServers": { "outlook": { "command": "outlookcache", "args": "mcp" } } } To serve only one account, use "args": "mcp", "--account", "you@example.com" . Add "--max-content", "0" for full body text. If the app does not find outlookcache , put the full path from which outlookcache in command , because apps started from the Dock often do not have the Homebrew folder in their PATH . | Tool | Purpose | Key arguments and defaults | |---|---|---| | list accounts | Mail accounts and the IDs of their standard folders. | account | | list folders | Folders with total, unread and unconfirmed counts. | account | | list messages | Messages without bodies, newest first. | folder , unread only false , days 0 , limit 50 , confirmed only false , account | | search messages | Text search in subject, preview, sender, recipients and attachment names. | query required , in body false , and the arguments of list messages | | read message | One message with its body as plain text. | id required, the id field of a row , include quoted false , account | | read thread | The messages of a conversation with their bodies, oldest first. | conversation id required , include quoted false , limit 20 , account | The server decodes the store on the first tool call and keeps it in memory. It decodes the store again when the TTL ends or when Outlook changes the file. Every tool response keeps its rows in result . It also has more the limit cut off more matches , the values described in Honest output honest-output , partial and content trust . Mail is written by other people, so an AI assistant must not follow instructions found in it. Every tool description, the server instructions and the content trust field of every response say so. outlookcache reads an undocumented file format, so it reports what it could not read instead of hiding it. Every message has a confirmed field. It is true when the block index of the store confirms the message. Messages with false may already be deleted, because the reader cannot yet tell all deleted messages from live ones. --confirmed-only MCP: confirmed only hides them. The CLI shows the other values in the summary line on stderr. The MCP server returns them as fields of every response. | Value | CLI summary | MCP field | Meaning | |---|---|---|---| | Unconfirmed messages | N unconfirmed | unconfirmed | Messages in the result with confirmed: false . | | Skipped records | N record s skipped | skipped records | Messages that could not be decoded. | | Damaged sections | N damaged section s | damaged sections | Blocks in the index that fail their checksum. In MCP this is a list with the file , offset , length , reason and block type of each block. | | Unindexed damaged blocks | only in the -v log | unindexed damaged | Failing blocks without an index entry. Most are old copies. | | Undecoded blocks | N undecoded block s | undecoded blocks | Blocks in a format the reader does not know yet. They may hold recent changes. | | Unreadable bodies | N body ies could not be searched search --body | unreadable bodies | Bodies that could not be read, for example because an EFMData file is missing. read and thread show the reason in body.error . | In MCP, partial is true when any of these values except unconfirmed is not zero, or when the block index cannot be read. The result may then be incomplete. On a real store, undecoded blocks is usually not zero, so partial is usually true , and an empty result does not prove that no matching message exists. The body of a message has a kind : inline stored in the store , efmdata stored in a separate file below Files/S0/