{"slug": "outlookcache-read-outlook-for-mac-mail-offline", "title": "Outlookcache – Read Outlook for Mac mail offline", "summary": "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.", "body_md": "`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.\n\nIt 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.\n\nTo 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.\n\nWith Homebrew on macOS:\n\n```\nbrew install --cask stn1slv/tap/outlookcache\n```\n\nBinaries 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`.\n\nWith Go 1.27.4 or later:\n\n```\ngo install github.com/stn1slv/outlookcache/cmd/outlookcache@latest\n```\n\nOr build from source with `make build`; the binary is written to `bin/outlookcache`.\n\nYou 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.\n\n```\noutlookcache accounts                         # mail accounts and the IDs of their standard folders\noutlookcache folders                          # folders with total, unread and unconfirmed counts\noutlookcache messages --folder inbox --unread # unread messages in the Inbox, newest first\noutlookcache messages --days 7                # messages of the last 7 days\noutlookcache search \"quarterly budget\"        # text in subject, preview, sender, recipients or attachment names\noutlookcache search \"budget\" --body           # also search the body text (slower)\noutlookcache read 18800001                    # one message with its body as plain text\noutlookcache thread 18800101                  # messages of a conversation, oldest first (the newest 20 by default)\n```\n\n`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.\n\nThese 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).\n\n| Command | Flags and defaults | \n|---|---|\n| `messages` | `--folder` ,`--unread` ,`--days 0` ,`--limit 50` ,`--confirmed-only` | \n| `search QUERY` | the same as `messages` , plus`--body` | \n| `read MESSAGE_ID` | `--quoted` | \n| `thread CONVERSATION_ID` | `--quoted` ,`--limit 20` (the newest messages are kept) | \n| `mcp` | `--cache-ttl 3m` (a Go duration, such as`180s` or`3m` ) | \n\n`--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.\n\nGlobal flags:\n\n| Flag | Meaning | \n|---|---|\n| `--account ID_OR_ADDRESS` | Only one account, by ID or e-mail address (see `outlookcache accounts` ). With`mcp` , every tool serves only this account. | \n| `--store PATH` | Read this `HxStore.hxd` instead of the one of the default profile. | \n| `--max-content N` | Characters of body text in `read` ,`thread` and the MCP results (`0` means no limit, default`4000` ). | \n| `-v` ,`--verbose` | Log load statistics to stderr. | \n\nEnvironment variables:\n\n| Variable | Meaning | \n|---|---|\n| `OUTLOOKCACHE_STORE` | Default for `--store` . | \n| `OUTLOOKCACHE_MAX_CONTENT` | Default for `--max-content` . | \n| `OUTLOOKCACHE_CACHE_TTL` | Whole number of seconds the MCP server reuses a decoded store (default `180` ). | \n\nThe default store is `~/Library/Group Containers/UBF8T346G9.Office/Outlook/Outlook 15 Profiles/Main Profile/HxStore.hxd`.\n\n`outlookcache mcp` runs a read-only MCP server on stdin and stdout. Example configuration for Claude Desktop or Claude Code:\n\n```\n{\n  \"mcpServers\": {\n    \"outlook\": { \"command\": \"outlookcache\", \"args\": [\"mcp\"] }\n  }\n}\n```\n\nTo 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`.\n\n| Tool | Purpose | Key arguments and defaults | \n|---|---|---|\n| `list_accounts` | Mail accounts and the IDs of their standard folders. | `account` | \n| `list_folders` | Folders with total, unread and unconfirmed counts. | `account` | \n| `list_messages` | Messages without bodies, newest first. | `folder` ,`unread_only` (`false` ),`days` (`0` ),`limit` (`50` ),`confirmed_only` (`false` ),`account` | \n| `search_messages` | Text search in subject, preview, sender, recipients and attachment names. | `query` (required),`in_body` (`false` ), and the arguments of`list_messages` | \n| `read_message` | One message with its body as plain text. | `id` (required, the`id` field of a row),`include_quoted` (`false` ),`account` | \n| `read_thread` | The messages of a conversation with their bodies, oldest first. | `conversation_id` (required),`include_quoted` (`false` ),`limit` (`20` ),`account` | \n\nThe 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.\n\nEvery 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`.\n\nMail 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.\n\n`outlookcache` reads an undocumented file format, so it reports what it could not read instead of hiding it.\n\nEvery 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.\n\nThe CLI shows the other values in the summary line on stderr. The MCP server returns them as fields of every response.\n\n| Value | CLI summary | MCP field | Meaning | \n|---|---|---|---|\n| Unconfirmed messages | `N unconfirmed` | `unconfirmed` | Messages in the result with `confirmed: false` . | \n| Skipped records | `N record(s) skipped` | `skipped_records` | Messages that could not be decoded. | \n| 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. | \n| Unindexed damaged blocks | only in the `-v` log | `unindexed_damaged` | Failing blocks without an index entry. Most are old copies. | \n| Undecoded blocks | `N undecoded block(s)` | `undecoded_blocks` | Blocks in a format the reader does not know yet. They may hold recent changes. | \n| 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` . | \n\nIn 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.\n\nThe body of a message has a `kind`: `inline` (stored in the store), `efmdata` (stored in a separate file below `Files/S0/<n>/EFMData`), `none` (only the preview is stored) or `unparsed` (a layout the reader does not know).\n\nNew Outlook for Mac keeps its mail cache in `HxStore.hxd`, the \"Hx\" store also used by the Mail app of Windows. The file is a sequence of 4 KB pages with LZ4-compressed blocks. `outlookcache`:\n\n1. copies `HxStore.hxd` to a private temporary folder, reads the copy into memory and removes the copy,\n2. checks every block header and payload against its CRC, and decodes the LZ4 blocks with its own decoder,\n3. finds the objects in the blocks: accounts, folders, messages, recipients and attachments,\n4. keeps the current copy of each message, because Outlook writes a new copy on every change and leaves the old ones in the file,\n5. reads bodies on request, from the message block or from an EFMData file (read only, in place), and converts the HTML to plain text.\n\nThe container format follows the public [HxStore specification](https://github.com/securized/hxstore-reverse-engineering) by securized. The record layout (folders, accounts, read state, recipients, attachments and bodies) was mapped for this project with Outlook 16.115. See [docs/STORAGE.md](https://github.com/stn1slv/outlookcache/blob/main/docs/STORAGE.md) for the format, the confidence of each field and the open questions, and [THIRD_PARTY_NOTICES.md](https://github.com/stn1slv/outlookcache/blob/main/THIRD_PARTY_NOTICES.md) for the license.\n\nA new Outlook version can change the layout. When that happens, the counts in the summary go up; please open an issue with the Outlook version and the summary line (never with mail content).\n\nThe tool is read-only and makes no network calls. It never changes, locks, moves or deletes Outlook files. The temporary copy is created with owner-only permissions and removed after each load. Output can contain mail of every account in the store, so treat it as confidential.\n\n```\nmake setup        # download dependencies\nmake test         # unit tests with the race detector\nmake lint         # golangci-lint and gofumpt\nmake format       # format the code\nmake build        # build bin/outlookcache\nmake vulncheck    # check for known vulnerabilities\nmake nonet        # check that no package imports network code\nmake upgrade-deps # update dependencies and pinned Go tools\n```\n\nTests use synthetic data only. `internal/hxtest` writes a synthetic store with two accounts, folders, messages, inline and EFMData bodies. `cmd/hxdiscover` is a development tool for mapping the format; it prints only counts, offsets and redacted shapes, and it is not part of the release.\n\nMIT. See [LICENSE](https://github.com/stn1slv/outlookcache/blob/main/LICENSE) and [THIRD_PARTY_NOTICES.md](https://github.com/stn1slv/outlookcache/blob/main/THIRD_PARTY_NOTICES.md).", "url": "https://wpnews.pro/news/outlookcache-read-outlook-for-mac-mail-offline", "canonical_source": "https://github.com/stn1slv/outlookcache", "published_at": "2026-11-26 07:40:01+00:00", "updated_at": "2026-11-26 08:12:50.015685+00:00", "lang": "en", "topics": ["ai-tools", "agent-protocols", "developer-tools"], "entities": ["outlookcache", "stn1slv", "Microsoft Outlook for Mac", "Microsoft Graph", "Homebrew", "Go", "HxStore.hxd"], "also_reported_by": [], "takeaway": "outlookcache reads new Outlook for Mac's local HxStore.hxd cache and exposes mail as JSON plus a read-only MCP server, avoiding Microsoft Graph app registration and Mail.Read admin consent, but it needs Full Disk Access and does not support legacy Outlook.sqlite.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/outlookcache-read-outlook-for-mac-mail-offline", "markdown": "https://wpnews.pro/news/outlookcache-read-outlook-for-mac-mail-offline.md", "text": "https://wpnews.pro/news/outlookcache-read-outlook-for-mac-mail-offline.txt", "jsonld": "https://wpnews.pro/news/outlookcache-read-outlook-for-mac-mail-offline.jsonld"}}