Sendgrid MCP server

Messaging and emailMarketing and SEO

MCP server for SendGrid, global transactional + marketing email (Twilio-owned).

Your AI app calls the Sendgrid MCP server, which does the messaging and email and marketing and SEO work and sends the result back to the chat.

About Sendgrid

Sendgrid is a community MCP server from codespar, filed in our directory under messaging and email and marketing and seo. MCP server for SendGrid, global transactional + marketing email (Twilio-owned).

Sendgrid runs on your own machine: your AI app starts it with the command npx -y @codespar/mcp-sendgrid@0.2.2 and talks to it over standard input and output. It needs SENDGRID_API_KEY set before Sendgrid starts.

Sendgrid is listed in the official MCP registry as io.github.codespar/mcp-sendgrid, version 0.2.2.

At a glance

Publisher
codespar (community)
Runs
Locally on your machine
Install from
Node.js package on npm: @codespar/mcp-sendgrid
Written in
TypeScript
License
MIT
GitHub stars
278
Official MCP registry
io.github.codespar/mcp-sendgrid

How to set up Sendgrid

  1. Install Node.js on the machine that runs your AI app, because Sendgrid starts with npx and downloads its package on first run.
  2. Create SENDGRID_API_KEY for Sendgrid in the connected service's own settings, scoped to the smallest permissions the job needs.
  3. Add Sendgrid to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Sendgrid tools to confirm the connection.
  5. Run one read-only task with Sendgrid first, and keep your app asking before each tool call until the results look right.

Sendgrid compared with similar servers

  • Twilio by codespar has fewer GitHub stars than Sendgrid (278 against 278); both are community servers, and both run locally.
  • Evolution API by codespar has fewer GitHub stars than Sendgrid (278 against 278); both are community servers, and both run locally.
  • Whatsapp Cloud by codespar has fewer GitHub stars than Sendgrid (278 against 278); both are community servers, and both run locally.

Before you connect Sendgrid

  • Give Sendgrid its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Sendgrid tool call until you trust what it does with them.
  • Treat text that Sendgrid fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Sendgrid on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Sendgrid

How marketing and sales teams put Sendgrid to work, by company size. Pick the size closest to yours and start Sendgrid on one use case.

Small business

  • A small team can have Sendgrid summarize the inbox or channel each morning, so nothing from a customer waits until the afternoon.
  • Owners can draft replies and follow-ups with Sendgrid and send them only after a read, keeping the personal tone customers expect.
  • A small business can ask Sendgrid which pages lost rankings this month and get a short fix list instead of a dashboard to interpret.
  • Sendgrid runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Marketing teams can use Sendgrid to turn long launch threads into decisions, owners and dates that land in the project tracker.
  • Sales and success teams can connect Sendgrid so an agent drafts follow-ups after every customer call, ready to edit and send.
  • Content teams can connect Sendgrid to plan briefs from live keyword data, then track which published pages moved after a refresh.
  • Start Sendgrid on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprises can deploy Sendgrid with retention and data loss rules intact, so agents summarize conversations without moving data outside policy.
  • Internal comms teams can use Sendgrid to find what employees ask most across channels and answer it once, in the right place.
  • Enterprise SEO teams can run Sendgrid across many domains and markets to flag technical issues and cannibalized pages before a quarterly review.
  • Sendgrid is a community server, so have security review the code and pin a version before Sendgrid touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Sendgrid README

From codespar/mcp-dev-latam on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

@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/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

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

Questions about Sendgrid

What is the Sendgrid MCP server?

MCP server for SendGrid, global transactional + marketing email (Twilio-owned). Sendgrid is maintained by codespar on GitHub at codespar/mcp-dev-latam, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Sendgrid MCP server?

Add Sendgrid to your AI app's MCP config with the command npx -y @codespar/mcp-sendgrid@0.2.2. In Claude Code, run claude mcp add --transport stdio codespar-sendgrid -- npx -y @codespar/mcp-sendgrid@0.2.2. To run Sendgrid this way you need Node.js installed.

Does Sendgrid need an API key?

Yes. Sendgrid expects SENDGRID_API_KEY to be set. Create the key for Sendgrid in the connected service's own settings, give it the smallest permissions the job needs, and keep it out of shared config files.

Is Sendgrid an official MCP server?

No. Sendgrid is a community server maintained by codespar. Community servers can be excellent; read the code and the open issues before you give Sendgrid access to company data.

What license is Sendgrid under?

Sendgrid is released under the MIT license, according to its GitHub repository. The license covers the code of Sendgrid; the service it connects to has its own terms.