SendGrid
The SendGrid connector lets AI agents send transactional emails, manage dynamic email templates, browse marketing contacts, and view sending statistics — all through the SendGrid Web API v3. SendGrid authenticates with an API Keystored encrypted in MCPGate's vault and never exposed to the AI client.
Authentication#
SendGrid uses API key authentication. To connect:
- Sign in to your SendGrid dashboard
- Navigate to Settings → API Keys
- Click Create API Key and choose the minimum permissions your use case requires
- Copy the generated key and paste it into the API Key field in MCPGate's connector setup form
Note
Tool reference#
The SendGrid connector exposes 10 tools: 5 read, 3 write, and 2 delete. Use the MCP Apps page to enable or disable individual tools per app, and the Guardrails page to add fine-grained rules on top.
| Tool | Category | Description |
|---|---|---|
| sendgrid_list_templates | read | List all dynamic transactional email templates |
| sendgrid_get_template | read | Get a specific transactional email template by ID |
| sendgrid_list_contacts | read | List contacts in the SendGrid marketing contacts list |
| sendgrid_get_stats | read | Get email sending statistics for a date range |
| sendgrid_list_suppressions | read | List suppressed (unsubscribed/bounced/spam) email addresses |
| sendgrid_send_email | write | Send a transactional email via SendGrid |
| sendgrid_create_template | write | Create a new dynamic transactional email template |
| sendgrid_add_contact | write | Add or update a contact in the marketing contacts list |
| sendgrid_delete_template | delete | Delete a transactional email template |
| sendgrid_delete_contact | delete | Delete a contact from the marketing contacts list |
Common guardrail recipes#
Send-only access#
Enable read tools plus only sendgrid_send_email. Deny sendgrid_create_template, sendgrid_add_contact, sendgrid_delete_template, and sendgrid_delete_contact. This is the most common configuration for transactional email agents that should send but not manage account settings.
Restrict recipients#
Apply the allow_domains template to sendgrid_send_email, targeting the to field. Provide a list of allowed email domains (e.g. yourcompany.com) so the AI can only send to internal or known external addresses.
Block sending to suppressed addresses#
Enable sendgrid_list_suppressions and instruct the agent to check the suppression list before calling sendgrid_send_email. This prevents sending to addresses that have unsubscribed or bounced, reducing spam complaints and protecting your sender reputation.
Troubleshooting#
- 403 Forbidden on send — The API key does not have
Mail Sendpermission. Generate a new key in the SendGrid dashboard with the correct permission and reconnect. - Template not found — Dynamic templates must be in the Active state to be used with
sendgrid_send_email. Activate the template version in the SendGrid dashboard before using it. - Contact sync delay — Contacts added via
sendgrid_add_contactare processed asynchronously by SendGrid. They may not appear insendgrid_list_contactsimmediately.