SendGrid MCP server
The SendGrid MCP server lets LLMs work with SendGrid for governed transactional email, contact synchronization, and consent and suppression management through natural conversation. It provides tools to send an email using text, HTML, or an allowlisted template, synchronize and organize contacts, manage suppression state, investigate delivery activity, and report performance without requiring direct interaction with the SendGrid interface.
Uses
Use the SendGrid MCP server to perform the following actions:
- Send an email using text or HTML content you supply, with optional attachments.
- Send an email using an allowlisted dynamic template.
- Synchronize contacts into SendGrid marketing contacts and track the resulting job.
- Add or remove existing contacts on an allowlisted static list.
- Suppress an email address globally after an explicit unsubscribe or do-not-contact request.
- Diagnose why an address is suppressed or blocked from receiving email.
- Discover allowlisted templates, contact lists, unsubscribe groups, and writable contact fields.
- Search email logs or retrieve message detail for a delivery investigation.
- Retrieve aggregate email performance statistics for a bounded date range.
- Remove a suppression after a human verifies and approves renewed consent.
Example prompts
Use the following example prompts to invoke SendGrid MCP server tools:
Send [email protected] our order-confirmation template with these details.Send [email protected] an email letting them know their ticket was resolved.Synchronize these contacts into our newsletter audience.Add [email protected] to our VIP contacts list.Remove [email protected] from our product-updates list.Suppress [email protected] from all future emails.Check whether [email protected] is suppressed or bouncing.List the allowlisted email templates I can send from.Search email logs for messages sent to [email protected] last week.Show me email delivery statistics for the past 30 days.
SendGrid MCP server tools
The SendGrid MCP server provides the following tools:
| Tool | Description |
|---|---|
| send_email | Sends an email using text or HTML content you supply, with optional attachments. |
| send_template_email | Sends an email using a dynamic template. |
| upsert_contacts | Adds or updates marketing contacts. |
| get_contact_job_status | Retrieves the status of a contact upsert or list-membership job. |
| suppress_email | Adds an email address to the global suppression list. |
| get_contact_by_email | Retrieves marketing contacts by email address. |
| get_suppression_status | Retrieves global unsubscribe, group unsubscribe, bounce, block, invalid-address, and spam-report state for an email. |
| list_connection_resources | Lists templates, contact lists, unsubscribe groups, or contact fields. |
| search_email_logs | Searches email logs or retrieves detail for a message. |
| manage_contact_list_membership | Adds or removes existing contacts on a list. |
| get_email_stats | Retrieves aggregate email statistics for a bounded date range. |
| suppress_email_for_group | Adds an email address to an unsubscribe group. |
| remove_suppression | Removes a global or group unsubscribe after renewed consent. |
Install the SendGrid MCP server
Complete the following steps to install a prebuilt MCP server to your project:
Sign in to your Workato account.
Go to AI Hub > Enterprise MCP > Custom servers.
Click + Create MCP server.
Go to the Start with pre-built MCP Servers using your connected apps section and select the prebuilt MCP server you plan to use.
Click Use this server.
Provide a name for your MCP server in the Server name field.
Use the Location drop-down menu to select the project for the MCP server.
Go to the Connections section and connect to your app account.
Select the connection type you plan to use for the MCP server template.
- User's connection: MCP server tools perform actions based on the identity and permissions of the user who connects to the application. Users authenticate with their own credentials to execute the skill.
- Your connection: This option uses the connection established by the recipe builder and follows the same principles as normal app connections.
Select your connection type
VERIFIED USER ACCESS AUTHENTICATION REQUIREMENTS
Only app connections that use OAuth 2.0 authorization code grant are available for user's connection. Refer to Verified user access for more information.
Complete the app-specific connection setup steps in the following section.
SendGrid connection setup
View SendGrid connection setup steps
The SendGrid connector uses API key authentication.
API version
SendGrid's connector uses the Web API v3 for integration with Workato. Refer to the SendGrid API documentation for more information.
Prerequisites
Ensure that your API key has the correct permissions before you connect to SendGrid in Workato:
Go to Settings > API Keys in your SendGrid account.
Click Create API Key.
Select Restricted Access under API Key Permissions and set Mail Send to Full Access.
VERIFY ACCESS
If a 403 error occurs after you assign permissions, switch the API key to Full Access to test whether missing permissions cause the issue. Revert to Restricted access with only the required scopes after verification to maintain security best practices.
Assign any additional required scopes based on your application's needs.
Use this API key in your Workato connection setup.
Connect to SendGrid with an API key
Complete the following steps to set up a SendGrid connection in Workato:
Enter a unique Connection name to identify your SendGrid account in Workato.
Name your connection
Enter your API Key. Refer to the Prerequisites section to create an API key.
Click Connect to complete the setup.
SendGrid role requirements
Each tool's availability depends on which SendGrid API key scopes the connected account has. A request without the required scope returns a permission-denied outcome rather than a partial result. Refer to the SendGrid API Keys documentation for the complete list of restricted-access scopes.
Recipe function configuration
Edit the server_config recipe to configure the SendGrid MCP server's behavior:
| Key | Description |
|---|---|
allowed_senders | Enter a comma-separated list of addresses send_email and send_template_email can send from. Use * as a wildcard character, for example: [email protected],*@example.org. Leave blank to allow any sender. |
allowed_recipients | Enter a comma-separated list of addresses a send can target for to, cc, and bcc. Use * as a wildcard character, for example: [email protected],*@example.org. Leave blank to allow any recipient. |
allowed_templates | Enter a comma-separated list of the dynamic template IDs send_template_email can use. Leave blank to allow any template. |
allowed_lists | Enter a comma-separated list of the contact list IDs upsert_contacts and manage_contact_list_membership can use. Leave blank to allow any list. |
allowed_unsubscribe_groups | Enter a comma-separated list of the unsubscribe group IDs a send or suppress_email_for_group can use. Leave blank to allow any group. |
allowed_attachment_types | Enter a comma-separated list of the MIME types to allow as attachments in the send_email and send_template_email tools, such as application/pdf,image/png. Leave blank to allow any type. |
allowed_contact_fields | Enter a comma-separated list of the custom contact field IDs upsert_contacts can set. Leave blank to allow any field. |
template_group_map | Enter template_id=group_id pairs, comma-separated, to bind a dynamic template to its unsubscribe group, for example d-abc=34351,d-def=34352. Leave blank for no binding. |
reporting_timezone | Enter the IANA time zone get_email_stats uses to calculate the default end date when you don't supply one. Leave blank for UTC. |
max_recipients_per_request | Enter the largest combined to, cc, and bcc recipient count a single send allows. Leave blank for no limit. |
max_categories | Enter the largest number of categories a single send allows. Leave blank for SendGrid's limit of 10. |
max_category_length | Enter the longest category length in characters. Leave blank for SendGrid's limit of 255. |
max_custom_args_bytes | Enter the largest combined size of custom argument keys and values, in bytes. Leave blank for SendGrid's limit of 10000. |
max_message_bytes | Enter the largest combined size of text, HTML, and attachment content, in bytes. Leave blank for SendGrid's limit of 30000000. |
max_contacts_per_upsert | Enter the largest number of contacts upsert_contacts accepts in one request. Leave blank for 1000. |
max_contacts_per_membership_change | Enter the largest number of contacts manage_contact_list_membership accepts in one request. Leave blank for 100. |
max_log_results | Enter the largest number of results search_email_logs can return in one request. Leave blank for SendGrid's limit of 1000. |
max_log_search_days | Enter the longest search window search_email_logs allows between its start and end time, in days. Leave blank for SendGrid's limit of 30. |
group_suppression_enabled | Configure whether suppress_email_for_group can run. Defaults to true. |
enabled | Configure the availability of each tool, for example: enabled.send_email. All tools are turned on by default. |
View recipe function configuration steps
Complete the following steps to configure the SendGrid MCP server:
Sign in to your Workato account and go to Projects.
Go to the project that contains your MCP server.
Open the server_config recipe.
Edit the value in the step for the setting you plan to change. For example, change group_suppression_enabled to false or lower max_message_bytes.
Save and start the recipe for the new value to take effect.
How to use SendGrid MCP server tools
Refer to the following sections for detailed information on available tools:
send_email tool
The send_email tool sends an email using text or HTML content you supply, with optional attachments, categories, and custom tracking arguments. You can optionally test a send through SendGrid's sandbox validation without delivering it. Your LLM uses this tool for a message with exactly one primary recipient, a sender on the sender allowlist, and text or HTML content instead of a template. A successful result means the server accepted the message for processing. It doesn't confirm delivery.
Try asking:
Send [email protected] a note confirming their appointment, with this text.Email [email protected] this HTML content with the subject "Your receipt" and attach this invoice PDF.Email [email protected] this content, CC'ing my manager.Send a test version of this email through the sandbox before sending it for real.
send_template_email tool
The send_template_email tool sends an email using an allowlisted dynamic template, with optional attachments. Your LLM uses this tool to send a template by its ID, supplying only the values its placeholders need. Your LLM must target the same unsubscribe group a template is bound to in Recipe function configuration, if one is configured.
Try asking:
Send [email protected] our welcome-email template with their first name filled in.Use the order-confirmation template to email [email protected] these order details.Send this template to these recipients with their account details.
upsert_contacts tool
The upsert_contacts tool creates new marketing contacts or updates them if they already exist, in batches capped by max_contacts_per_upsert. Your LLM uses this tool when a contact needs to exist with certain values regardless of whether it already exists in SendGrid, such as when syncing from an external system. It can also add the contacts to an allowlisted list and set allowlisted custom fields. The upsert batch submits as one asynchronous job.
Try asking:
Synchronize these contacts into our newsletter audience.Add or update these customer records in SendGrid with their current email and name.Upsert these contacts and add them all to our launch list in one step.
get_contact_job_status tool
The get_contact_job_status tool retrieves the status of a contact upsert or list-membership job. Your LLM uses this tool after upsert_contacts or manage_contact_list_membership returns a queued job.
Try asking:
Check the status of that contact sync job.Has the list-membership update for these contacts finished yet?Is that contact upsert job done, and did everything succeed?
suppress_email tool
The suppress_email tool adds an email address to the global suppression list and records the consent source, event time, and reason. Your LLM uses this tool only for an explicit global unsubscribe or do-not-contact request. suppress_email_for_group handles category-specific opt-outs.
Try asking:
Suppress [email protected] from all future emails, because they asked to unsubscribe.Add [email protected] to our global do-not-contact list, because they emailed support requesting it.Globally suppress this address based on the opt-out request in this ticket.
get_contact_by_email tool
The get_contact_by_email tool retrieves marketing contacts by one or more email addresses. Your LLM uses this tool to confirm whether specific contacts already exist or to retrieve their current details. It returns a normalized match or a not-found result for each address instead of a fuzzy search.
Try asking:
Look up the contact record for [email protected].Check whether [email protected] and [email protected] are already in our contacts.Retrieve the current profile for this contact by their email.
get_suppression_status tool
The get_suppression_status tool retrieves global unsubscribe, group unsubscribe, bounce, block, invalid-address, and spam-report state for an email. Your LLM uses this tool to check whether or why an address may not receive email, optionally narrowing to specific checks. This tool doesn't remove a suppression or guarantee future delivery.
Try asking:
Check whether [email protected] is suppressed or bouncing.Why might [email protected] not be receiving our emails?Show me the suppression and deliverability status for this address.
list_connection_resources tool
The list_connection_resources tool lists allowlisted templates, contact lists, unsubscribe groups, or contact fields. Your LLM uses this tool to retrieve an ID for a later action. This tool is read-only.
Try asking:
List the allowlisted email templates I can send from.What contact lists are allowlisted for this connection?Show me the writable contact fields and unsubscribe groups available to me.
search_email_logs tool
The search_email_logs tool searches email logs for a message by ID or by time range and recipient address, subject, category, delivery status, or failure reason. Your LLM uses this tool to investigate message-level delivery within the provider's 30-day retention window.
Try asking:
Search email logs for messages sent to [email protected] last week.Find the bounced emails to [email protected] in the past few days.Get the full event history for this specific message ID.
manage_contact_list_membership tool
The manage_contact_list_membership tool adds or removes existing contacts from an allowlisted list by their contact ID or email, in batches capped by max_contacts_per_membership_change. Your LLM uses this tool for explicit membership changes involving known contacts. This tool doesn't create contacts or lists. Check the resulting job with get_contact_job_status to confirm the change completed.
Try asking:
Add [email protected] to our VIP contacts list.Remove [email protected] from our product-updates list.Add these existing contacts to our newsletter list.
get_email_stats tool
The get_email_stats tool retrieves aggregate email statistics for a bounded date range. Your LLM uses this tool for account-level trends such as delivery, bounces, opens, clicks, spam reports, and unsubscribes, bucketed by day, week, or month. It can narrow to specific metrics or include derived rates such as bounce and open rate. This tool isn't for answering what happened to one recipient.
Try asking:
Show me email delivery statistics for the past 30 days.What's our bounce rate and open rate for last month?Compare our weekly email performance over the past quarter.
suppress_email_for_group tool
The suppress_email_for_group tool adds an email address to an allowlisted unsubscribe group. Your LLM uses this tool only for an explicit category-specific opt-out. suppress_email handles global do-not-contact requests. This tool is enabled by default. Refer to the Recipe function configuration section to disable this tool.
Try asking:
Unsubscribe [email protected] from our promotional emails group only.Opt [email protected] out of the product-update category, not all emails.Apply a category-specific suppression for this unsubscribe group.
remove_suppression tool
The remove_suppression tool removes a global or group unsubscribe after renewed consent. Your LLM uses this tool only with authoritative evidence that the person renewed consent for the requested scope. It requires your explicit approval before completing the removal. This tool doesn't clear bounce, block, invalid-address, or spam-report records.
Try asking:
Remove the global suppression on [email protected], because they resubscribed on our website.Restore [email protected]'s eligibility for our promotional emails group based on their renewed opt-in.They asked to be added back to our list after unsubscribing. Here's the evidence.
Getting started
View and manage your MCP server tools in the Details tab Tools section. Tool management provides the following capabilities:
TOOLS MUST BE STARTED
Your LLM can only access active tools in your MCP server connector.
Last updated: