🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@codespar/mcp-sendgrid

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codespar/mcp-sendgrid

MCP server for SendGrid — global transactional + marketing email (Twilio-owned). Pairs with @codespar/mcp-twilio for full messaging coverage.

npmnpm
Version
0.1.0
Version published
Weekly downloads
46
-28.12%
Maintainers
1
Weekly downloads
 
Created
Source

@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

ToolPurpose
send_mailPOST /mail/send — personalizations, content, attachments, scheduling
send_templatePOST /mail/send using a dynamic template (d-...) — convenience wrapper
add_contactPUT /marketing/contacts — upsert contacts (async job), assign to lists
list_contactsGET /marketing/contacts — sample of contacts
delete_contactDELETE /marketing/contacts?ids=... — delete by id or wipe all
search_contactsPOST /marketing/contacts/search — SGQL (SendGrid SQL-like) query
list_templatesGET /templates — dynamic (default) or legacy transactional templates
create_templatePOST /templates — create a transactional template
list_suppressionsGET /asm/groups/{group_id}/suppressions — suppressed emails for a group
add_suppressionPOST /asm/groups/{group_id}/suppressions — add suppressions
get_statsGET /stats — sent / delivered / opens / clicks aggregated by day/week/month

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/send returns 202 Accepted on 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

License

MIT

Keywords

mcp

FAQs

Package last updated on 24 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts