SendGrid MCP 服务器
模型上下文协议 (MCP) 服务器,提供对 SendGrid 营销 API 的访问,用于电子邮件营销和联系人管理。https ://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api
演示
在这个演示中,我们让 Cline SendGrid 代理创建一个新的联系人列表,将我的邮件添加到其中,自动生成“失落之城”相关信息的模板,并将邮件发送到列表。在这个过程中,Cline 会自动识别我们已验证的发件人,以及需要使用哪个退订组。一封精美的邮件发送到我的收件箱,让我对“失落之城”的邮件感到欣喜若狂!
关于 API 支持的重要说明
此服务器仅支持 SendGrid 的 v3 API,不支持旧版功能。这些功能包括:
- 仅限动态模板 - 不支持旧版模板
- 适用于所有联系人和联系人列表操作的营销 API v3
- 用于批量发送电子邮件的单一发送 API
可用工具
联系人管理
列出联系人
列出您的 SendGrid 帐户中的所有联系人。
添加联系人
将联系人添加到您的 SendGrid 营销联系人。
删除联系人
从您的 SendGrid 帐户中删除联系人。
通过列表获取联系人
获取 SendGrid 列表中的所有联系人。
列表管理
列出联系人列表
列出您的 SendGrid 帐户中的所有联系人列表。
创建联系人列表
在 SendGrid 中创建新的联系人列表。
删除列表
从 SendGrid 中删除联系人列表。
将联系人添加到列表
将联系人添加到现有的 SendGrid 列表。
从列表中删除联系人
从 SendGrid 列表中移除联系人但不删除它们。
电子邮件发送
发送电子邮件
使用 SendGrid 发送电子邮件。
发送至列表
使用 SendGrid Single Sends 向联系人列表发送电子邮件。
模板管理(仅限动态模板)
创建模板
创建一个新的动态电子邮件模板。
列表模板
列出所有动态电子邮件模板。
获取模板
通过 ID 检索模板。
删除_模板
删除动态模板。
分析和验证
获取统计数据
获取 SendGrid 电子邮件统计信息。
验证电子邮件
使用 SendGrid 验证电子邮件地址。
账户管理
列表_已验证_发件人
列出所有已验证的发件人身份。
列出压制群组
列出所有取消订阅的群组。
安装
配置
- 获取您的 SendGrid API 密钥:
- 登录您的 SendGrid 帐户
- 前往“设置”>“API 密钥”
- 创建具有完全访问权限的新 API 密钥
- 安全保存 API 密钥,因为它不会再次显示
- 将其添加到 VSCode 设置中的 Cline MCP 设置文件中(例如 ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json):
注意:出于安全考虑,修改数据的工具(如发送电子邮件或删除联系人)被有意排除在自动批准之外。
发展
设置测试
测试使用真实的 API 调用来确保响应准确。运行测试的步骤如下:
- 复制示例环境文件:
- 编辑
.env
并添加您的 SendGrid API 密钥:注意:.env
文件被 gitignored 以防止提交敏感信息。 - 运行测试:
建筑
重要提示
- 向列表发送电子邮件时,您必须提供 suppression_group_id 或 custom_unsubscribe_url 以遵守电子邮件法规
- 发件人电子邮件地址必须先通过 SendGrid 验证,然后才能用于发送电子邮件
- 所有模板均创建为动态模板,并支持 handlebars 语法(例如 {{variable_name}})
- 单一发送 API 用于所有批量电子邮件操作,因为它提供更好的跟踪和管理功能
- SendGrid API 是“最终一致的”——数据更改(例如添加联系人或更新列表)可能不会在更改后立即生效
执照
麻省理工学院
SendGrid 徽标版权归 Twilio 所有
You must be authenticated.
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Tools
提供一个界面,通过 SendGrid 的 API 来管理电子邮件营销、联系人列表、动态模板和电子邮件分析。
Related Resources
Related MCP Servers
- -securityAlicense-qualityProvides IMAP and SMTP capabilities, enabling developers to manage email services with seamless integration and automated workflows.Last updated -38PythonBSD 3-Clause
- AsecurityFlicenseAqualityA simple MCP server that enables users to send emails using Resend's API, integrating with tools like Cursor and Claude Desktop for seamless email composition and delivery.Last updated -16321TypeScript
- AsecurityFlicenseAqualityEnables sending emails via SMTP with template management, supporting multiple SMTP configurations, template creation with variable substitution, and bulk email sending with rate limiting.Last updated -113TypeScript
- -securityFlicense-qualityEnables AI and LLM systems to interact with the Buttondown newsletter service, supporting email drafting, scheduling, analytics retrieval, and list management through a Model Context Protocol interface.Last updated -TypeScript