Mailgi

xyz.mailgi由 mailgi.xyz 發布官方發布者v1.0.0更新於 Nov 1, 2026

Email for AI agents: register a real inbox with no human, then send, receive and read mail.

已驗證Streamable HTTP可網頁執行溝通與協作商業與電商

概覽

AI 產生的概覽

Mailgi 讓 AI 代理擁有真實可用的電子郵件地址,透過託管 API 收發、閱讀與整理郵件。

可以做什麼
  • 註冊代理,並管理其 API 金鑰、個人資料與用量計數
  • 列出、讀取、寄送、移動、標記與移至垃圾桶郵件,建立或重新命名資料夾
  • 查看錢包餘額、帳務流水與儲值付款連結
  • 註冊收信 webhook 端點,檢視投遞紀錄並重新投遞
  • 以電子郵件驗證碼登入主控台,管理組織、成員與角色
適用情境
適合需要真實可投遞信箱而非模擬收件匣的情境:註冊服務、接收驗證信、寄送通知,或用 webhook 處理來信。
執行需求
遠端 streamable HTTP 端點 api.mailgi.xyz,無需本機安裝。代理類工具需要 Authorization 中的 Bearer API 金鑰,可由 register_agent 產生。組織類工具需要 X-Mailgi-Session 工作階段權杖,透過 org_login_request_code 與 org_login_verify 取得。寄信至外部地址會計入錢包費用。
安裝前請注意
API 金鑰、webhook 簽章密鑰與工作階段權杖僅顯示一次,請妥善保存。寄信至外部地址會產生費用,儲值需把信用卡付款連結交給真人完成。部分工具具破壞性且無法復原:agent_delete 會刪除代理、信箱及所有金鑰,刪除資料夾、郵件與 webhook 會變更既有資料。郵件內容與地址會經過第三方服務。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Mailgi,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

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

交給代理程式安裝

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

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

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

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "mailgi": {
      "type": "http",
      "url": "https://api.mailgi.xyz/mcp"
    }
  }
}

README

Mailgi

Email for AI agents. Every agent gets a real, deliverable mailbox and uses it entirely over REST — no SMTP or IMAP client required.

This repository

PathWhatStatus
packages/typescriptTypeScript SDK + mailgi CLI — npm @mailgi/mailgipublished
packages/pythonPython SDK — PyPI mailgiplanned
apps/uiReact developer UI for inspecting mailboxesdev tool
specopenapi.json — the contract every SDK targets—

The API and mail infrastructure live in a separate private repository.

Quick start

bash
npm install -g @mailgi/mailgi
mailgi register --label my-agent          # saves to ~/.mailgi/config.jsonmailgi send --agent <handle> --to [email protected] --subject Hi --body Hellomailgi inbox --agent <handle>

Or from code:

ts
import { AgentMailboxClient } from "@mailgi/mailgi";
const client = AgentMailboxClient.withApiKey("https://api.mailgi.xyz", process.env.MAILGI_API_KEY!);await client.sendMail({ to: ["[email protected]"], subject: "Hi", textBody: "Hello" });

Working on this repo

bash
npm install                      # installs all workspacesnpm run build                    # builds every packagenpm test                         # runs every package's testsnpm run dev -w @mailgi/ui        # developer UI on :5173

Workspaces are listed explicitly in the root package.json rather than globbed, so non-Node packages such as packages/python can sit alongside them without confusing npm.

Release tags are namespaced per package — ts-sdk-v0.2.0, py-sdk-v0.1.0 — because the SDKs version independently.

License

MIT

來源:README.md,提交 fcb0912

工具

67

register_agent

Register an agent

Creates a new agent with its own email address and returns its API key, shown once.

輸入參數didlabellocalPartdomainToken

org_login_request_code

Request dashboard login code

Emails a 6-digit dashboard login code to a human's address. Creates the account on first login.

輸入參數email必填

org_login_verify

Verify dashboard login code

Exchanges an emailed login code for a dashboard session token.

輸入參數code必填email必填

topup_lookup

Look up a top-up

Shows which wallet a top-up for a Mailgi address would credit, and the allowed amounts.

輸入參數address必填

topup_start

Start a top-up

Creates a card payment link for the wallet behind any Mailgi address. Give it to a human to pay.

輸入參數address必填amountUsd必填

topup_status

Check a top-up

Returns whether a top-up payment has been paid and credited.

輸入參數sessionId必填

health

Service health

Checks that the Mailgi API, its database and the mail server are up.

無需輸入參數。

agent_get

Get agent profile

Returns this agent's profile: its addresses, label and domain.

無需輸入參數。

agent_usage

Get agent usage

Returns this agent's daily send and API counters; the latest day is partial.

輸入參數tofrom

agent_delete

Delete agent

Permanently deletes this agent, its mailbox and all its API keys.

無需輸入參數。

mail_list

List messages

Lists message headers in the mailbox, newest first by default; filter by folder with mailboxId.

輸入參數sortlimitpositionmailboxId

mail_get

Read a message

Returns one message with its full text and HTML body.

輸入參數id必填

mail_send

Send email

Sends an email from this agent's address. Mail to outside addresses is charged to the wallet.

輸入參數ccto必填bccreplyTosubject必填htmlBodytextBody

mail_delete

Move message to Trash

Moves a message to the Trash folder.

輸入參數id必填

mail_move

Move message

Moves a message to another folder.

輸入參數id必填mailboxId必填

mail_set_flags

Set message flags

Marks a message as seen or unseen, flagged or unflagged.

輸入參數id必填seenflagged

mailbox_list

List folders

Lists all folders, including Inbox, Sent and Trash.

無需輸入參數。

mailbox_create

Create folder

Creates a folder, optionally nested under another.

輸入參數name必填parentId

mailbox_rename

Rename folder

Renames a folder.

輸入參數id必填name必填

mailbox_delete

Delete folder

Deletes a custom folder.

輸入參數id必填

apikey_list

List API keys

Lists this agent's API keys. Key values are never shown again.

無需輸入參數。

apikey_create

Create API key

Creates another API key for this agent. The key is shown once.

輸入參數labelexpiresAt

apikey_revoke

Revoke API key

Revokes an API key immediately.

輸入參數keyId必填

billing_get

Get wallet

Returns the wallet this agent spends from: balance, prices and how to top up.

無需輸入參數。

billing_topup

Create top-up link

Creates a card payment link for this agent's wallet. Give it to a human to pay.

輸入參數amountUsd必填

billing_transactions

List wallet transactions

Lists the wallet ledger, newest first.

輸入參數limitoffset

webhook_list

List webhooks

Lists this agent's webhook endpoints.

無需輸入參數。

webhook_create

Create webhook

Registers an HTTPS URL to be notified when mail arrives. The signing secret is shown once.

輸入參數url必填eventTypes

webhook_delete

Delete webhook

Deletes a webhook endpoint.

輸入參數id必填

webhook_deliveries

List webhook deliveries

Lists recent delivery attempts for a webhook endpoint.

輸入參數id必填

webhook_resend

Resend webhook delivery

Queues a delivery attempt to be sent again.

輸入參數id必填deliveryId必填

webhook_enable

Re-enable webhook

Re-enables a webhook endpoint that was switched off after repeated failures.

輸入參數id必填

org_me

Who am I

Returns the signed-in user and the organizations they belong to.

無需輸入參數。

org_logout

Sign out

Revokes the current dashboard session token.

無需輸入參數。

org_list

List organizations

Lists the organizations the signed-in user belongs to.

無需輸入參數。

org_create

Create organization

Creates an organization; the signed-in user becomes its owner.

輸入參數name必填slug

org_get

Get organization

Returns one organization.

輸入參數orgId必填

org_rename

Rename organization

Renames an organization.

輸入參數name必填orgId必填

org_member_list

List members

Lists an organization's members and their roles.

輸入參數orgId必填

org_member_set_role

Change member role

Changes a member's role.

輸入參數role必填orgId必填userId必填

org_member_remove

Remove member

Removes a member from the organization, or leaves it when userId is your own.

輸入參數orgId必填userId必填

org_invite_create

Invite member

Emails an invitation to join the organization.

輸入參數roleemail必填orgId必填

org_invite_list

List invites

Lists pending invitations.

輸入參數orgId必填

org_invite_revoke

Revoke invite

Revokes a pending invitation.

輸入參數orgId必填inviteId必填

invite_accept

Accept invite

Accepts an organization invitation with the token from the invite email.

輸入參數token必填

domain_attach

Attach domain

Attaches a custom domain and returns the DNS records to publish.

輸入參數orgId必填domain必填

domain_list

List domains

Lists an organization's custom domains.

輸入參數orgId必填

domain_get

Get domain

Returns a domain's verification status and the DNS records it needs.

輸入參數orgId必填domainId必填

domain_verify

Verify domain

Re-checks the domain's DNS records and verifies it if they are correct.

輸入參數orgId必填domainId必填

domain_detach

Detach domain

Detaches a custom domain from the organization.

輸入參數orgId必填domainId必填

domain_inbox_list

List inboxes

Lists the inboxes (agents) on a domain.

輸入參數orgId必填domainId必填

domain_inbox_create

Create inbox

Creates an inbox with a chosen address on a domain. Its API key is shown once.

輸入參數labelorgId必填domainId必填localPart必填

domain_inbox_delete

Delete inbox

Removes an inbox and its mail from a domain.

輸入參數orgId必填agentId必填domainId必填

regtoken_create

Create registration token

Creates a token that lets an agent register its own address on this domain. Shown once.

輸入參數labelorgId必填domainId必填

regtoken_list

List registration tokens

Lists a domain's registration tokens.

輸入參數orgId必填domainId必填

regtoken_revoke

Revoke registration token

Revokes a registration token.

輸入參數orgId必填tokenId必填domainId必填

org_usage

Get organization usage

Returns daily send, receive and API counters across the organization.

輸入參數tofromorgId必填breakdown

domain_usage

Get domain usage

Returns daily send, receive and API counters for one domain.

輸入參數tofromorgId必填domainId必填breakdown

org_billing_get

Get organization wallet

Returns the organization's shared wallet: balance, prices and how to top up.

輸入參數orgId必填

org_billing_topup

Create organization top-up link

Creates a card payment link for the organization wallet.

輸入參數orgId必填amountUsd必填

org_billing_transactions

List organization transactions

Lists the organization wallet ledger, newest first.

輸入參數limitorgId必填offset

org_webhook_list

List organization webhooks

Lists webhook endpoints across the organization's inboxes.

輸入參數orgId必填

org_webhook_create

Create organization webhook

Registers an HTTPS URL to be notified when mail arrives at one of the organization's inboxes.

輸入參數url必填orgId必填agentId必填eventTypes

org_webhook_delete

Delete organization webhook

Deletes a webhook endpoint.

輸入參數id必填orgId必填

org_webhook_deliveries

List organization webhook deliveries

Lists recent delivery attempts for a webhook endpoint.

輸入參數id必填orgId必填

org_webhook_resend

Resend organization webhook delivery

Queues a delivery attempt to be sent again.

輸入參數id必填orgId必填deliveryId必填

org_webhook_enable

Re-enable organization webhook

Re-enables a webhook endpoint that was switched off after repeated failures.

輸入參數id必填orgId必填

版本歷史

1
  1. v1.0.0最新Nov 1, 2026

評分

已滿足適用檢查項的 100%

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

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分