本项目提供了一个发送Grid MCP服务器,可帮助你更方便地使用发送Grid的相关功能,实现邮件发送等操作。
要使用本项目,你需要先完成安装和配置,以下是详细步骤。
git clone https://github.com/Garoth/sendgrid-mcp.git
cd sendgrid-mcp
npm install
获取你的发送Grid API密钥:
将其添加到VSCode中的Cline MCP设置文件(例如:~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json):
{
"mcpServers": {
"sendgrid": {
"command": "node",
"args": ["/path/to/sendgrid-mcp/build/index.js"],
"env": {
"SENDGRID_API_KEY": "your-api-key-here"
},
"disabled": false,
"autoApprove": [
"list_contacts",
"list_contact_lists",
"list_templates",
"list_single_sends",
"get_single_send",
"list_verified_senders",
"list_suppression_groups",
"get_stats",
"validate_email"
]
}
}
}
⚠️ 重要提示
修改数据的工具(如发送邮件或删除联系人)出于安全考虑,默认不启用自动批准。
测试使用真实的API调用以确保准确响应。要运行测试:
复制示例环境文件:
cp .env.example .env
编辑.env并添加你的发送Grid API密钥:
SENDGRID_API_KEY=your-api-key-here
⚠️ 重要提示
.env文件被git忽略,以防止提交敏感信息。
运行测试:
npm test
npm run build
suppression_group_id或custom_unsubscribe_url以符合电子邮件法规{{variable_name}})本项目采用MIT许可证。
发送Grid标志版权归Twilio所有