跳过安装。2 分钟内即可运行。
在 cloud.anythingmcp.com 开始免费试用,一键添加 Postmark,然后将你的 AI 客户端(Claude、ChatGPT、Copilot 或 Cursor)指向生成的 MCP 端点。无需 Docker,无需 git clone,无需任何工程经验。
摘要
单个服务器的 Postmark 事务邮件和群发邮件:发送单封、批量和模板邮件,管理模板,搜索已发送和收到的邮件及其打开、点击和退信情况,查看发送统计,并管理抑制列表、消息流和 webhook。配置可选的账户令牌后,还能读取服务器、域名和发件人签名。
试试这样问
Postmark 的示例提示
点击任意提示即可复制,然后粘贴到 Claude、ChatGPT、Cursor、Gemini、Copilot 或 OpenClaw 中,在该连接器上运行。
Claude 是 AI,可能会出错。请核对回答。
💡 无需安装? 直接使用 cloud.anythingmcp.com。 登录、点击 Connectors → Postmark、粘贴凭证、生成 MCP API key,即可完成。无 Docker、无
git clone、无本地服务器。
Postmark + Cursor
单个服务器的 Postmark 事务邮件和群发邮件:发送单封、批量和模板邮件,管理模板,搜索已发送和收到的邮件及其打开、点击和退信情况,查看发送统计,并管理抑制列表、消息流和 webhook。配置可选的账户令牌后,还能读取服务器、域名和发件人签名。
前提条件
完整的设置说明已内置在连接器中 (在 store 中选择连接器时可见)。所需环境变量:
POSTMARK_SERVER_TOKEN(可选:POSTMARK_ACCOUNT_TOKEN)
步骤 1 — 获取凭证
设置大约需要 2 分钟。你需要一个带有服务器的 Postmark 账户。
- 在 Postmark 中打开服务器,再打开 API Tokens,把一个 Server API token 复制到
POSTMARK_SERVER_TOKEN。它通过X-Postmark-Server-Token请求头发送,只能访问这一个服务器。 - 可选:如需使用账户工具(
postmark_list_servers、postmark_get_server_by_id、postmark_list_domains、postmark_get_domain、postmark_verify_domain_dkim、postmark_verify_domain_return_path、postmark_list_sender_signatures、postmark_get_sender_signature),由账户所有者或管理员把 Account、API Tokens 中的 Account API token 复制到POSTMARK_ACCOUNT_TOKEN。它只在这些工具上以X-Postmark-Account-Token发送。未设置时这些工具返回 401;其他工具都能正常使用。 - 安装连接器并运行
postmark_get_server:它会显示服务器的设置,并确认令牌可用。
两种令牌的格式都类似 UUID(8-4-4-4-12 个十六进制字符)。
发送:postmark_send_email 向最多 50 个收件人发送一封邮件,可带主题、HTML 和/或纯文本正文、标签、元数据、跟踪设置和附件。postmark_send_batch 一次调用最多发送 500 封不同的邮件。postmark_send_email_with_template 和 postmark_send_batch_with_templates 使用已保存的模板(TemplateId 或 TemplateAlias)和包含变量的 TemplateModel。From 必须是已确认的发件人签名,或已验证域名下的地址。新账户在 Postmark 批准前一直处于测试模式,只能发送到自己域名下的地址。事务邮件走 outbound 消息流(默认);批量或营销邮件必须使用 Broadcasts 消息流(MessageStream),它会处理退订。每次发送都会进入真实的收件箱,因此 AI 会先展示收件人、主题和内容,等你同意。批量调用即使部分邮件失败也会返回 200:AI 会检查每个结果的 ErrorCode(0 = 已接受)和 Message。
模板:postmark_list_templates、postmark_get_template、postmark_validate_template(不保存,检查语法并用测试数据渲染预览)、postmark_create_template 和 postmark_update_template。变量使用 Mustachio 语法,例如 {{name}};Layout 用 {{{@content}}} 包裹标准模板。
查明一封邮件发生了什么:
- 用
postmark_search_outbound_messages按收件人、发件人、标签、主题、状态、消息流、日期或某个元数据字段搜索已发送邮件,用postmark_search_inbound_messages搜索收到的邮件。postmark_retry_inbound_message会把处理失败的入站邮件重新推送到入站 webhook。 postmark_get_outbound_message或postmark_get_inbound_message显示详细信息,已发送邮件还包括MessageEvents时间线(Delivered、Bounced、Opened、LinkClicked、SubscriptionChanged)。- 打开和点击:
postmark_list_message_opens、postmark_get_message_opens、postmark_list_message_clicks、postmark_get_message_clicks,包含邮件客户端、浏览器、操作系统、平台和地理位置。 - 退信:
postmark_get_delivery_stats、postmark_list_bounces、postmark_get_bounce和postmark_get_bounce_dump(原始 SMTP 回复,保留 30 天)。当CanActivate为 true 时,postmark_activate_bounce可以重新激活该地址。 - 按消息流的抑制列表:
postmark_list_suppressions和postmark_create_suppressions(每次调用最多 50 个地址)。
统计:postmark_get_outbound_overview 给出某段时间的总数和比率(已发送、退信、垃圾邮件投诉、打开、独立打开、已跟踪邮件、链接点击)。postmark_get_outbound_stats 配合 metric 给出发送、退信、垃圾邮件、跟踪、打开、点击、平台、邮件客户端、浏览器或地理位置的每日数据。
服务器设置:postmark_get_server;消息流用 postmark_list_message_streams、postmark_get_message_stream、postmark_create_message_stream(每个服务器最多 10 个消息流,其中一个为 Inbound)、postmark_update_message_stream 和 postmark_unarchive_message_stream;webhook 用 postmark_list_webhooks、postmark_get_webhook、postmark_create_webhook 和 postmark_update_webhook。有了账户令牌,AI 还能列出服务器、域名和发件人签名,显示域名需要的 DNS 记录,并在你添加记录后请 Postmark 检查 DKIM 和 Return-Path。
安装时关闭:postmark_delete_template、postmark_delete_suppressions(会让被抑制的地址重新收到邮件)、postmark_delete_webhook 和 postmark_archive_message_stream(归档的消息流会停止发送,若不恢复,45 天后连同数据一起删除)。团队需要时由工作区管理员开启。
数据格式:字段名为 PascalCase(MessageID、SubmittedAt、TotalCount)。搜索日期(fromdate、todate)使用美国东部时间(US Eastern);返回的时间戳带有时区偏移。统计日期为 YYYY-MM-DD。邮件及其事件在服务器的保留期内保存,默认 45 天。
分页:列表和搜索工具接受 count(默认 50,最多 500)和 offset;count 加 offset 不得超过 10,000。要查更早的数据,AI 会缩小日期范围。把收到的行数与 TotalCount 比较,即可知道是否还有更多页。
常见错误:401 表示令牌缺失或错误,或在账户工具上使用了服务器令牌。422 表示请求无效,原因见 ErrorCode 和 Message:300 为发送校验错误(例如地址无效或缺少正文),406 为收件人已停用或被抑制,410 为一个批次超过 500 封邮件,412 为账户等待批准期间收件人不在 From 域名下,1101 为找不到模板,1235 为未知的消息流。429 表示请求过多;500 是 Postmark 方面的问题,请稍后重试。
连接器不会创建服务器、域名或发件人签名,不会解除因垃圾邮件投诉产生的抑制,也不会删除已发送的邮件。
步骤 2 — 安装 adapter
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
步骤 3 — 在 Cursor 中添加连接器
你的服务器 URL: 在 AnythingMCP 中打开 MCP Servers → 此连接器所在的服务器,复制它的 URL(
https://cloud.anythingmcp.com/mcp/…)。本指南中出现YOUR_SERVER_ID的地方都用它替换。
Cursor 从 ~/.cursor/mcp.json 读取 MCP 服务器。添加以下条目:
{
"mcpServers": {
"anythingmcp": {
"url": "https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID",
"headers": { "X-API-Key": "YOUR_MCP_API_KEY" }
}
}
}
- 在 AnythingMCP 的 MCP Servers → 你的服务器 → API keys 中创建 MCP API 密钥,并用它替换
YOUR_MCP_API_KEY。 - 保存文件并重启 Cursor。
- 打开 Cursor → Settings → MCP,确认
anythingmcp已列出并处于已连接状态。 - 开始对话,智能体现在可以调用
Postmark的工具。
可用工具
| Tool | What it does |
|---|---|
postmark_send_email | Send one email through the server: from a confirmed sender, to up to 50 recipients, with subject, HTML and/or text body, tag, metadata… |
postmark_send_batch | Send up to 500 different emails in one call; each message takes the same fields as postmark_send_email |
postmark_send_email_with_template | Send one email built from a stored template: pass TemplateId or TemplateAlias and the TemplateModel with the variables |
postmark_send_batch_with_templates | Send up to 500 templated emails in one call, each with its own template, recipient and model |
postmark_list_templates | List the templates of the server with id, alias, name, type (Standard or Layout), active flag and layout |
postmark_get_template | Get one template by id or alias: name, subject, HTML and text body with their Mustachio variables, type and layout |
postmark_create_template | Create a template (Standard, or Layout to wrap other templates) with name, alias, subject and HTML/text bodies using Mustachio variables |
postmark_update_template | Edit a template by id or alias: name, alias, subject, bodies or layout |
postmark_delete_template | Delete a template for good by id or alias |
postmark_validate_template | Check template content without saving: Mustachio syntax errors, the variables it uses and a rendered preview with a test model |
postmark_search_outbound_messages | Search sent messages (last 45 days by default retention) by recipient, sender, tag, subject, status, stream, date range or one metadata… |
postmark_get_outbound_message | Details of one sent message by MessageID: recipients, subject, bodies, tag, metadata and the MessageEvents timeline (delivered, bounced… |
postmark_search_inbound_messages | Search inbound messages received by the server by recipient, sender, subject, mailbox hash, tag, status or date range |
postmark_get_inbound_message | Details of one inbound message: sender, recipients, subject, text and HTML body, headers, attachments list, status and the webhook… |
postmark_retry_inbound_message | Retry posting a failed inbound message to the server's inbound webhook, e.g. after fixing the endpoint |
postmark_list_message_opens | List open events across messages with recipient, time, email client, OS, platform and location |
postmark_get_message_opens | List the open events of one message: each open with time, client, OS, platform and location |
postmark_list_message_clicks | List link click events across messages with recipient, clicked URL, time, browser, OS, platform and location |
postmark_get_message_clicks | List the link click events of one message: each click with the original link, time, browser, OS and location |
postmark_get_delivery_stats | Bounce summary of the server: number of inactive (deactivated) addresses and the count of bounces per bounce type |
postmark_list_bounces | List bounces with type, recipient, description, details, whether the address is now inactive and whether it can be activated |
postmark_get_bounce | Get one bounce by id: type, recipient, description, SMTP details, the related MessageID, Inactive and CanActivate flags |
postmark_get_bounce_dump | Get the raw SMTP source of a bounce message (kept for 30 days), to read the receiving server's exact answer |
postmark_activate_bounce | Reactivate an address deactivated by a bounce so it can receive email again |
postmark_get_outbound_overview | Sending overview for a period: sent, bounced, spam complaints, bounce and spam rates, opens, unique opens, tracked emails and link clicks |
postmark_get_outbound_stats | Daily counts of one metric for a period: sends, bounces (by type), spam, tracked, opens, opens by platform or email client, clicks, clicks… |
postmark_list_suppressions | List suppressed addresses of a message stream (no email is sent to them) with the reason (HardBounce, SpamComplaint, ManualSuppression)… |
postmark_create_suppressions | Suppress up to 50 addresses in a message stream so nothing is sent to them any more (ManualSuppression) |
postmark_delete_suppressions | Remove up to 50 addresses from the suppression list of a stream so they can receive email again |
postmark_list_message_streams | List the message streams of the server (Transactional, Broadcasts, Inbound) with id, name, description, unsubscribe handling and archive… |
postmark_get_message_stream | Get one message stream by id: name, type, description, unsubscribe handling, created, updated and archived dates |
postmark_create_message_stream | Create a message stream: Transactional for app email or Broadcasts for bulk and marketing mail (at most 10 streams per server, one Inbound) |
postmark_update_message_stream | Edit a message stream: name, description or unsubscribe handling |
postmark_archive_message_stream | Archive a message stream: it stops sending and is deleted with its data after 45 days unless restored with postmark_unarchive_message_stream |
postmark_unarchive_message_stream | Restore an archived message stream within 45 days of archiving so it can send again |
postmark_list_webhooks | List the webhooks of the server with URL, stream, HTTP auth and headers, and which events trigger them (Open, Click, Delivery, Bounce… |
postmark_get_webhook | Get one webhook by id: URL, message stream, HTTP auth user, custom headers and enabled triggers |
postmark_create_webhook | Create a webhook for a message stream: the URL and which events (opens, clicks, deliveries, bounces, spam complaints, subscription changes)… |
postmark_update_webhook | Edit a webhook: URL, HTTP auth, headers or triggers |
postmark_delete_webhook | Delete a webhook; Postmark stops posting those events to its URL |
postmark_get_server | Settings of the server the token belongs to: id, name, color, inbound address and domain, tracking defaults, hook URLs and SMTP API state |
postmark_list_servers | List all servers of the account with id, name, color, API tokens and settings |
postmark_get_server_by_id | Get one server of the account by id with its settings and API tokens |
postmark_list_domains | List the sending domains of the account with DKIM, Return-Path and SPF verification state |
postmark_get_domain | Get one domain with the DNS records to set (DKIM host and value, pending DKIM, Return-Path CNAME) and their verification state |
postmark_verify_domain_dkim | Ask Postmark to check the DKIM DNS record of a domain now, after the user has added it |
postmark_verify_domain_return_path | Ask Postmark to check the Return-Path CNAME of a domain now |
postmark_list_sender_signatures | List the sender signatures (single confirmed From addresses) of the account with confirmation and DKIM state |
postmark_get_sender_signature | Get one sender signature: From address, name, reply-to, confirmed flag, domain and DNS verification details |
示例提示
- “我们昨天发给 [email protected] 的密码重置邮件送达了吗?给我看它的投递事件。”
- “上周我们发了多少封邮件?退信率和垃圾邮件投诉率是多少?”
- “列出最近 7 天的硬退信,附上收件人和接收方服务器的回复。”
- “用名字 Tom 把欢迎模板发给 [email protected]。发送前先给我看渲染后的邮件。”
- “我们发信域名的 DKIM 记录验证通过了吗?如果没有,告诉我需要添加的 DNS 记录。”
FAQ
Cursor 免费套餐支持自定义 MCP 服务器吗? 支持,Hobby、Pro 和 Business 套餐均可使用 MCP。
下一步
这份指南对你有帮助吗?