
Envelope
io.github.tymrtn由 GitHub 帳號 tymrtn 發布v1.3.26更新於 Oct 30, 2026
Your own IMAP/SMTP mailboxes as agent tools, with per-agent policy and human-approved sends.
概覽
本機 MCP 伺服器,讓助理以工具操作自有 IMAP/SMTP 信箱,草稿須經人工核准才會寄出。
- 可以做什麼
- 跨帳號讀取、搜尋與瀏覽郵件:收件匣、讀取、搜尋、資料夾、討論串、監看狀態
- 撰寫與管理郵件:寄送、回覆、轉寄與回覆草稿、修改或寄出草稿、移動、標記、加標籤、延後提醒
- 管理帳號與聯絡人,並執行批次操作
- 預覽與執行規則,檢視威脅評分與寄送閘門目錄
- 適用情境
- 適合讓助理在既有的 Gmail、Fastmail、iCloud、Migadu 或其他 IMAP 信箱中分類、搜尋、起草與寄送郵件,尤其需要依代理設定政策、寄送前人工確認的情境。
- 執行需求
- 需在本機安裝 envelope 執行檔(安裝腳本、Homebrew 或 MCP Bundle),以 envelope mcp 透過 stdio 啟動。信箱帳號需以應用程式專用密碼或信箱密碼加入,或使用 Google 登入。非互動使用需以 ENVELOPE_MASTER_PASSPHRASE_FILE 提供通關片語檔,並以 ENVELOPE_AGENT_TOKEN 提供代理權杖。需能連線至郵件伺服器。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Envelope,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
📧 Envelope
U+1F4E7 — if you know, you know.
One inbox for all your email accounts, shared with your agents.
Why U1F4E7? It's the Unicode codepoint for 📧. Humans see a repo name. Agents see an envelope.
Setup • Travel • CLI • Rules • MCP • Agent plugins • vs. Alternatives • Dashboard • Commercial licensing • License
[Rust] [v1.3.26] [License: FSL-1.1-ALv2]
Envelope connects to the email accounts you already have (Gmail, Fastmail, iCloud, your own domain, any IMAP server) and puts them in one place. Open the Unified Inbox in your browser to read every account together, search them all at once, and archive or snooze across accounts in one pass. Your agents work the same mailboxes from the CLI, with JSON output, or over MCP, and anything they draft waits for your approval.
You don't change DNS, set up a new domain, or pay per-message fees. Add each address with its app password and go.
Install
To build it yourself instead:
The release workflow signs and notarizes the macOS binaries once its Apple
credentials are configured (docs/release-signing.md);
until then macOS release binaries are unsigned. If macOS refuses to run an
unsigned tarball you downloaded in a browser, clear the quarantine flag:
xattr -d com.apple.quarantine ~/.local/bin/envelope.
Quick start
Envelope signs in to IMAP and SMTP with a password or an app password, and to Gmail with Google sign-in. That decides which mailboxes work today:
- Fastmail and iCloud Mail: create an app password in the provider's security settings.
- Gmail:
envelope accounts add --provider google --email [email protected]signs in with Google in your browser;envelope accounts reauth [email protected] --provider googleswitches an account added with a password. While Envelope's Google app is in Google's testing stage, only addresses on its test-user list can sign in, and Google asks again every 7 days. An app password still works for accounts that can create one. From another device, add--paste(automatic over SSH), or run--paste --no-waitnow and--finish -within 24 hours. - Migadu, self-hosted Dovecot, and most other IMAP hosts: your normal mailbox password.
- Proton Mail: through Proton Mail Bridge, which needs a paid Proton plan. See Proton Mail for the setup.
- Outlook.com, Hotmail, Live, and Microsoft 365: not supported yet. Microsoft turned off password sign-in for IMAP on Outlook.com accounts and Exchange Online, so an app password does not help.
Envelope encrypts saved credentials with a passphrase. In a terminal it asks you for one. Scripts, agents, and the piped command below have no terminal to ask from, so give Envelope a passphrase file first:
The dashboard opens as a three-pane mail shell. Unified Inbox is the default read-only surface and loads from the local message index; explicit refreshes or account/folder selections are what touch live IMAP mailboxes.
Actual sends are outbox-first. By default, an allowed send queues with a safety cooldown and the scheduled-send sweep performs the SMTP transmission later. Every agent send must declare factual attributes, and Envelope checks them against what it can observe before anything is queued or sent.
Governor scoring is a build-time Cargo feature, off by default. Homebrew and the
release archives are built without it, so their sends are not scored by
Governor, and send results and audit events record the gate as
mode: "off". In those builds the draft-only ceiling still binds MCP sessions
that carry an agent token, but an agent with shell access can send through
envelope send (which defaults to autonomous-send), so give agents MCP with
an agent token rather than a shell. Builds made with
cargo build --release --bin envelope --features governor (or
cargo install --path crates/cli --features governor) derive sanitized
contextual attributes immediately before SMTP and ask Governor to score them
with governor score --catalog envelope; only an opaque Governor allow sends.
Those builds expect the Governor binary at the path pinned in
SMTP_GOVERNOR_BIN (crates/email/src/outbound.rs), and every send fails
closed when it is missing. Message bodies, full recipient
addresses, attachment bytes, and secrets never enter the Governor request.
Dashboard URL metadata in --json output is discovered fresh for each UI
construction or request, from an active local tailscale serve HTTPS route whose
root proxy targets http://127.0.0.1:3141. It otherwise falls back to
http://localhost:3141.
Every agent-facing ui object reports that decision as
dashboard_origin_source (tailscale_serve or localhost_fallback) and adds
a non-secret dashboard_origin_warning only when discovery needs attention.
MCP results omit these ui objects and skip Tailscale discovery unless the
call passes include_ui_links: true, so the host's tailnet name stays out of
model context by default.
dashboard_path is always portable and remains the canonical handle for agents;
dashboard.base_url and the legacy dashboard-base environment variables are
retained only for compatibility and do not affect emitted agent UI links.
Tailscale Serve keeps the dashboard tailnet-only; Tailscale Funnel publishes it
on the public internet, so do not use Funnel for a mailbox dashboard unless that
exposure is intentional.
Authentication (required before any non-loopback exposure)
On 127.0.0.1 the dashboard is an unauthenticated single-user local surface —
the same trust boundary as your shell. The REST API reads and deletes mail,
manages accounts, and queues sends, so the moment it is reachable by another
device (a non-loopback --bind, or a tailscale serve front-end) it must
require a credential. Configure one of:
- Tailscale identity allowlist (
dashboard.tailscale_allow) — a request whoseTailscale-User-Loginheader (injected bytailscale serve) is in the allowlist is authorized. Humans just open the.ts.netURL; no token to type. Only safe behindtailscale serve, which sets and strips that header. - Bearer token (
dashboard.auth_tokenorENVELOPE_DASHBOARD_TOKEN) — sent asAuthorization: Bearer <token>(orX-Envelope-Token), compared in constant time. The path for Hermes/OpenClaw agents and scripts.
Once either is configured, every /api route returns 401 without a valid
credential — including when tailscale serve fronts loopback. envelope serve --bind <non-loopback> refuses to start unless an auth method is configured.
/api/health stays reachable for liveness probes but discloses local
filesystem paths only to authorized callers. The CORS allowlist is a
browser-only defense, not the access control.
Why not Himalaya / Cloudflare / Resend?
vs. Himalaya
Himalaya is a great CLI email client. Envelope is a CLI email client built for agents.
vs. Cloudflare Email Service
Cloudflare's Email Service (public beta, April 2026) is email infrastructure for the Cloudflare platform. Envelope is email mastery for your existing mailbox.
vs. Resend / Mailgun / SendGrid
Provider support
Envelope auto-discovers IMAP/SMTP from your email domain via DNS. Tested with:
Proton Mail
Proton Mail Bridge runs on your computer and serves your Proton mailbox over
IMAP and SMTP on 127.0.0.1. Bridge is
available only with a paid Proton Mail plan.
Envelope's Bridge support has been tested against a stand-in server that
presents a certificate shaped like Bridge's. Nobody has run it against Bridge
itself yet, so please report what you find.
- Install Bridge, sign in, and open your account's Mailbox details. Note the password Bridge shows there; Envelope signs in to Bridge with it, and your Proton account password won't work. Bridge uses IMAP port 1143 and SMTP port 1025 by default, with STARTTLS on both unless you change its connection mode.
- Bridge encrypts those connections with a
self-signed certificate
it made when you set it up. Export it from Settings → Advanced settings →
Export TLS certificates. Bridge writes
cert.pemandkey.pemto the folder you pick. Envelope needs onlycert.pem; it skips any private key in the file and never stores one. - Add the account:
--trust-cert makes this account accept exactly that certificate for its
IMAP, SMTP and ManageSieve connections, in place of the public certificate
authorities. Every other account checks certificates as before. If you set
Bridge's IMAP connection mode to SSL, use --imap-security tls. Keep Bridge's
SMTP on STARTTLS: Envelope uses SSL for SMTP only on port 465.
When Bridge's certificate changes, Envelope refuses the connection before it
signs in and prints the fingerprints of the trusted and the presented
certificates. Export the new certificate and trust it with
envelope accounts tls --account [email protected] --trust-cert cert.pem.
envelope accounts tls --account [email protected] shows what the account
trusts now, and openssl x509 -noout -fingerprint -sha256 -in cert.pem
prints a file's fingerprint in the same form.
MCP server
envelope mcp starts a Model Context Protocol server over stdio — drop-in email for Claude Code, Cursor, Zed, or any MCP runtime.
Framing follows the MCP stdio spec: one newline-delimited JSON-RPC message per line on stdout, nothing else on that stream (logs go to stderr). On stdin the server accepts newline-delimited JSON and, for callers written against versions before 1.1.0, the legacy Content-Length: framing — detected per message.
Tools include inbox, read, search, send, reply, create_reply_draft, create_forward_draft, modify_draft, get_draft, send_draft, move_message, flag, folders, tag, contacts, accounts, bulk, thread, rules_preview, rules_run, watch_status, snooze, plus threat_show and governor_catalog. Envelope is the only MCP email server that works against any IMAP provider.
For a single, distribution-ready operating guide to hand a fresh agent, see the Envelope agent skill.
For a walkthrough of running multiple agents from one shared inbox with scoped policies, see Agents at a glance.
The Dockerfile runs the MCP server in a container (docker build -t envelope ., then docker run -i --rm envelope). Mount a data directory at /home/envelope/data and pass ENVELOPE_AGENT_TOKEN for an agent created in it. Without a token, the container starts only when it has no database yet. It then creates a throwaway agent in that empty store, which has no mail accounts, so MCP directories can start the server and list its tools.
Use Envelope from your agent
Envelope ships as a plugin for Claude Code, Codex and Cursor, and as skills on
skills.sh. Each install adds two skills: envelope for working mail, and
envelope-setup for first-run setup. It also adds the local MCP server
(envelope mcp).
Prerequisite: the envelope binary on PATH. The envelope-setup skill
walks through this if it's missing.
tymrtn/u1f4e7/u1f4e7 is a live Homebrew compat alias for the same formula.
Then add your accounts and create a token for the agent. Run both in your own terminal, so your password and token never pass through the agent:
Agent names are unique, and the free tier allows two active agents
(envelope agent list shows them). Use one name per tool, or reuse one
agent's token in several tools.
Claude Code (it asks for the token while installing):
Codex (it forwards ENVELOPE_AGENT_TOKEN from your shell environment):
Then, in an editor, add the token to the shell profile that starts Codex (for
example ~/.zshrc). Typing it at the prompt would leave it in shell history.
Cursor Marketplace plugin: install Envelope from the marketplace, then set
ENVELOPE_AGENT_TOKEN under Plugins → Configure. Listing copy is
in MARKETPLACE.md.
Claude Desktop (MCP Bundle): download envelope-<version>.mcpb from the
latest release and open it.
Claude asks for the token, and for your passphrase file if you set
ENVELOPE_MASTER_PASSPHRASE_FILE. The bundle carries its own envelope binary
for macOS and Linux and uses the same accounts and data as the CLI.
Skills only (any agent that skills.sh supports):
Plugin versions follow Envelope releases; ci/check-agent-plugins.sh enforces it.
Rules engine
The agent is the intelligence. Envelope is the execution.
The LLM teaches Envelope what to look for. Envelope applies those patterns deterministically. The LLM only re-engages when something new appears.
rShield
rShield scores every message for phishing and malware on your machine: clean, suspicious, dangerous, or unavailable when an analyzer that had to answer could not. Six local analyzers are on by default and send nothing anywhere.
Two optional analyzers are off until you enable them:
threat report also looks up abuse contacts over RDAP for the sending domain and, when there is one, the imitated domain, sending those domain names to their registries. Every outside lookup is logged as a lookup_performed event. Spamhaus restricts free and commercial use of its blocklists; read their usage terms first. Setup details, weights and the clamd walkthrough are in docs/rshield.md.
Dashboard
envelope serve starts a localhost web UI at http://localhost:3141.
- Left mailbox sidebar with Unified Inbox, Today/Needs Attention, Snoozed, Sent, Drafts, All Mail, and account mailboxes
- Middle message list with a permanent right-side reader
- Review page for agent drafts waiting on your approval, and a Logs page with each agent's history
- Reply / Reply-all with automatic header threading
- Compose with text/html toggle and file attachments
- ★ Snoozed virtual folder with overdue highlighting
- Search across every account with Gmail-style operators (
from:,subject:,is:unread,before:)
Travel
Envelope Travel is a self-hosted itinerary and family-coordination workspace at
/travel. It uses the Gmail or Google Workspace
address you already own—no forwarding address or new travel account.
- Turn on Google 2-Step Verification and create an app-specific password.
- Run
envelope serve, open Travel, and enter the address plus that app password. Envelope verifies Gmail before saving the encrypted credential. A fresh macOS install uses Keychain automatically; an existing encrypted file store remains in place. On a headless Linux host, setENVELOPE_MASTER_KEYorENVELOPE_MASTER_PASSPHRASE_FILEbefore starting the service. - Leave confirmations in the configured Gmail folder (INBOX by default), pick
[Gmail]/All Mailin Travel settings to include archived confirmations, or paste a confirmation into the receipt desk. The mailbox scan is read-only: IMAPEXAMINEplusBODY.PEEK[]never marks mail as read.
The workspace groups flights, lodging, rail, cars, and activities into trips;
keeps the source receipt and parser provenance; quarantines uncertain details
for approval; detects emailed changes and cancellations; schedules reminders;
and provides shared tasks. Family links are revocable and structurally omit
confirmation codes, receipt text, private notes, and parser metadata. Each
share also gets a separate read-only .ics capability, so Apple Calendar,
Google Calendar, or another subscriber never receives task-edit authority.
For a computer-only install, keep envelope serve running while you need sync,
alerts, family pages, or calendar refreshes; a sleeping laptop cannot poll
Gmail. For access from family devices, the recommended remote shape is the
Tailscale setup in Quick start. For an always-on Linux host, install the
systemd user service from docs/install-linux.md, put
ENVELOPE_HOME on persistent encrypted storage, require dashboard auth, and
terminate TLS with Tailscale Serve or a trusted reverse proxy. Do not expose a
mailbox dashboard anonymously. Gmail onboarding is deliberately disabled when
Envelope binds directly to a non-loopback address: enter the app password only
through localhost, or through an HTTPS/Tailscale proxy whose Envelope listener
remains on loopback. A custom proxy must overwrite X-Forwarded-Proto with the
actual client-facing scheme; plaintext proxy requests and conflicting HTTP
browser origins are refused for Gmail credential setup.
Travel changes and delays currently come from messages received in Gmail. Live gate, aircraft, baggage-belt, and operational delay telemetry requires a separate flight-status provider and is not inferred when the airline has not emailed an update. Scheduled alerts appear in the Travel workspace; this build does not yet deliver push notifications when the browser is closed.
Commercial licensing
Personal use is free. Commercial rollout is a flat annual license sized by the number of mailbox users on one primary domain:
"Commercial use" means any use of Envelope by or for a company, team, agency, or paid project, including internal operations, customer workflows, or embedding Envelope in a product. "Mailbox users" means distinct human or service mailbox identities on the licensed domain that Envelope is configured to read, send, or automate. One person with multiple aliases on the same mailbox counts as one user. "Domain" means one primary email domain; subdomains of that primary domain are included, and additional unrelated domains require Enterprise.
Licenses are annual, non-transferable across organizations, and renew on the anniversary of issue. Request an annual license at [email protected].
Evidence bundles
envelope evidence collects a query-scoped, local evidence bundle while leaving the source mailbox read-only. Collection opens the requested folder with IMAP EXAMINE and fetches canonical raw RFC822 originals with BODY.PEEK[].
Structured filters can replace or combine with --query: --from-address, --to-address, --subject, --since, --before, --body, and repeatable --keyword. At least one filter is required unless the raw query is explicitly ALL.
Thread expansion is header-driven and bounded. By default, --include-thread fetches at most 500 messages while following Message-ID, In-Reply-To, and References links; adjust with --max-thread-messages. If the cap is reached, the bundle records a warning.
Evidence bundles intentionally expose message metadata, account identity, IMAP host/username, and local source paths for provenance. Treat bundles as sensitive even though they do not serialize passwords, OAuth tokens, or credential file paths.
Bundle layout:
Thread inclusion is driven only by Message-ID, In-Reply-To, and References; subject matching is never used as a fallback. Hash files provide local tamper evidence, not an external signature. Non-goals for the MVP: ZIP packaging, detached signatures, PST/mbox conversion, multi-account collection, mailbox mutation, and restore/import into a mailbox.
CLI reference
Every command supports --json for agent consumption.
Architecture
Development
See CHANGELOG.md for per-release notes.
License
FSL-1.1-ALv2 — source-available, no competing services. Separate annual commercial licenses are available for organizational rollout, support, Enterprise/OEM terms, and uses outside the public license. The public license becomes Apache 2.0 two years after each release.
Copyright © 2026 Tyler Martin.
Built by Tyler Martin
Your agent shouldn't need a $50/month Resend plan to send an email.
來源:README.md,提交 da91141
工具
0版本歷史
1- v1.3.26最新Oct 29, 2026
評分
已滿足適用檢查項的 40%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
請在儲存庫或註冊中心條目中宣告授權條款。