SendGrid MCP Server
Provides tools for managing SendGrid email workflows, including design library, dynamic templates, marketing contacts and lists, single sends, email sending, stats, email validation, verified senders, and suppression groups.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@SendGrid MCP Server Send a test email to user@example.com with subject 'Hello'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
SendGrid MCP Server
An MCP stdio server for managing SendGrid email workflows from Codex and other MCP clients.
It supports:
Design Library assets
Dynamic transactional templates and versions
Marketing contacts and contact lists
Single Sends
Direct email sends
Stats, email validation, verified senders, and suppression groups
The server uses SendGrid v3 APIs only. It never hardcodes API keys; provide SENDGRID_API_KEY through the environment.
Install
Requires Node.js 24 or newer.
git clone https://github.com/coopersully/sendgrid-mcp.git
cd sendgrid-mcp
npm install
npm run buildRelated MCP server: SendGrid MCP Server
Codex Configuration
Add the server to ~/.codex/config.toml:
[mcp_servers.sendgrid]
command = "node"
args = ["/absolute/path/to/sendgrid-mcp/build/index.js"]
env = { SENDGRID_API_KEY = "SG.your-api-key" }Prefer setting the key in your local environment or secret store instead of writing it into a shared file.
Recommended auto-approval policy: approve read-only tools only. Require review for tools that send email, mutate contacts, update templates/designs, or delete anything.
Read-only tools that are usually safe to auto-approve:
[
"list_contacts",
"list_contact_lists",
"get_contacts_by_list",
"get_contacts_by_emails",
"get_contact_by_id",
"get_total_contact_count",
"get_contact_list",
"get_list_contact_count",
"list_custom_fields",
"list_segments",
"list_templates",
"get_template",
"get_template_version",
"list_designs",
"get_design",
"list_pre_built_designs",
"get_pre_built_design",
"list_single_sends",
"get_single_send",
"search_single_sends",
"get_single_send_schedule",
"list_single_send_categories",
"list_single_send_stats",
"get_single_send_stats",
"list_verified_senders",
"list_suppression_groups",
"list_group_suppressions",
"list_global_suppressions",
"list_bounces",
"list_blocks",
"list_invalid_emails",
"list_spam_reports",
"list_marketing_senders",
"get_marketing_sender",
"get_stats",
"validate_email"
]Tool Groups
Design Library
Tool | Purpose | Mutates |
| List account designs with optional | No |
| Retrieve a design, including editable content fields returned by SendGrid. | No |
| Create a design from name, subject, HTML/plain content, editor, categories, and plain-text generation options. | Yes |
| Patch an existing design. Requires at least one editable field. | Yes |
| Copy an existing account design. | Yes |
| Permanently delete a design. Requires | Yes |
| List SendGrid pre-built designs. | No |
| Retrieve a pre-built design. | No |
| Copy a pre-built design into the account. | Yes |
Dynamic Templates
Tool | Purpose | Mutates |
| List dynamic transactional templates. | No |
| Retrieve a template and its versions. | No |
| Create a dynamic template and an initial active version. | Yes |
| Rename a template. | Yes |
| Copy a template using SendGrid's native duplicate endpoint. | Yes |
| Permanently delete a template. Requires | Yes |
| Retrieve one version's content and active state. | No |
| Create a new version. Defaults to inactive with | Yes |
| Activate an existing version for future sends. | Yes |
| Directly patch a version. Prefer creating a new version for reviewable edits. | Yes |
| Permanently delete a version. Requires | Yes |
Safe editing workflow:
Call
get_template.Call
get_template_versionfor the active version.Call
create_template_versionwith edited content and leaveactiveomitted or set to0.Inspect the returned version.
Call
activate_template_versiononly after approval.
Contacts and Lists
Tool | Purpose | Mutates |
| List marketing contacts. | No |
| Upsert one contact. | Yes |
| Permanently delete contacts by email. Requires | Yes |
| Retrieve contacts by email addresses. | No |
| Retrieve one contact by SendGrid contact ID. | No |
| Retrieve total marketing contact count. | No |
| List contact lists. | No |
| Retrieve one contact list by ID. | No |
| Create a list. | Yes |
| Rename a contact list. | Yes |
| Delete a list. Requires | Yes |
| Retrieve contact count for one list. | No |
| List contacts in a list. | No |
| Add emails to a list. | Yes |
| Remove emails from a list without deleting contacts. | Yes |
Custom Fields and Segments
Tool | Purpose | Mutates |
| List marketing contact custom field definitions. | No |
| Create a custom field definition. | Yes |
| Rename a custom field definition. | Yes |
| Delete a custom field definition. Requires | Yes |
| List Segments v2 segments with optional | No |
| Create a segment from | Yes |
| Retrieve one segment. | No |
| Update a segment name or query DSL. | Yes |
| Refresh a segment. | Yes |
| Delete a segment. Requires | Yes |
Sending
Tool | Purpose | Mutates |
| Send one email through SendGrid Mail Send. | Yes |
| Create and immediately schedule a Single Send to lists or segments. Requires either | Yes |
| Create a Single Send draft without scheduling it. | Yes |
| Patch a Single Send draft. | Yes |
| Delete a Single Send. Requires | Yes |
| Duplicate a Single Send. | Yes |
| Search Single Sends with SendGrid query syntax. | No |
| Schedule an existing Single Send for | Yes |
| Retrieve schedule information for a Single Send. | No |
| Cancel a Single Send schedule without deleting the draft. | Yes |
| List Single Send categories. | No |
| Retrieve Single Sends stats. | No |
| Retrieve stats for one Single Send. | No |
| List Single Sends as summaries with optional | No |
| Retrieve one Single Send summary. Use | No |
Suppressions, Senders, Stats, and Validation
Tool | Purpose | Mutates |
| List verified sender identities. | No |
| List unsubscribe groups. | No |
| List suppressed addresses in a suppression group. | No |
| Add addresses to a suppression group. | Yes |
| Remove an address from a suppression group. Requires | Yes |
| List global suppressions. | No |
| Add addresses to global suppressions. | Yes |
| Remove an address from global suppressions. Requires | Yes |
| List bounce suppressions. Defaults to | No |
| List block suppressions. Defaults to | No |
| List invalid email suppressions. Defaults to | No |
| List spam report suppressions. Defaults to | No |
| List Marketing sender identities. | No |
| Retrieve one Marketing sender identity. | No |
| Create a Marketing sender identity. | Yes |
| Update a Marketing sender identity. | Yes |
| Delete a Marketing sender identity. Requires | Yes |
| Resend a sender verification email. | Yes |
| Retrieve email stats for | No |
| Validate one email address. | No |
Safety Behavior
Tool schemas are closed with
additionalProperties: false.Tool arguments are validated before SendGrid is called.
Empty strings, wrong primitive types, empty arrays, unexpected arguments, and missing required fields are rejected locally.
Destructive delete tools require
confirm_delete: true.Template content edits are safe by default through
create_template_version, which creates inactive versions unlessactive: 1is explicitly provided.Server error logging avoids dumping raw error objects to stderr.
Agent Response Conventions
List tools use the SendGrid endpoint's real pagination model:
page_size/page_token,limit/offset, or endpoint-specific filters.Transformed list responses use
{ "result": [], "_metadata": {} }._metadatacarries pagination, applied limits, offsets, and redaction flags.Suppression list tools default to
limit: 50and redactemailfields unlessinclude_emails: trueis set.Content-heavy get tools may return summaries by default and expose full details through an explicit flag such as
include_details: true.
Development
npm ci
npm run checknpm run check runs formatting, ESLint, TypeScript type checks, Vitest coverage, build, and npm audit.
Tests use Vitest with mocked SendGrid clients. They do not make live API calls.
Useful commands:
npm run format
npm run lint
npm run typecheck
npm run test:coverage
npm run watch
npm run inspectorCI runs the same validation gates on Node.js 24 and 26.
Architecture and code standards live in docs/ARCHITECTURE.md.
Notes
The API key must have the SendGrid permissions required for the tools you use.
Sender addresses must be verified before sending.
Bulk sends must include either a suppression group or custom unsubscribe URL.
SendGrid Marketing API changes can be eventually consistent; recently changed contacts and lists may not appear immediately.
Use least-privilege API keys when possible, especially for agents that only need template/design management.
References
Available Tools
80 toolsactivate_template_versionB
Mutating: activate an existing dynamic template version. This changes which version is used for future sends.
Inputs: version_id (required), template_id (required).
add_contactC
Add a contact to your SendGrid marketing contacts
Inputs: email (required), last_name, first_name, custom_fields.
add_contacts_to_listC
Add contacts to an existing SendGrid list
Inputs: emails (required), list_id (required).
add_global_suppressionsB
Mutating: add email addresses to global suppressions
Inputs: emails (required).
add_group_suppressionsB
Mutating: add email addresses to a suppression group
Inputs: emails (required), group_id (required).
cancel_single_send_scheduleA
Mutating: cancel a scheduled Single Send without deleting the draft
Inputs: single_send_id (required).
create_contact_listC
Create a new contact list in SendGrid
Inputs: name (required).
create_custom_fieldA
Mutating: create a SendGrid marketing contact custom field definition
Inputs: name (required), field_type (required).
create_designC
Mutating: create a new SendGrid Design Library design
Inputs: name (required), editor, subject, categories, +3 more.
create_marketing_senderC
Mutating: create a SendGrid Marketing sender identity
Inputs: sender (required).
create_segmentC
Mutating: create a SendGrid Segments v2 segment
Inputs: name (required), query_dsl (required).
create_single_sendA
Mutating: create a SendGrid Single Send draft without scheduling it
Inputs: single_send (required).
create_templateB
Create a new email template in SendGrid
Inputs: name (required), subject (required), html_content (required), plain_content (required).
create_template_versionA
Mutating but safe-by-default: create a new dynamic template version from edited content. The new version is inactive unless active is set to 1.
Inputs: name (required), subject (required), template_id (required), html_content (required), +2 more.
delete_contactsA
Destructive: permanently delete contacts from your SendGrid account. Requires confirm_delete: true.
Inputs: emails (required), confirm_delete (required).
delete_custom_fieldB
Destructive: delete a SendGrid marketing contact custom field definition. Requires confirm_delete: true.
Inputs: field_id (required), confirm_delete (required).
delete_designA
Destructive: permanently delete a SendGrid Design Library design. Requires confirm_delete: true.
Inputs: design_id (required), confirm_delete (required).
delete_global_suppressionA
Mutating and sensitive: remove one email address from global suppressions. Requires confirm_delete: true.
Inputs: email (required), confirm_delete (required).
delete_group_suppressionA
Mutating and sensitive: remove one email address from a suppression group. Requires confirm_delete: true.
Inputs: email (required), group_id (required), confirm_delete (required).
delete_listA
Destructive: delete a contact list from SendGrid. Requires confirm_delete: true.
Inputs: list_id (required), confirm_delete (required).
delete_marketing_senderA
Destructive: delete a SendGrid Marketing sender identity. Requires confirm_delete: true.
Inputs: sender_id (required), confirm_delete (required).
delete_segmentB
Destructive: delete a SendGrid Segments v2 segment. Requires confirm_delete: true.
Inputs: segment_id (required), confirm_delete (required).
delete_single_sendA
Destructive: delete a SendGrid Single Send. Requires confirm_delete: true.
Inputs: confirm_delete (required), single_send_id (required).
delete_templateA
Destructive: permanently delete a dynamic template from SendGrid. Requires confirm_delete: true.
Inputs: template_id (required), confirm_delete (required).
delete_template_versionA
Destructive: permanently delete a dynamic template version. Requires confirm_delete: true.
Inputs: version_id (required), template_id (required), confirm_delete (required).
duplicate_designC
Mutating: copy an existing SendGrid Design Library design
Inputs: design_id (required), name.
duplicate_pre_built_designB
Mutating: copy a SendGrid pre-built design into your account
Inputs: design_id (required), name.
duplicate_single_sendB
Mutating: duplicate a SendGrid Single Send
Inputs: single_send_id (required), name.
duplicate_templateB
Mutating: copy a dynamic template into a new dynamic template using SendGrid native duplication
Inputs: name (required), template_id (required).
get_contact_by_idA
Read-only: retrieve one marketing contact by contact ID
Inputs: contact_id (required).
get_contact_listA
Read-only: retrieve one SendGrid contact list by ID
Inputs: list_id (required).
get_contacts_by_emailsB
Read-only: retrieve marketing contacts by email addresses
Inputs: emails (required).
get_contacts_by_listB
Get all contacts in a SendGrid list
Inputs: list_id (required).
get_designA
Read-only: retrieve a SendGrid Design Library design including editable content fields
Inputs: design_id (required).
get_list_contact_countA
Read-only: retrieve contact count for one SendGrid contact list
Inputs: list_id (required).
get_marketing_senderA
Read-only: retrieve one SendGrid Marketing sender identity
Inputs: sender_id (required).
get_pre_built_designA
Read-only: retrieve a SendGrid pre-built design
Inputs: design_id (required).
get_segmentA
Read-only: retrieve one SendGrid Segments v2 segment
Inputs: segment_id (required).
get_single_sendC
Get details of a specific single send
Inputs: single_send_id (required), include_details.
get_single_send_scheduleA
Read-only: retrieve schedule information for a Single Send
Inputs: single_send_id (required).
get_single_send_statsA
Read-only: retrieve stats for one SendGrid Single Send
Inputs: single_send_id (required), end_date, start_date, aggregated_by.
get_statsC
Get SendGrid email statistics
Inputs: start_date (required), end_date, aggregated_by.
get_templateA
Retrieve a SendGrid template by ID
Inputs: template_id (required).
get_template_versionA
Read-only: retrieve one dynamic template version including subject, HTML, plain text, and active state
Inputs: version_id (required), template_id (required).
get_total_contact_countA
Read-only: retrieve total marketing contact count
Inputs: no named parameters.
list_blocksB
Read-only: list block suppressions
Inputs: email, limit, offset, end_time, +2 more.
list_bouncesC
Read-only: list bounce suppressions
Inputs: email, limit, offset, end_time, +2 more.
list_contact_listsA
List all contact lists in your SendGrid account
Inputs: no named parameters.
list_contactsB
List all contacts in your SendGrid account
Inputs: no named parameters.
list_custom_fieldsA
Read-only: list SendGrid marketing contact custom field definitions
Inputs: no named parameters.
list_designsB
Read-only: list SendGrid Design Library designs
Inputs: summary, page_size, page_token.
list_global_suppressionsC
Read-only: list global suppressions
Inputs: end_time, start_time.
list_group_suppressionsA
Read-only: list suppressed email addresses in a suppression group
Inputs: group_id (required), end_time, start_time.
list_invalid_emailsA
Read-only: list invalid email suppressions
Inputs: email, limit, offset, end_time, +2 more.
list_marketing_sendersA
Read-only: list SendGrid Marketing sender identities
Inputs: no named parameters.
list_pre_built_designsA
Read-only: list SendGrid pre-built Design Library designs that can be copied into your account
Inputs: summary, page_size, page_token.
list_segmentsC
Read-only: list SendGrid Segments v2 segments
Inputs: ids, parent_list_ids, no_parent_list_id.
list_single_send_categoriesA
Read-only: list categories used by SendGrid Single Sends
Inputs: no named parameters.
list_single_sendsA
Read-only: list SendGrid Single Sends as summaries with optional pagination
Inputs: page_size, page_token.
list_single_send_statsC
Read-only: retrieve Single Sends stats
Inputs: end_date, start_date, aggregated_by.
list_spam_reportsC
Read-only: list spam report suppressions
Inputs: email, limit, offset, end_time, +2 more.
list_suppression_groupsA
List all unsubscribe groups in your SendGrid account
Inputs: no named parameters.
list_templatesA
List all email templates in your SendGrid account
Inputs: no named parameters.
list_verified_sendersB
List all verified sender identities in your SendGrid account
Inputs: no named parameters.
refresh_segmentC
Mutating: refresh a SendGrid Segments v2 segment
Inputs: segment_id (required).
remove_contacts_from_listA
Remove contacts from a SendGrid list without deleting them
Inputs: emails (required), list_id (required).
resend_marketing_sender_verificationA
Mutating: resend verification email for a SendGrid Marketing sender identity
Inputs: sender_id (required).
schedule_single_sendB
Mutating: schedule an existing SendGrid Single Send for now or a future ISO timestamp
Inputs: send_at (required), single_send_id (required).
search_single_sendsB
Read-only: search SendGrid Single Sends with SendGrid query syntax
Inputs: query (required), page_size, page_token.
send_emailC
Send an email using SendGrid
Inputs: to (required), from (required), text (required), subject (required), +3 more.
send_to_listC
Send an email to a contact list using SendGrid Single Sends
Inputs: name (required), subject (required), sender_id (required), html_content (required), +5 more.
update_contact_listB
Mutating: rename a SendGrid contact list
Inputs: name (required), list_id (required).
update_custom_fieldB
Mutating: update a SendGrid marketing contact custom field definition
Inputs: name (required), field_id (required).
update_designC
Mutating: patch an existing SendGrid Design Library design
Inputs: design_id (required), name, editor, subject, +4 more.
update_marketing_senderC
Mutating: update a SendGrid Marketing sender identity
Inputs: sender (required), sender_id (required).
update_segmentC
Mutating: update a SendGrid Segments v2 segment
Inputs: segment_id (required), name, query_dsl.
update_single_sendC
Mutating: update a SendGrid Single Send draft
Inputs: single_send (required), single_send_id (required).
update_template_nameA
Mutating: rename a dynamic template without changing its versions or active content
Inputs: name (required), template_id (required).
update_template_versionA
Advanced mutating operation: directly patch an existing template version. Prefer create_template_version for safer edits.
Inputs: version_id (required), template_id (required), name, active, +3 more.
validate_emailC
Validate an email address using SendGrid
Inputs: email (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 80 tools
Although there are many tools, each targets a distinct resource and action. Similar suppression-related tools (e.g., list_blocks, list_bounces) are differentiated by the specific suppression type, and descriptions clearly delineate operations. Minor overlap exists between get_single_send and get_single_send_schedule, but overall ambiguity is low.
Tool names consistently follow a verb_noun pattern in snake_case (e.g., activate_template_version, add_contact, delete_list). A few less common verbs (duplicate, refresh) are used consistently. No mixing of camelCase or inconsistent verb styles, making the naming very predictable.
80 tools is high for a single MCP server, covering a broad range of SendGrid features. While each tool serves a specific purpose, the sheer number may overwhelm agents and suggests the server could be split into smaller, more focused servers. The count is borderline—not extreme but above the typical well-scoped range.
The toolset covers nearly all major SendGrid domains: contacts, lists, segments, templates, designs, single sends, suppressions, sending, statistics, and validation. Minor gaps exist (e.g., transactional sends, webhook management), but the core workflows for marketing and email delivery are well-represented.
Maintenance
Related MCP Connectors
Send, track, and manage transactional and bulk email delivery
Send email and read templates, marketing contacts, lists, stats, bounces and unsubscribes.
Send transactional email, run campaigns, manage contacts and automations, audit deliverability.
Send email, check deliverability, set up domains, and run templates, contacts and campaigns.
Related MCP Servers
- AlicenseBqualityDmaintenanceProvides an interface to manage email marketing, contact lists, dynamic templates, and email analytics via SendGrid's API.21442 npm32ISC
- AlicenseBqualityBmaintenanceEnables comprehensive email marketing and transactional email operations through SendGrid's API v3. Supports contact management, campaign creation, email automation, list management, and email sending with built-in read-only safety mode.58442 npm4ISC
- FlicenseBqualityNot gradedmaintenanceEnables sending emails and managing webhooks through the SendLayer API. Supports plain text and HTML emails with attachments, CC/BCC recipients, and webhook event management for email delivery tracking.5-
- AlicenseNot gradedqualityDmaintenanceEnables AI models to send emails, manage contacts, and interact with SendGrid's email platform via MCP.1MIT