- Home
- MCP servers
- SendGrid
SendGrid
- typescript
24
GitHub Stars
typescript
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
You can integrate the SendGrid Marketing API into your workflows using this MCP server. It exposes endpoints for managing contacts, lists, templates, and sending emails, all through the Model Context Protocol so you can automate marketing tasks and track engagement from your MCP client.
How to use
You connect to the SendGrid MCP server from your MCP client to perform common marketing operations. You can manage contacts and lists, generate and use dynamic templates, send emails to individuals or to lists, and retrieve basic analytics or validation information. Use verified sender identities and unsubscribe settings to stay compliant. Each operation is available as a distinct action you can call from your client, and you can supply or omit fields as appropriate for your use case.
How to install
Prerequisites: ensure you have Node.js and npm installed on your machine.
Clone the repository, install dependencies, and prepare to run the MCP server for development or testing.
# Clone the repository
git clone https://github.com/Garoth/sendgrid-mcp.git
cd sendgrid-mcp
# Install dependencies
npm install
Configuration example
Configure the MCP client to run the SendGrid MCP server locally by providing the runtime command, the path to the built server, and your API key. The following example shows how the MCP simulator would be wired in your settings to start the server and pass the API key securely.
{
"mcpServers": {
"sendgrid": {
"command": "node",
"args": ["/path/to/sendgrid-mcp/build/index.js"],
"env": {
"SENDGRID_API_KEY": "your-api-key-here"
},
"disabled": false,
"autoApprove": [
"list_contacts",
"list_contact_lists",
"list_templates",
"list_single_sends",
"get_single_send",
"list_verified_senders",
"list_suppression_groups",
"get_stats",
"validate_email"
]
}
}
}
Security and access
Keep your SendGrid API key secret and do not commit it to version control. Use environment variables to inject the key at runtime, and limit the operations you auto-approve in your development settings to prevent accidental data changes.
Notes and considerations
All template operations use dynamic templates with handlebars syntax. When sending to lists, you must provide either a suppression_group_id or a custom_unsubscribe_url to comply with email regulations. Sender email addresses must be verified with SendGrid before use.
The Single Sends API is used for bulk email operations for better tracking and management. Data changes may be eventually consistent, so newly added contacts or updated lists might take a moment to appear in subsequent queries.
Available tools
list_contacts
List all contacts in your SendGrid account. No parameters required.
add_contact
Add a contact to your SendGrid marketing contacts. Requires email; other fields are optional.
delete_contacts
Delete contacts from your SendGrid account by providing an array of email addresses.
get_contacts_by_list
Retrieve all contacts within a specific contact list by list_id.
list_contact_lists
List all contact lists in your SendGrid account.
create_contact_list
Create a new contact list with a given name.
delete_list
Delete a contact list by its list_id.
add_contacts_to_list
Add one or more contacts to an existing contact list by list_id.
remove_contacts_from_list
Remove specified contacts from a contact list without deleting them.
send_email
Send a single email via SendGrid to a recipient with optional HTML content and dynamic templates.
send_to_list
Send an email to a group of contacts defined by list_ids using a single send for tracking.
create_template
Create a new dynamic email template with handlebars syntax.
list_templates
List all dynamic templates.
get_template
Retrieve a dynamic template by template_id.
delete_template
Delete a dynamic template by template_id.
get_stats
Get SendGrid email statistics for a date range.
validate_email
Validate an email address using SendGrid.
list_verified_senders
List all verified sender identities.
list_suppression_groups
List all unsubscribe groups.