mcpField
B
blink-notifications

blink-notifications

github.com/blink-new其他438 次安装2 周前更新
代码仓库

关于 blink-notifications

用于通过 Blink 发送邮件和短信及管理电话号码的技能,适合需要通知或号码配置的工作流,并提供命令行、SDK 和 MCP 工具。

主要功能

  1. 01发送 HTML 或纯文本邮件及附件
  2. 02发送短信
  3. 03列出、购买和释放电话号码

适用场景

  1. 01发送带抄送或密送的客户邮件
  2. 02通过短信发送验证码
  3. 03为短信或 AI 通话配置号码

MCP 相关

向 MCP 客户端提供发送邮件和短信,以及列出、购买或释放电话号码的工具。

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/blink-new/blink-plugin --skill blink-notifications

安装后在 Claude Code 中输入/blink-notifications确认已加载。

详细介绍

快速入门

# Send email
blink notify email [email protected] --subject "Welcome!" --html "<h1>Hello</h1>"

# Send SMS
blink sms send +15551234567 "Your code is 123456"

# List phone numbers
blink phone list

# Buy a phone number
blink phone buy --area-code 415

MCP 工具

工具说明
blink_notify_email发送邮件,支持 HTML/文本、附件、抄送/密送
blink_sms_send发送短信
blink_phone_list列出已拥有的电话号码
blink_phone_buy购买电话号码
blink_phone_release永久释放电话号码(停止计费)

邮件

无需设置,Blink 内置此功能。发件地址会自动生成为 noreply@{projectId}.blink-email.com。

const { success, messageId } = await blink.notifications.email({
  to: '[email protected]',
  subject: 'Order shipped!',
  html: '<h1>Your order is on the way</h1>',
  text: 'Your order is on the way',
})
完整选项
await blink.notifications.email({
  to: ['[email protected]', '[email protected]'],
  replyTo: '[email protected]',
  cc: '[email protected]',
  bcc: '[email protected]',
  subject: 'Invoice #12345',
  html: '<h2>Invoice Ready</h2><p>See attached.</p>',
  text: 'Invoice Ready. See attached.',
  attachments: [{
    url: 'https://storage.example.com/invoices/12345.pdf',
    filename: 'Invoice-12345.pdf',
    type: 'application/pdf'
  }]
})
邮件选项
选项类型必填说明
tostring | string[]是收件人
subjectstring是主题行
htmlstring是*HTML 内容
textstring是*纯文本备用内容
replyTostring否回复地址
ccstring | string[]否抄送收件人
bccstring | string[]否密送收件人
attachmentsarray否文件附件(url + filename)

*html 或 text 至少需要填写一项(建议两项都填写,以提高送达率)

短信

blink sms send +15551234567 "Your verification code is 847291"
await blink.notifications.sms({
  to: '+15551234567',
  body: 'Your verification code is 847291'
})

电话号码

AI 通话(参见 blink-ai 技能)和短信都需要电话号码。

# List available numbers
blink phone list

# Buy a number in a specific area code
blink phone buy --area-code 415

# Buy any available number
blink phone buy

最佳实践

  1. 邮件中始终同时包含 HTML 和文本内容,以提高送达率
  2. 使用 replyTo,而不要使用自定义的 from 地址
  3. 发送前验证邮件格式
  4. 电话号码使用 E.164 格式——美国号码使用 +1 前缀

评论

支持 Markdown