Mailsnail

io.github.iancollins27由 GitHub 帳號 iancollins27 發布v0.6.1更新於 Nov 7, 2026

Send USPS letters & certified mail from any agent. Hosted: sign in, no install.

已驗證Streamable HTTP可網頁執行效率與工作流商業與電商

概覽

AI 產生的概覽

讓助理驗證地址、預覽樣張並寄出真實的 USPS 平信、掛號信與明信片,可用託管服務或自架部署。

可以做什麼
  • 驗證收件地址,並在寄出前產生樣張 PDF 與精確報價
  • 寄送平信、掛號信與明信片,並查詢、列出或取消已寄郵件
  • 查詢帳戶餘額並為託管寄送儲值
  • 診斷網路連線與服務商設定
  • 在託管服務、自有 Click2Mail 或 Lob 帳戶、自架閘道與容錯切換之間選擇
適用情境
當助理需要把紙本信件真正投遞到美國信箱時使用,例如日常通信,或必須寄出且可追蹤的掛號法律通知。託管連接器適合不想安裝、也不想申請服務商帳戶的使用者。
執行需求
使用遠端端點並以 OAuth 登入,或在本機以 Node.js 執行 npm 套件。自架需設定 MAIL_PROVIDER 及服務商憑證:CLICK2MAIL_USERNAME 與 CLICK2MAIL_PASSWORD,或 LOB_API_KEY;託管模式需 MAIL_API_BASE_URL。需要能連線至服務商或閘道主機的網路。
安裝前請注意
寄信會實際花錢:託管模式按封以信用卡付款或從餘額扣款,自帶憑證模式則計入你的服務商帳戶。實際寄出需設定 MAIL_MCP_ALLOW_LIVE=1,建議維持預設演練並設定 MAIL_MCP_SPEND_CAP_USD。服務商金鑰以環境變數傳入。郵件一旦進入生產流程便無法撤回,且須遵守 USPS 規定與服務商條款。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Mailsnail,將其新增到工作區。
  2. 連接 所需的 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
  3. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.iancollins27%2Fmailsnail/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。 客戶端會在首次連接時完成 OAuth 登入。

{
  "mcpServers": {
    "mailsnail": {
      "type": "http",
      "url": "https://api.mailsnail.dev/mcp"
    }
  }
}

README

[Mailsnail]

Mailsnail

[smoke]

Open-source, provider-agnostic physical mail for AI agents.

Agents have every channel except one. They can email, text, call, and post to every feed — but until now, putting a real, postmarked envelope in a mailbox meant a human signing up for a print-provider account, provisioning API keys, and wiring billing. Mailsnail closes that gap:

  • Nothing to install. Add one URL to Claude, ChatGPT, Cursor or any MCP client and sign in. Pay for one letter by card or fund a balance, priced at our cost: from $1.21 first-class and $8.61 certified, no subscription. Agents that can mint a Stripe Shared Payment Token can also pay per piece with no account, over the Machine Payments Protocol (HTTP 402).
  • No lock-in, ever. The provider layer is open and swappable: bring your own Click2Mail or Lob account, self-host the whole gateway, or chain providers for failover. The managed service is a convenience, not a cage.
  • Built for compliance mail. Certified letters with extra_service: "certified" — the mail that legally must be physical (preliminary lien notices, legal notices) and must not miss its deadline because one print API had a bad day.
bash
claude mcp add -t http mailsnail https://api.mailsnail.dev/mcp# then /mcp → mailsnail → Authenticate, and: "Mail a thank-you letter to my aunt."

In Claude Desktop or ChatGPT, add https://api.mailsnail.dev/mcp as a custom connector. Steps for every app: mailsnail.dev/setup. Running your own Click2Mail or Lob account instead? See Ways to run it.

Hosted connector and plugins

The quickest start needs no install. Add https://api.mailsnail.dev/mcp as a custom connector in Claude, ChatGPT, Cursor or any MCP client that supports remote servers, then sign in. Each app's setup steps are at mailsnail.dev/setup.

plugins/mailsnail packages that connector with skills for sending letters, sending certified mail and tracking mail. It works in Claude (chat, Cowork and Claude Code) and in Cursor. To install it in Claude Code:

text
/plugin marketplace add iancollins27/mailsnail/plugin install mailsnail@mailsnail

Packages

PackageWhat it is
mailsnailMCP server — 11 tools (doctor, verify_address, preview_letter, send_letter, send_postcard, get_balance, top_up, get_letter, get_postcard, list_letters, cancel_letter) over any provider below. Works in Claude Code, Claude Desktop, Cursor, Codex CLI, OpenAI Agents SDK.
@mailsnail/coreProvider-agnostic core: adapters (Click2Mail, Lob, any Mailsnail gateway), multi-provider failover router, request validation. Zero dependencies.
@mailsnail/gatewaySelf-hostable REST API: BYO provider credentials, body_text→PDF rendering, proofs, invocation logging. The managed service at api.mailsnail.dev runs the same wire protocol.
spec/The provider-neutral mail-piece schema + the failover-safety contract. Implement it and anything — including a print shop — becomes a Mailsnail-compatible node.

Ways to run it

ModeCredentialsPayingGood for
hosted connector (api.mailsnail.dev/mcp)none; you sign inyou, per letter by card or from a balancepeople in Claude, ChatGPT, Cursor; zero-setup
managed (stdio default)noneagent, per piece (Stripe SPT)agents that can mint an SPT
gatewayyour own, on your serveryour provider accountteams; PII stays in your infra
click2mail / lob (BYOK)yours, local envyour provider accountdirect control, one provider
failover chainyours, per provideryour provider accountsmail that must not miss deadlines

Failover is deliberately conservative: a send moves to the next provider only when the failed provider guarantees nothing entered production and no money moved (safeToRetry — see the spec). A duplicate certified letter is worse than an error.

Running behind an egress proxy or allowlist

Sandboxed agents — CI runners, enterprise agent platforms, hosted agent sessions — usually sit behind an egress allowlist, and that is the environment managed mode is for. Two minutes of setup:

bash
npx mailsnail doctor      # says exactly what it can and can't reach, and why. Free; never mails.

Allow this host:

ModeHost to permitPort
managed (default)api.mailsnail.dev443 (TCP / HTTPS CONNECT)
self-hosted gatewaywhatever MAIL_API_BASE_URL points atits port
click2mail (BYOK)rest.click2mail.com443
lob (BYOK)api.lob.com443

Allowlist by hostname, not IP: the managed gateway runs on managed infrastructure and its addresses change without notice. If your policy is IP-only, self-host @mailsnail/gateway on an address you control — that escape hatch is the whole point of the open provider layer.

Through an HTTP proxy. Node's fetch ignores HTTPS_PROXY unless you tell it not to, so an allowlisted gateway can still time out silently. Either:

bash
export NODE_USE_ENV_PROXY=1        # Node >= 22.21export HTTPS_PROXY=http://proxy.example:8080

or install undici alongside mailsnail (npm i undici) and Mailsnail routes through HTTPS_PROXY/HTTP_PROXY/ALL_PROXY itself, honoring NO_PROXY. mailsnail doctor tells you which of these is actually in effect.

TLS-inspecting proxy? Point NODE_EXTRA_CA_CERTS at your organization's CA bundle.

When it's blocked anyway, the failure says so instead of guessing: transport errors carry a code of unreachable, egress_blocked, or tls_untrusted, plus the exact host:port to permit. Any of those codes means the request never reached the backend — nothing mailed, nothing was charged, and the fix is network policy, not your account.

Safety

  • Dry-run by default everywhere; live mail requires an explicit MAIL_MCP_ALLOW_LIVE=1.
  • Per-session spend caps in the MCP server; auto-refund in managed mode when a paid piece fails to mail.
  • preview_letter returns a proof PDF and exact price before anything is charged — show it to your user first.
  • Don't use this for spam, harassment, or fraud. Provider terms and USPS regulations apply; managed mode enforces its own abuse screening.

Why open source

You're letting software put paper in mailboxes and spend money doing it. Read the code. Run it yourself with your own provider account for free. Use managed mode when you'd rather not hold credentials at all. If we ever disappoint you, MAIL_PROVIDER=click2mail and your mail keeps moving — that's the deal, and it's enforceable because this repo exists.

Status

Early. US-only today. Letters, certified letters, and postcards. The managed API, MCP server, self-host gateway, and Click2Mail/Lob adapters are live; additional adapters (PostGrid, Stannp) are next — CONTRIBUTING.md has the adapter guide if you want one sooner.

License

MIT.

來源:README.md,提交 6367d26

工具

0
該伺服器需要登入,因此 SourceWeft 無法在沒有帳號的情況下讀取其工具,也未收錄。已連接帳號所能看到的內容可能因帳號及其權限而異。

版本歷史

2
  1. v0.6.1最新Nov 7, 2026
  2. v0.6.0Sep 16, 2026

評分

已滿足適用檢查項的 85%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分