io.github.codespar/mcp-sendgrid
io.github.codespar/mcp-sendgrid · 273 stars · TypeScript · MIT
MCP server MCP server for SendGrid — global transactional + marketing email (Twilio-owned)
Install
The repo has no one-line install. Follow its README.
Published as
- npm
@codespar/mcp-sendgridstdio
From the server's entry in the official MCP Registry.
Configuration
| Name | Set as | What it is |
|---|---|---|
SENDGRID_API_KEYRequired · Secret | Env var | SendGrid API key. Used as Bearer token in the Authorization header. |
SENDGRID_FROM_EMAILOptional | Env var | Optional default From address used by send_mail / send_template when `from.email` is omitted. Must be a Verified Sender or authenticated domain. |
Files
@codespar/mcp-sendgrid
MCP server for SendGrid — global transactional and marketing email.
SendGrid is Twilio-owned (acquired 2019). Together with @codespar/mcp-twilio this package closes the messaging loop:
- Twilio — SMS, WhatsApp, Voice, Verify
- SendGrid — email (transactional + marketing)
Agents building commerce notification flows — order confirmations, shipping updates, abandoned-cart nudges, promos — can now cover every channel through two packages.
Tools (20)
| Tool | Purpose |
|---|---|
send_mail |
Send an email via POST /mail/send. |
send_template |
Convenience wrapper for POST /mail/send with a dynamic template. |
add_contact |
Upsert contacts in Marketing Campaigns via PUT /marketing/contacts. |
list_contacts |
List Marketing Campaigns contacts via GET /marketing/contacts. |
delete_contact |
Delete contacts by id via DELETE /marketing/contacts?ids=.... |
search_contacts |
Search contacts with an SGQL query via POST /marketing/contacts/search. |
get_contact |
Retrieve a single Marketing Campaigns contact by id via GET /marketing/contacts/{id}. |
list_lists |
List all Marketing Campaigns contact lists via GET /marketing/lists. |
create_list |
Create a Marketing Campaigns contact list via POST /marketing/lists. |
delete_list |
Delete a Marketing Campaigns contact list via DELETE /marketing/lists/{id}. |
list_templates |
List transactional templates via GET /templates. |
create_template |
Create a transactional template via POST /templates. |
list_suppressions |
List all suppressed recipients for an unsubscribe group via GET /asm/groups/{group_id}/suppressions. |
add_suppression |
Add recipients to a suppression group via POST /asm/groups/{group_id}/suppressions. |
list_unsubscribe_groups |
List all unsubscribe groups on the account via GET /asm/groups. |
get_bounces |
Retrieve bounced recipients via GET /suppression/bounces. |
delete_bounce |
Remove a bounced address from the bounce suppression list via DELETE /suppression/bounces/{email}. |
cancel_scheduled_send |
Cancel or pause a scheduled send by batch_id via POST /user/scheduled_sends. |
get_event_webhook_settings |
Retrieve the Event Webhook configuration via GET /user/webhooks/event/settings. |
get_stats |
Global email stats via GET /stats. |
Install
npm install @codespar/mcp-sendgrid
Environment
SENDGRID_API_KEY="SG...." # required (secret) SENDGRID_FROM_EMAIL="no-reply@yourdomain.com" # optional default sender
The SENDGRID_FROM_EMAIL must be either a Verified Sender or belong to an authenticated domain.
Authentication
Bearer-token auth. The server handles this automatically.
Authorization: Bearer <SENDGRID_API_KEY>
API surface
- Base URL:
https://api.sendgrid.com/v3 - All requests/responses are
application/json POST /mail/sendreturns202 Acceptedon success (no body)
Send with a dynamic template
{
"to": "buyer@example.com",
"template_id": "d-abc123...",
"dynamic_template_data": {
"order_id": "1001",
"total_brl": "R$ 249,90",
"tracking_url": "https://example.com/track/1001"
}
}
Run
# stdio (default — for Claude Desktop, Cursor, etc) npx @codespar/mcp-sendgrid # HTTP (for server-to-server testing) MCP_HTTP=true MCP_PORT=3000 npx @codespar/mcp-sendgrid
Pairs with
@codespar/mcp-twilio— SMS, WhatsApp, Voice, Verify, Lookup
Enterprise
Need governance, budget limits, and audit trails for agent payments? CodeSpar Enterprise adds policy engine, payment routing, and compliance templates on top of these MCP servers.
License
MIT
Facts
- Kind
- MCP server
- Group
- Uncategorized
- Stars
- 273
- License
- MIT
- Language
- TypeScript
- Last push
- 2026-09-27
- Forks
- 50
- MCP Registry
- io.github.codespar/mcp-sendgrid
- Homepage
- codespar.dev/servers
- Topics
- agentic-commerce, ai-agents, brazil, claude, fintech, latin-america, llm-tools, mcp, model-context-protocol, nfe, open-finance, payments, pix
- 1REAio.github.morluto/reaReverse engineer anything from your terminal or agent with one CLI and MCP server.125.3k
- 2com.browser-use/browser-usecom.browser-use/browser-useControl a real Chrome browser to complete any task: fill forms, extract data, book flights.117.7k
- 3World Monitorapp.worldmonitor/mcpLive markets, conflicts, country risk, chokepoints, energy, and China decision signals. 93 tools.88.3k
- 4Scrapling MCP Serverd4vinci/scrapling🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scraplingdev86.9k
- 5Everythingmodelcontextprotocol/serversThis MCP server attempts to exercise all the features of the MCP protocol. It is not intended to be a useful server, but rather a test server for builders of MCP clients. It implements prompts, tools, resources, sampling, and more to showcase MCP capabilities.85.8k
- 6Fetchmodelcontextprotocol/serversA Model Context Protocol server that provides web content fetching capabilities. This server enables LLMs to retrieve and process content from web pages, converting HTML to markdown for easier consumption.85.8k