📧 借助官方 SDK 实现 Claude 和 Smithery 与 Brevo API 的全面集成
这是一个功能全面的 MCP 服务器,它借助官方的 @getbrevo/brevo Node.js SDK,让 Claude 能够全面访问 Brevo 的营销自动化平台。该服务器拥有 8 个精心组织的工具,涵盖了 Brevo 的所有主要功能。
@getbrevo/brevo 构建,具备极高的兼容性。brevo-mcp:
apiKey: "your-brevo-api-key" # 必需
defaultSenderEmail: "your@domain.com" # 可选
defaultSenderName: "Your Name" # 可选
npm install
npm run build
export BREVO_API_KEY="your-brevo-api-key"
export BREVO_DEFAULT_SENDER_EMAIL="your@domain.com"
export BREVO_DEFAULT_SENDER_NAME="Your Name"
npm start
以下是一些不同工具的使用示例:
contacts){
"operation": "bulk_import",
"contacts": [
{
"email": "user1@example.com",
"attributes": {
"FIRSTNAME": "John",
"LASTNAME": "Doe"
}
}
]
}
email){
"operation": "send",
"to": [{"email": "recipient@example.com", "name": "John Doe"}],
"subject": "Welcome to our service",
"htmlContent": "Welcome!
Thank you for joining us.
",
"sender": {"email": "noreply@yourcompany.com", "name": "Your Company"}
}
campaigns){
"operation": "create_email_campaign",
"campaignData": {
"name": "Newsletter Campaign",
"subject": "Monthly Newsletter",
"htmlContent": "Newsletter
",
"recipients": {"listIds": [1, 2]}
}
}
sms){
"operation": "send_batch",
"recipients": ["+1234567890", "+0987654321"],
"content": "Your order is ready for pickup!",
"sender": "YourBrand"
}
webhooks){
"operation": "create_webhook",
"url": "https://your-app.com/brevo-webhook",
"events": ["delivered", "opened", "clicked"],
"description": "Email tracking webhook",
"type": "transactional"
}
ecommerce){
"operation": "create_order",
"orderData": {
"id": "order-123",
"email": "customer@example.com",
"products": [
{
"id": "product-1",
"name": "Widget",
"price": 29.99,
"quantity": 2
}
],
"total": 59.98
}
}
{
"operation": "bulk_import",
"contacts": [
{
"email": "user1@example.com",
"attributes": {
"FIRSTNAME": "John",
"LASTNAME": "Doe",
"COMPANY": "Acme Corp"
}
}
]
}
{
"operation": "create_email_campaign",
"campaignData": {
"name": "Product Launch",
"subject": "Introducing Our New Product",
"htmlContent": "New Product Launch
",
"recipients": {"listIds": [1]},
"scheduler": {
"sendAt": "2024-01-01T10:00:00Z"
}
}
}
{
"operation": "create_order",
"orderData": {
"id": "order-456",
"email": "customer@example.com",
"products": [
{"id": "prod-1", "name": "T-Shirt", "price": 25.00, "quantity": 1}
],
"total": 25.00,
"status": "pending"
}
}
| 属性 | 详情 | 必需 |
|---|---|---|
BREVO_API_KEY |
你的 Brevo API 密钥 | ✅ 是 |
BREVO_DEFAULT_SENDER_EMAIL |
默认发件人邮箱 | ❌ 否 |
BREVO_DEFAULT_SENDER_NAME |
默认发件人姓名 | ❌ 否 |
DEBUG |
启用调试日志 | ❌ 否 |
version: 1
startCommand:
type: stdio
configSchema:
type: object
required: ['apiKey']
properties:
apiKey:
type: string
description: "用于身份验证的 Brevo API 密钥(必需)"
defaultSenderEmail:
type: string
description: "默认发件人邮箱地址"
defaultSenderName:
type: string
description: "默认发件人姓名"
debug:
type: boolean
description: "启用调试模式"
default: false
# 安装依赖
npm install
# 构建项目
npm run build
# 启动服务器
npm start
# 测试服务器
npm test
# 使用 Smithery 运行
npm run smithery
本项目采用 MIT 许可证。
本项目使用官方 Brevo Node.js SDK 构建,确保了最高的可靠性和丰富的功能 ❤️