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 分