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