SendGrid Email API + QuickMCP: AI-Powered Email Management
Connect SendGrid email API to Claude Desktop using QuickMCP. Send emails, manage contacts, view statistics, and automate email workflows with AI.
SendGrid is one of the most popular email delivery APIs. Let's connect it to Claude Desktop with QuickMCP so you can send and manage emails through natural language.
What You'll Build
Ask Claude:
- "Send an email to john@example.com with subject 'Meeting' and body 'See you at 3pm'"
- "Show me email statistics for the past week"
- "List all my email templates"
- "Check my sender reputation"
Prerequisites
- QuickMCP CLI:
dotnet tool install -g QuickMCP.CLI - SendGrid account (free tier available!)
- SendGrid API key
- Claude Desktop
Step 1: Create SendGrid Account & API Key
Sign Up
- Go to: https://signup.sendgrid.com
- Create free account (up to 100 emails/day)
- Verify your email address
Create API Key
- Go to: https://app.sendgrid.com/settings/api_keys
- Click "Create API Key"
- Choose "Restricted Access"
- Name it: "QuickMCP MCP Server"
- Grant permissions:
- Mail Send: Full Access (if you want to send emails)
- Stats: Read Access
- Templates: Read Access
- Suppressions: Read Access
- Click "Create & View"
- Copy the key (you won't see it again!)
Step 2: Generate QuickMCP Configuration
SendGrid provides an OpenAPI specification:
quickmcp build config \
--spec-url https://raw.githubusercontent.com/DataFire/Integrations/master/integrations/generated/sendgrid/openapi.json \
--auth bearertoken \
--exclude-paths "*/delete,*/remove" \
--ai-metadata \
--output-path ~/quickmcp/sendgrid-config.json
Configuration Details
--spec-url: SendGrid's official OpenAPI spec--auth bearertoken: SendGrid uses Bearer token--exclude-paths: Block dangerous deletions--ai-metadata: AI-optimized descriptions
Step 3: Configure Authentication
Edit ~/quickmcp/sendgrid-config.json:
{
"serverId": "sendgrid",
"specificationUrl": "https://raw.githubusercontent.com/DataFire/Integrations/master/integrations/generated/sendgrid/openapi.json",
"authentication": {
"type": "Bearer",
"token": "${SENDGRID_API_KEY}"
},
"pathFilters": {
"excludePatterns": [
"*/delete",
"*/remove"
]
}
}
Step 4: Add to Claude Desktop
macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Windows:
%APPDATA%\Claude\claude_desktop_config.json
Add SendGrid:
{
"mcpServers": {
"sendgrid": {
"command": "quickmcp",
"args": [
"serve",
"--config-path",
"/Users/yourname/quickmcp/sendgrid-config.json"
],
"env": {
"SENDGRID_API_KEY": "SG.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
}
}
}
Step 5: Verify Domain (Important!)
Before sending emails, verify a sender:
- Go to: https://app.sendgrid.com/settings/sender_auth
- Click "Verify a Single Sender"
- Fill in your email address
- Check your email for verification link
- Click to verify
Now you can send from this email address!
Step 6: Restart Claude Desktop
Close and reopen Claude Desktop.
Testing Your Integration
Test 1: Send Email
Ask Claude:
"Send an email using SendGrid:
- To: recipient@example.com
- From: youremail@example.com (must be verified)
- Subject: Hello from Claude
- Body: This email was sent through Claude Desktop using QuickMCP!"
Test 2: Check Statistics
"Show me my SendGrid email statistics for the past week"
Test 3: List Templates
"List all my SendGrid email templates"
Test 4: View Bounces
"Show me bounced emails from the past month"
Real-World Examples
Example 1: Transactional Emails
"Send a welcome email to newuser@example.com using my 'welcome' template"
Example 2: Bulk Status Check
"How many emails did I send yesterday and what was the open rate?"
Example 3: Suppression Management
"Check if john@example.com is on my suppression list"
Advanced Configuration
Read-Only (Statistics Only)
For safety, create a read-only config:
quickmcp build config \
--spec-url https://raw.githubusercontent.com/DataFire/Integrations/master/integrations/generated/sendgrid/openapi.json \
--auth bearertoken \
--only-for-paths "/v3/stats,/v3/templates,/v3/suppressions" \
--output-path ~/quickmcp/sendgrid-readonly-config.json
This allows statistics viewing but prevents sending.
Multiple Environments
Production Sending:
{
"mcpServers": {
"sendgrid-prod": {
"command": "quickmcp",
"args": ["serve", "--config-path", "/path/to/sendgrid-prod-config.json"],
"env": {
"SENDGRID_API_KEY": "SG.prod_key"
}
}
}
}
Testing/Stats Only:
{
"mcpServers": {
"sendgrid-stats": {
"command": "quickmcp",
"args": ["serve", "--config-path", "/path/to/sendgrid-readonly-config.json"],
"env": {
"SENDGRID_API_KEY": "SG.readonly_key"
}
}
}
}
Common Issues
Issue: "403 Forbidden"
Cause: API key doesn't have required permissions.
Solution:
- Go to API keys settings
- Edit your key
- Grant necessary permissions
- Update the key in Claude Desktop config
Issue: "401 Unauthorized"
Cause: Invalid API key.
Solution: Test your key:
curl --request GET \
--url https://api.sendgrid.com/v3/templates \
--header "Authorization: Bearer SG.your_key_here"
Issue: "Sender email not verified"
Cause: You must verify sender addresses before sending.
Solution:
- Go to: https://app.sendgrid.com/settings/sender_auth
- Verify your sender email
- Try sending again
Free Tier Limits
SendGrid Free Plan
- 100 emails/day (3,000/month)
- All core email features
- Email activity for 30 days
- 2,000 contacts
- Single sender verification
Paid Plans
Start at $19.95/month for 50,000 emails.
Security Best Practices
1. Use Restricted API Keys
Never use a "Full Access" key. Create restricted keys with only the permissions you need.
2. Separate Keys by Function
- Send-only key: For email sending
- Read-only key: For statistics
- Admin key: For template management (keep separate)
3. Rotate Keys Regularly
Set a reminder to create new API keys every 90 days:
- Create new key
- Update Claude Desktop config
- Test it works
- Delete old key
4. Monitor Usage
Check usage dashboard:
https://app.sendgrid.com/statistics
Set up alerts for unusual activity.
What's Available
With SendGrid + QuickMCP:
✅ Email Sending:
- Send single emails
- Send using templates
- Send with attachments
- Schedule emails
✅ Statistics:
- Delivery rates
- Open rates
- Click rates
- Bounce rates
- Spam reports
✅ Templates:
- List templates
- View template content
- Use dynamic templates
✅ Suppressions:
- View bounces
- Check spam reports
- Manage unsubscribes
✅ Contacts:
- List contacts
- Search contacts
- View contact details
Email Best Practices
1. Verify Senders
Always verify sender emails before using them.
2. Use Templates
Create reusable templates for common emails:
- Go to: https://app.sendgrid.com/guide/integrate/langs/nodejs
- Create dynamic templates
- Reference them by ID when sending
3. Monitor Reputation
Check your sender reputation:
"What's my SendGrid sender reputation score?"
4. Handle Unsubscribes
Respect unsubscribe requests. SendGrid handles this automatically if configured.
Use Cases
Customer Onboarding
"Send welcome email to newcustomer@example.com using the welcome template"
Transactional Emails
"Send order confirmation to customer@example.com for order #12345"
Marketing Analytics
"Show me email campaign statistics: sent, delivered, opened, clicked"
Deliverability Monitoring
"Check bounce rate for emails sent this week"
Going to Production
1. Domain Authentication
Instead of single sender verification, authenticate your entire domain:
- Go to: https://app.sendgrid.com/settings/sender_auth/domain
- Follow DNS setup instructions
- Improves deliverability significantly
2. Dedicated IP (Advanced)
For high volume, consider a dedicated IP address.
3. Set Up Webhooks
Configure webhooks to track email events in real-time:
https://app.sendgrid.com/settings/mail_settings
4. Review Suppressions
Regularly clean suppression lists to maintain good deliverability.
Next Steps
- Try Stripe Integration
- Learn Twilio for SMS
- Read API Security Guide
SendGrid + QuickMCP brings email superpowers to Claude Desktop. Start sending smarter emails with AI today!