SendGrid MCP Server
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Integrations
Provides access to SendGrid's Marketing API for email marketing and contact management, including contact and list management, email sending, template management, and analytics capabilities
SendGrid MCP Server
A Model Context Protocol (MCP) server that provides access to SendGrid's Marketing API for email marketing and contact management. https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api
Demo
In this demo, we ask the Cline SendGrid agent to make a new contact list, add my emails to it, automatically generate a template for Lost Cities facts, and send the email to the list. In this process, Cline will automatically realize that it needs to know the verified senders we have, and which unsubscribe group to use. A pretty email is delivered to my inboxes, delighting me with Lost Cities!
Important Note on API Support
This server exclusively supports SendGrid's v3 APIs and does not provide support for legacy functionality. This includes:
- Dynamic templates only - legacy templates are not supported
- Marketing API v3 for all contact & contact list operations
- Single Sends API for bulk email sending
Available Tools
Contact Management
list_contacts
Lists all contacts in your SendGrid account.
add_contact
Add a contact to your SendGrid marketing contacts.
delete_contacts
Delete contacts from your SendGrid account.
get_contacts_by_list
Get all contacts in a SendGrid list.
List Management
list_contact_lists
List all contact lists in your SendGrid account.
create_contact_list
Create a new contact list in SendGrid.
delete_list
Delete a contact list from SendGrid.
add_contacts_to_list
Add contacts to an existing SendGrid list.
remove_contacts_from_list
Remove contacts from a SendGrid list without deleting them.
Email Sending
send_email
Send an email using SendGrid.
send_to_list
Send an email to a contact list using SendGrid Single Sends.
Template Management (Dynamic Templates Only)
create_template
Create a new dynamic email template.
list_templates
List all dynamic email templates.
get_template
Retrieve a template by ID.
delete_template
Delete a dynamic template.
Analytics and Validation
get_stats
Get SendGrid email statistics.
validate_email
Validate an email address using SendGrid.
Account Management
list_verified_senders
List all verified sender identities.
list_suppression_groups
List all unsubscribe groups.
Installation
Configuration
- Get your SendGrid API key:
- Log in to your SendGrid account
- Go to Settings > API Keys
- Create a new API key with full access permissions
- Save the API key securely as it won't be shown again
- Add it to your Cline MCP settings file inside VSCode's settings (ex. ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json):
Note: Tools that modify data (like sending emails or deleting contacts) are intentionally excluded from autoApprove for safety.
Development
Setting Up Tests
The tests use real API calls to ensure accurate responses. To run the tests:
- Copy the example environment file:Copy
- Edit
.env
and add your SendGrid API key:Note: TheCopy.env
file is gitignored to prevent committing sensitive information. - Run the tests:Copy
Building
Important Notes
- When sending emails to lists, you must provide either a suppression_group_id or custom_unsubscribe_url to comply with email regulations
- Sender email addresses must be verified with SendGrid before they can be used to send emails
- All templates are created as dynamic templates with support for handlebars syntax (e.g., {{variable_name}})
- The Single Sends API is used for all bulk email operations as it provides better tracking and management capabilities
- The SendGrid API is "eventually consistent" - data changes (like adding contacts or updating lists) may not appear immediately after being made
License
MIT
SendGrid logo copyright / owned by Twilio
You must be authenticated.
Provides an interface to manage email marketing, contact lists, dynamic templates, and email analytics via SendGrid's API.
- Demo
- Important Note on API Support
- Available Tools
- Installation
- Configuration
- Development
- Important Notes
- License