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 "Install 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 ServerSend 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. | 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. | No |
| Retrieve one Single Send. | 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. | No |
| List block suppressions. | No |
| List invalid email suppressions. | No |
| List spam report suppressions. | 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.
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
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/coopersully/sendgrid-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server