FO

fanzzzd/openmail

Developer tools
0 stars 0 forks Quality 64 Trend 20MIT

Keyboard-first macOS mail client that keeps your mail in a local SQLite database. AI agents read it over MCP and change it only with your approval.

Overview

OpenMail keeps your mail in a SQLite database on your Mac. The app, a CLI and an MCP server all use that one database. AI agents such as Claude Code and Codex can read the accounts you allow. When an agent wants to change your mail, OpenMail turns the change into an AI suggestion, and nothing happens until you approve it in the app. OpenMail is a keyboard-first mail client for macOS. It syncs Gmail, personal Outlook and IMAP accounts. The app talks directly to your mail provider. There is no OpenMail server and no telemetry. OpenMail is in early testing. Expect rough edges, and please report them in Issues. In this recording, an MCP request under Claude Code's client name asks to archive three newsletters. OpenMail lists it under with the agent's reason. The newsletters leave the inbox only after . - An agent sees an account only after you turn on for it in . OpenMail checks this on every tool call. - MCP tools read and search mail. starts at , which makes every write tool refuse.

README

OpenMail

English | 简体中文

Your mail on your Mac, readable by the agents you allow.

OpenMail keeps your mail in a SQLite database on your Mac. The app, a CLI and an MCP server all use that one database. AI agents such as Claude Code and Codex can read the accounts you allow. When an agent wants to change your mail, OpenMail turns the change into an AI suggestion, and nothing happens until you approve it in the app.

OpenMail is a keyboard-first mail client for macOS. It syncs Gmail, personal Outlook and IMAP accounts. The app talks directly to your mail provider. There is no OpenMail server and no telemetry.

OpenMail is in early testing. Expect rough edges, and please report them in Issues.

AI agents, with your approval

In this recording, an MCP request under Claude Code’s client name asks to archive three newsletters. OpenMail lists it under AI suggestions with the agent’s reason. The newsletters leave the inbox only after Approve.

  • Per-account consent. An agent sees an account only after you turn on Allow AI to read this account for it in Settings → AI Access. OpenMail checks this on every tool call.
  • Read-only by default. MCP tools read and search mail. Changes by AI apps starts at Read only, which makes every write tool refuse.
  • AI suggestions. Write tools take two switches: check Allow AI suggestions when you connect the app, and set Changes by AI apps to Ask me first. Then modify_threads, snooze_threads and draft_message create AI suggestions. Each one waits in AI suggestions until you approve or reject it.
  • No agent sends mail. A drafted message opens in the composer, and you send it yourself.
  • Connect from Settings. OpenMail can connect Claude Code, Codex, Claude and Cursor for you. It shows the config diff first and edits only the openmail entry. Any other MCP client can run /Applications/OpenMail.app/Contents/MacOS/OpenMail --mcp.
  • Built-in AI, off by default. With your own Anthropic API key and only for the accounts you allow: summaries, a mail assistant, writing help and inbox triage. The assistant also makes AI suggestions instead of changing mail itself.

See CLI and MCP for the tool list and the approval rules.

Features

  • Accounts. Gmail, personal Outlook (outlook.com, hotmail.com, live.com), iCloud, Yahoo, QQ, 163, Fastmail and any IMAP/SMTP server. Work and school Microsoft 365 accounts are not supported.
  • Local-first. Reading, searching and organizing work offline. Changes queue up and reach the server when you are back online.
  • Local search. Full-text search (SQLite FTS5) with boolean, phrase, date, size and attachment operators, optionally merged with server results. Optional on-device OCR, PDF text and semantic search. Semantic search needs Apple silicon; on Intel Macs it stays off, because ONNX Runtime ships no Intel Mac build.
  • Keyboard-first. Three shortcut sets (Mimestream, Gmail, Apple Mail), link hints in messages, Back and Forward, and keyboard navigation through the list, reader, composer and settings.
  • Phone access over Tailscale. Open your mailbox in a phone browser through your own tailnet. Off by default, never on the public internet, limited to the Tailscale logins you allow.
  • Ten languages. English, Simplified Chinese, Czech, Dutch, French, German, Italian, Japanese, Russian and Spanish.
  • Safe reading. Message HTML renders in a sandbox without scripts. Known trackers are removed under every remote-image setting.

The screenshots and the recording use fake mail from scripts/demo-data.mjs. The script also makes the pending AI suggestion: it calls modify_threads on the built CLI’s MCP server under Claude Code’s client name, claude-code.

How it compares

OpenMail Mimestream Spark Thunderbird Apple Mail
Source Open (MIT) Closed Closed Open (MPL 2.0) Closed
Price Free Paid subscription Free, with paid plans Free Included with macOS
Platforms macOS (mobile in development) macOS macOS, iOS, Android, Windows Windows, macOS, Linux, Android macOS, iOS, iPadOS
Gmail Yes (Gmail API) Yes (Gmail API) Yes Yes (IMAP) Yes (IMAP)
Personal Outlook Yes (Microsoft Graph) No Yes Yes Yes
Other IMAP Yes No Yes Yes Yes
Mail path through a vendor’s server No No Yes, for some features No No
Maturity Early testing Mature Mature Mature Mature

OpenMail is younger than all of these and has rough edges. Mimestream is the reference for its Gmail features; the gaps are tracked in docs/parity.md (in Chinese). The table reflects the products’ public pages as of October 2026. If a cell is wrong, please open an issue.

Install

There is no signed release yet. Published builds will appear on the Releases page. Until then, build from source:

  1. Install the prerequisites: macOS 13+, Node 24 (see .nvmrc), pnpm through corepack enable, and the Xcode Command Line Tools. Xcode 26 is optional and only changes the app icon. See Build from source.

  2. Build and package:

    git clone https://github.com/Fanzzzd/openmail.git
    cd openmail
    pnpm install
    pnpm --filter @openmail/desktop dist   # Xcode 26 optional, see step 1
    

    dist builds core, the CLI and the desktop app first, so no separate pnpm build is needed. It packages an arm64 and an x64 app, and downloads a second Electron build for the architecture your Mac does not run.

  3. Open apps/desktop/release/OpenMail--mac-.dmg and drag OpenMail to Applications.

A build you make yourself opens normally. Gatekeeper blocks a downloaded build that is not notarized on first open. Open it once, then go to System Settings → Privacy & Security and click Open Anyway.

Quick start

  1. Open OpenMail and pick Gmail, Outlook or an IMAP provider. A source build has no built-in OAuth client: register your own for Google or Microsoft as in Using your own OAuth client and paste it on the add-account screen. IMAP needs only an app password.
  2. OpenMail downloads recent mail first and fills in older mail in the background.
  3. Press ? to see the keyboard shortcuts and ⌘F to search. The shortcut reference lists all three sets.
  4. To use your mail from Claude Code or Codex, open Settings → AI Access, allow the account, then connect the app under AI apps. Or point any MCP client at /Applications/OpenMail.app/Contents/MacOS/OpenMail --mcp. Connect by hand has the CLI command for a source checkout.

Privacy

  • Mail, attachments and the search index stay in ~/Library/Application Support/openmail (override with OPENMAIL_HOME).
  • Attachments you open in another app are copied to ~/Library/Application Support/OpenMail/Opened Attachments. Unchanged copies are deleted after 7 days, unless another app still has the copy open (its lock file is in the folder). Settings → Local cache clears it anyway. Edited ones stay until you clear them in Settings → Local cache. Time Machine skips the folder.
  • Refresh tokens, IMAP passwords and API keys go only to the macOS Keychain.
  • The app connects to your mail provider. It connects to Anthropic only if you turn on AI, only for the accounts you allow, with your own key.
  • Remote images in a message load from the sender’s servers by default, which can see when you open the message. OpenMail removes known tracking pixels first. You can load images only from people you know, or ask each time.
  • On-device models download from Hugging Face only if you turn them on. No mail data goes there.
  • Signed builds check GitHub for updates, without an account or token.
  • No telemetry, no analytics, no OpenMail server.

Details: privacy policy and security model.

Documentation

User docs: openmail-docs.vercel.app. Developer docs are in docs/: architecture, testing, release, security, the glossary and the changelog. Some deeper notes, such as sync correctness and performance, are still in Chinese.

Contributing

Bug reports, fixes and translations are welcome. Read CONTRIBUTING.md for setup, the checks every change must pass and the architecture rules. It also shows how to run the dev app with a separate data directory, so development never touches your real mail. Ask questions in Discussions. Report security problems privately, as described in SECURITY.md.

License

MIT © 2026 Fanzzzd and OpenMail contributors. Third-party assets and libraries, including libvips under LGPL-3.0-or-later, are listed in THIRD_PARTY_NOTICES.md. Provider icons by selfh.st (CC BY 4.0).

View this README on GitHub

Install

This server does not publish a one-line install command.

Open the repository installation guide