SendGrid MCP Server
SendGrid MCP Server
一个 Python MCP(Model Context Protocol)服务器,让 AI 助手能够发送 电子邮件并通过 SendGrid 的 Web API v3 管理联系人。
工具
工具 | 描述 |
| 向一个或多个收件人发送纯文本/HTML 电子邮件 |
| 检查动态模板的结构 |
| 通过带替换数据的动态模板发送 |
| 添加/更新营销联系人(由 SendGrid 异步处理) |
| 使用有界 SGQL 查询搜索联系人 |
| 列出已命名的营销联系人列表 |
| 为新的发信域名启动域名身份验证,返回需要添加的 DNS 记录 |
| 列出域名及其验证状态 |
| 添加记录后重新检查 DNS |
| 移除域名身份验证 |
设置
创建虚拟环境并安装依赖项:
python -m venv venv source venv/bin/activate # Windows: venv\Scripts\activate pip install -r requirements.txt将
.env.example复制为.env,并填写你的 SendGrid API 密钥 (SendGrid 控制台中的 Settings > API Keys)和默认发件人:cp .env.example .env发送前,请在 SendGrid 的 Settings > Sender Authentication 下验证你的发件人邮箱, 未验证的发件人将被拒绝。
(可选)在 Email API > Dynamic Templates 下创建动态模板, 并在
.env中设置DEFAULT_TEMPLATE_ID。
运行
python main.py这会通过 stdio 运行服务器,这是 Claude Desktop 等 MCP 客户端 对本地子进程所期望的传输方式。
验证是否正常工作
python smoke_test.py列出已注册的工具,并对你的 SendGrid 账户发起一次实时调用。如需进行交互式 schema/工具检查:
npx @modelcontextprotocol/inspector python main.py连接到 Claude Desktop
添加到 claude_desktop_config.json:
{
"mcpServers": {
"sendgrid-mcp": {
"command": "python",
"args": ["/path/to/twilio-sendgrid-mcp/main.py"],
"cwd": "/path/to/twilio-sendgrid-mcp",
"env": {
"SENDGRID_API_KEY": "SG.your-actual-api-key-here"
}
}
}
}之后重启 Claude Desktop。如果某个工具调用失败,请检查 ~/Library/Logs/Claude/mcp*.log(macOS)以查看服务器的 stderr 输出。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Email for AI agents: send mail, manage contacts, automations & webhooks. Zero-DNS first send.
Email for AI agents — send, receive as a webhook, manage domains, templates, routing.
Send transactional email, run campaigns, manage contacts and automations, audit deliverability.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/bhoggard/twilio-sendgrid-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server