- READMEs added: asana, close, freshdesk, google-console, gusto, square - main.ts + server.ts (lazy loading): activecampaign, clickup, klaviyo, mailchimp, pipedrive, trello, touchbistro, closebot, close, google-console - All 13 compile with 0 TSC errors
SendGrid MCP Server
Complete MCP server for SendGrid email platform. Send transactional emails, manage contacts and lists, create marketing campaigns, and monitor email performance — all via AI.
Features
- 📧 Transactional Email - Send single/bulk emails with templates, attachments, scheduling
- 📋 Templates - Create, manage, and deploy dynamic email templates
- 👥 Contacts - Full contact lifecycle management with custom fields
- 📜 Lists & Segments - Static lists and dynamic audience segmentation
- 📣 Campaigns - Marketing campaign creation and management
- 📊 Statistics - Comprehensive email analytics and deliverability metrics
- 🚫 Suppressions - Bounce, spam report, and unsubscribe management
- 👤 Senders - Verified sender identity management
Installation
npm install
npm run build
Environment Variables
| Variable | Required | Description | Example |
|---|---|---|---|
SENDGRID_API_KEY |
✅ | SendGrid API key with full permissions | SG.abc123... |
Getting Your API Key
- Log in to SendGrid: https://app.sendgrid.com/
- Navigate to Settings > API Keys
- Click Create API Key
- Select Full Access or grant specific permissions:
- Mail Send (for transactional emails)
- Marketing Campaigns (for campaigns, lists, contacts, segments)
- Template Engine (for templates)
- Suppressions (for bounce/spam management)
- Copy the API key and set environment variable:
export SENDGRID_API_KEY='your_key_here'
Required API Scopes
- Mail Send - Send transactional emails
- Marketing Campaigns - Manage campaigns, lists, contacts, segments
- Template Engine - Create and manage templates
- Suppressions - View/manage bounces, spam reports, unsubscribes
- Sender Identities - Manage verified senders
Usage
Stdio Mode (Default)
npm start
# or
node dist/main.js
With MCP Client
Add to your MCP settings:
{
"mcpServers": {
"sendgrid": {
"command": "node",
"args": ["/path/to/servers/sendgrid/dist/main.js"],
"env": {
"SENDGRID_API_KEY": "your_api_key_here"
}
}
}
}
Available Tools (21)
Messages (2)
sendgrid_send_email- Send transactional email with full customizationsendgrid_send_template_email- Send email using dynamic template
Contacts (5)
sendgrid_list_contacts- List contacts with pagination (50 per page)sendgrid_get_contact- Get contact details by IDsendgrid_create_contact- Create/update contacts (upsert)sendgrid_update_contact- Update existing contactsendgrid_delete_contact- Delete contact permanently
Lists (4)
sendgrid_list_lists- List all contact listssendgrid_create_list- Create new listsendgrid_add_contacts_to_list- Add contacts to listsendgrid_delete_list- Delete list (contacts remain)
Templates (4)
sendgrid_list_templates- List all templatessendgrid_get_template- Get template detailssendgrid_create_template- Create new templatesendgrid_delete_template- Delete template
Campaigns (5)
sendgrid_list_campaigns- List campaigns with paginationsendgrid_get_campaign- Get campaign detailssendgrid_create_campaign- Create marketing campaignsendgrid_get_campaign_stats- Get campaign performance statssendgrid_delete_campaign- Delete campaign
Suppressions (4)
sendgrid_list_bounces- List bounced emailssendgrid_delete_bounce- Remove email from bounce listsendgrid_list_spam_reports- List spam complaintssendgrid_add_suppression- Add email to suppression list
Senders (4)
sendgrid_list_senders- List verified sender identitiessendgrid_get_sender- Get sender detailssendgrid_create_sender- Create sender identitysendgrid_delete_sender- Delete sender identity
Stats (1)
sendgrid_get_email_stats- Get email statistics by date range
Coverage Manifest
Total SendGrid API endpoints: ~80 (Mail Send, Marketing Campaigns, Contacts, Templates, Stats)
Tools implemented: 21
Coverage: ~26%
Intentionally Skipped:
- Subusers - Multi-account management (enterprise feature)
- IP Management - Dedicated IP pools (enterprise feature)
- Webhooks - Event notification setup (better managed via UI)
- API Keys Management - Key CRUD (security-sensitive, UI-preferred)
- Advanced Segmentation - Complex query builder (better via UI)
- A/B Testing - Campaign variants (better managed via UI)
- Custom Fields - Field definitions (one-time setup via UI)
Focus is on high-value operations: sending emails, managing contacts/lists, creating campaigns, and monitoring performance.
Architecture
- main.ts - Entry point with env validation and graceful shutdown
- server.ts - MCP server class with lazy-loaded tool modules
- tools/ - Domain-organized tool files (messages, contacts, lists, templates, campaigns, suppressions, senders, stats)
- client/sendgrid-client.ts - Axios-based API client with rate limiting
License
MIT