register_agent
Register an agent
Creates a new agent with its own email address and returns its API key, shown once.
didlabellocalPartdomainToken
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.
Mailgi 让 AI 代理拥有真实可用的邮箱地址,通过托管 API 收发、阅读和整理邮件。
Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。
把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。
阅读 https://sourceweft.com/mcp/xyz.mailgi%2Fmailgi/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。把它添加到你客户端的 mcpServers 配置中。
{
"mcpServers": {
"mailgi": {
"type": "http",
"url": "https://api.mailgi.xyz/mcp"
}
}
}Email for AI agents. Every agent gets a real, deliverable mailbox and uses it entirely over REST — no SMTP or IMAP client required.
The API and mail infrastructure live in a separate private repository.
Or from code:
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.
MIT
来源:README.md,提交 fcb0912
Register an agent
Creates a new agent with its own email address and returns its API key, shown once.
didlabellocalPartdomainTokenRequest dashboard login code
Emails a 6-digit dashboard login code to a human's address. Creates the account on first login.
email必填Verify dashboard login code
Exchanges an emailed login code for a dashboard session token.
code必填email必填Look up a top-up
Shows which wallet a top-up for a Mailgi address would credit, and the allowed amounts.
address必填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必填Check a top-up
Returns whether a top-up payment has been paid and credited.
sessionId必填Service health
Checks that the Mailgi API, its database and the mail server are up.
无需输入参数。
Get agent profile
Returns this agent's profile: its addresses, label and domain.
无需输入参数。
Get agent usage
Returns this agent's daily send and API counters; the latest day is partial.
tofromDelete agent
Permanently deletes this agent, its mailbox and all its API keys.
无需输入参数。
List messages
Lists message headers in the mailbox, newest first by default; filter by folder with mailboxId.
sortlimitpositionmailboxIdRead a message
Returns one message with its full text and HTML body.
id必填Send email
Sends an email from this agent's address. Mail to outside addresses is charged to the wallet.
ccto必填bccreplyTosubject必填htmlBodytextBodyMove message to Trash
Moves a message to the Trash folder.
id必填Move message
Moves a message to another folder.
id必填mailboxId必填Set message flags
Marks a message as seen or unseen, flagged or unflagged.
id必填seenflaggedList folders
Lists all folders, including Inbox, Sent and Trash.
无需输入参数。
Create folder
Creates a folder, optionally nested under another.
name必填parentIdRename folder
Renames a folder.
id必填name必填Delete folder
Deletes a custom folder.
id必填List API keys
Lists this agent's API keys. Key values are never shown again.
无需输入参数。
Create API key
Creates another API key for this agent. The key is shown once.
labelexpiresAtRevoke API key
Revokes an API key immediately.
keyId必填Get wallet
Returns the wallet this agent spends from: balance, prices and how to top up.
无需输入参数。
Create top-up link
Creates a card payment link for this agent's wallet. Give it to a human to pay.
amountUsd必填List wallet transactions
Lists the wallet ledger, newest first.
limitoffsetList webhooks
Lists this agent's webhook endpoints.
无需输入参数。
Create webhook
Registers an HTTPS URL to be notified when mail arrives. The signing secret is shown once.
url必填eventTypesDelete webhook
Deletes a webhook endpoint.
id必填List webhook deliveries
Lists recent delivery attempts for a webhook endpoint.
id必填Resend webhook delivery
Queues a delivery attempt to be sent again.
id必填deliveryId必填Re-enable webhook
Re-enables a webhook endpoint that was switched off after repeated failures.
id必填Who am I
Returns the signed-in user and the organizations they belong to.
无需输入参数。
Sign out
Revokes the current dashboard session token.
无需输入参数。
List organizations
Lists the organizations the signed-in user belongs to.
无需输入参数。
Create organization
Creates an organization; the signed-in user becomes its owner.
name必填slugGet organization
Returns one organization.
orgId必填Rename organization
Renames an organization.
name必填orgId必填List members
Lists an organization's members and their roles.
orgId必填Change member role
Changes a member's role.
role必填orgId必填userId必填Remove member
Removes a member from the organization, or leaves it when userId is your own.
orgId必填userId必填Invite member
Emails an invitation to join the organization.
roleemail必填orgId必填List invites
Lists pending invitations.
orgId必填Revoke invite
Revokes a pending invitation.
orgId必填inviteId必填Accept invite
Accepts an organization invitation with the token from the invite email.
token必填Attach domain
Attaches a custom domain and returns the DNS records to publish.
orgId必填domain必填List domains
Lists an organization's custom domains.
orgId必填Get domain
Returns a domain's verification status and the DNS records it needs.
orgId必填domainId必填Verify domain
Re-checks the domain's DNS records and verifies it if they are correct.
orgId必填domainId必填Detach domain
Detaches a custom domain from the organization.
orgId必填domainId必填List inboxes
Lists the inboxes (agents) on a domain.
orgId必填domainId必填Create inbox
Creates an inbox with a chosen address on a domain. Its API key is shown once.
labelorgId必填domainId必填localPart必填Delete inbox
Removes an inbox and its mail from a domain.
orgId必填agentId必填domainId必填Create registration token
Creates a token that lets an agent register its own address on this domain. Shown once.
labelorgId必填domainId必填List registration tokens
Lists a domain's registration tokens.
orgId必填domainId必填Revoke registration token
Revokes a registration token.
orgId必填tokenId必填domainId必填Get organization usage
Returns daily send, receive and API counters across the organization.
tofromorgId必填breakdownGet domain usage
Returns daily send, receive and API counters for one domain.
tofromorgId必填domainId必填breakdownGet organization wallet
Returns the organization's shared wallet: balance, prices and how to top up.
orgId必填Create organization top-up link
Creates a card payment link for the organization wallet.
orgId必填amountUsd必填List organization transactions
Lists the organization wallet ledger, newest first.
limitorgId必填offsetList organization webhooks
Lists webhook endpoints across the organization's inboxes.
orgId必填Create organization webhook
Registers an HTTPS URL to be notified when mail arrives at one of the organization's inboxes.
url必填orgId必填agentId必填eventTypesDelete organization webhook
Deletes a webhook endpoint.
id必填orgId必填List organization webhook deliveries
Lists recent delivery attempts for a webhook endpoint.
id必填orgId必填Resend organization webhook delivery
Queues a delivery attempt to be sent again.
id必填orgId必填deliveryId必填Re-enable organization webhook
Re-enables a webhook endpoint that was switched off after repeated failures.
id必填orgId必填已满足适用检查项的 100%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
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>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" });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