Integrations

SendGrid MCP — Connect SendGrid to Claude, ChatGPT, and Other AI Assistants

·18 min read

If you're searching for "SendGrid MCP", you're asking one of two things: does SendGrid have an MCP server? or how do I connect SendGrid to an AI assistant via the Model Context Protocol?

⚠️ No official SendGrid MCP server yet. Community options exist — details below.

What Is MCP?

Model Context Protocol (MCP) is an open standard developed by Anthropic that lets AI assistants — like Claude — connect to external tools, APIs, and data sources in a standardised way.

Before MCP, every AI integration required bespoke tooling: custom prompts, custom API wrappers, and custom glue code to pass context back and forth. MCP replaces that with a common interface: the AI asks the MCP server for data or actions, the server returns structured results, and the AI uses them to answer your question or complete a task.

In plain terms: MCP is how you give an AI assistant live access to SendGrid — not just knowledge about it, but real, up-to-date data from your account.

What a SendGrid MCP Integration Does

Once SendGrid is connected via MCP, your AI assistant can:

  • Read live data — pull records, metrics, activity, and status directly from SendGrid
  • Take actions — create, update, or log records based on your instructions
  • Cross-reference context — combine SendGrid data with other connected tools mid-conversation

The key difference from a standard chatbot: the assistant is not working from training data or memory. It is reading your actual SendGrid instance, in real time.

Practical SendGrid MCP Use Cases

Campaign stats on demand

Ask the assistant to fetch open rates, click rates, and unsubscribes for your last three campaigns from SendGrid and summarise what's working.

List segmentation from chat

Have the assistant query SendGrid for a specific segment and return a count or export — without logging into the platform.

Campaign draft and send

Describe the campaign goal in chat; the assistant writes the copy, sets up the campaign structure in SendGrid via MCP, and flags it for review before sending.

SendGrid MCP: There Is No Official Server, and the One That Exists Cannot Send Email

Start with the correction, because it decides your architecture before you write a line of config.

Twilio does not ship a SendGrid MCP server. What Twilio ships is the Twilio MCP server, a Public Beta documentation assistant hosted at https://mcp.twilio.com/docs, and its own limitations section is explicit about what it does: "The server provides API search and documentation retrieval. It does not execute API calls on your behalf." SendGrid's docs are indexed by it, so a search for "bounce suppression" returns the right API operation and its parameter schema. Nothing sends, nothing queries your account, nothing sees your stats.

That distinction is the whole article. Every "SendGrid MCP" listicle is really describing one of four different things, and three of them are not SendGrid at all:

What people call "SendGrid MCP" What it actually is Can it send?
Twilio MCP server (mcp.twilio.com/docs) A read-only docs/search server indexing Twilio + SendGrid + Segment specs No. It never calls an API
A community npm/GitHub server Third-party wrappers around SendGrid API v3 you run yourself Yes, if the wrapper implements it
A hand-built proxy Your own thin MCP layer over api.sendgrid.com/v3 Yes, whatever you code
A managed agent (Cody) A hosted assistant with the SendGrid connection already built Depends on the tool

Twilio's official MCP server documentation — the hosted docs server and its read-only limitations section

Twilio's own MCP page. The Limitations block is the one to read before you plan anything: read-only, public specs only, no API execution. The "Planned additions" hint at OAuth-authenticated execute tools, but as of this writing they are not shipped.

What the Twilio docs server is genuinely good for

Do not skip it. Its two-tool search-then-retrieve design is efficient, and it solves a real problem for a SendGrid agent: the model's training data about SendGrid is stale in a specific, damaging way. SendGrid deprecated the v2 API, renamed Marketing Campaigns endpoints, moved legacy templates out, and changed how senders and suppression groups relate. An agent working from memory will confidently describe the wrong endpoint.

Connecting it costs one line and no credentials:

{
  "mcpServers": {
    "twilio-docs": {
      "url": "https://mcp.twilio.com/docs"
    }
  }
}

The two tools are twilio__search (natural-language query to ranked API operations and doc IDs) and twilio__retrieve (full parameter and response schemas for the IDs you picked). The split exists so the agent only pulls full schemas for the two or three operations it will actually use, instead of flooding context with the entire Mail Send reference.

One real caveat from Twilio's page: search returns the latest API version by default. A query about Programmable Messaging returns v1 results unless you explicitly filter for v2010. The same class of mistake applies to SendGrid — if you need behaviour from a specific API generation, put the version in the query rather than trusting the default.

The community servers, and the credential they ask for

The most-copied community server (Garoth/sendgrid-mcp) wraps SendGrid's Marketing API and exposes around 18 tools across contact management, list management, single sends, dynamic templates, stats, and validation. The real tool surface looks like this:

  • Contacts: list_contacts, add_contact, delete_contacts, get_contacts_by_list
  • Lists: list_contact_lists, create_contact_list, delete_list, add_contacts_to_list, remove_contacts_from_list
  • Sending: send_email (single), send_to_list (Single Sends)
  • Templates: create_template, list_templates, get_template, delete_template — dynamic templates only, legacy templates are unsupported by design
  • Analytics: get_stats with start_date, end_date, aggregated_by of day | week | month
  • Account: list_verified_senders, list_suppression_groups, validate_email

Read that list against a deliverability workflow and the gap appears immediately: there is no suppression search and no bounce inspection in that tool set. The tools that matter when a send goes wrong (/suppression/bounces, /suppression/spam_reports, /email_activity) are not there. So the community server is good at doing things and blind at diagnosing them.

Community sendgrid-mcp repository — README with the Marketing API scope and the tool list

A community server's README. Useful, actively maintained, and not affiliated with Twilio. Note the "Marketing API v3" framing rather than the full SendGrid surface.

The pitfall that actually bites: the API key it tells you to make

Most community READMEs tell you to create the key like this:

"Create a new API key with full access permissions"

That is a full-access key for a Marketing API wrapper that cannot inspect deliverability. If a prompt-injected instruction reaches a tool with send_email and delete_contacts bound to a full-access key, the blast radius includes your whole account: subusers, IP pools, sender authentication, webhook config. There is no per-tool approval layer inside the server.

Two decisions fix this properly:

  1. Key scope. SendGrid API keys are per-permission-scope (Mail Send, Stats, Suppressions, Marketing, etc.). A read-only monitoring agent needs Stats → Read and Suppressions → Read and must not get Mail Send. A drafting agent gets Mail Send plus Stats → Read. Never grant full access to an agent because the README said so.
  2. Approval boundary. The write tools should sit behind an approval in the host agent, not inside the MCP server. In OpenClaw that is per-tool approval (Always approved set individually), so listing tools can auto-run while send_to_list waits for a human — a distinction the community README's autoApprove: ["*"] erases entirely.

There is a second, quieter key-related trap. Turning on signature verification for the Event Webhook requires the API key used to manage it to have Full Access permissions. Twilio's docs say so directly. That means the key an agent uses for webhook management is not the key it should use for anything else — generate a separate full-access key for that one administrative task, and keep the agent's working key scoped.

Event Webhooks, and why your agent sees stale stats

SendGrid's stats API is aggregated and lags. The /stats endpoint returns per-day buckets and the current day is incomplete for hours. If your agent answers "how did the campaign do?" from /stats at 9am, it is reading half a day of data and reporting it as fact.

The live signal lives in the Event Webhook, which POSTs an array of events (delivered, bounce, spamreport, unsubscribe, open, click) to a URL you control. Two things about it matter to an agent designer:

It batches. You receive an array of events per POST, with each event carrying email, timestamp, event, sg_event_id, sg_message_id, and category. An agent that assumes one event per request will miscount, and miscounted bounces are worse than no number.

Its signature is ECDSA over raw bytes. This is the failure mode that eats an afternoon:

SendGrid Event Webhook security documentation — the signed webhook key pair and verification steps

Twilio's signed Event Webhook guide. The warning about raw bytes is the whole trick.

The verification recipe from SendGrid's own docs:

  1. Read X-Twilio-Email-Event-Webhook-Signature and X-Twilio-Email-Event-Webhook-Timestamp.
  2. Base64-decode the signature, then ASN.1-unmarshal it into {r, s}.
  3. Hash the timestamp bytes concatenated with the raw payload bytes using SHA-256.
  4. Verify with ecdsa.Verify(publicKey, hashedPayload, r, s).

Step 3 is where implementations break. SendGrid warns that "we deliver a payload that must be used in its raw bytes form. Transformations from raw bytes to a JSON string may remove characters that were used as part of the generated signature." In practice that means: read the body as a Buffer, hash the Buffer. If you parse the JSON and re-serialise it before hashing, verification fails on roughly everything and looks like a key problem.

Two more from the same page worth knowing:

  • The key pair is only generated on Save. Clicking Test Integration before saving tests nothing, because there is no key yet. The integration will look broken and the config will be fine.
  • Turning signature verification off deletes the key pair on save. Re-enabling mints a new one. Any verifier pinned to the old public key stops working with no error other than a failed signature.

Building the read path: the deliverability agent

If the goal is monitoring rather than sending, the MCP server is the wrong layer. Build the proxy around the endpoints you actually need and expose three tools:

Tool Underlying endpoints Why
send_health /stats?start_date=&end_date= and /categories/stats Daily volume, bounces, spam reports, by category tag
suppressions /suppression/bounces, /suppression/spam_reports, /suppression/unsubscribes The list hygiene answers
activity /email_activity Per-recipient events — requires the Email Activity add-on

That last row is the commercial fact most guides bury. /email_activity is a paid add-on, priced separately. Without it you get aggregates and no per-recipient trail, so "why didn't jane@ get the invoice email?" is unanswerable regardless of how good your MCP server is.

A working OpenClaw config for a read-only deliverability agent:

{
  mcpServers: {
    "sendgrid-health": {
      command: "node",
      args: ["/opt/openclaw/sendgrid-proxy/build/index.js"],
      env: { SENDGRID_API_KEY: "$SENDGRID_READ_KEY" }   // Stats: Read + Suppressions: Read only
    },
    "twilio-docs": {
      url: "https://mcp.twilio.com/docs"                 // schema lookup, no credentials
    }
  }
}

The two servers are complementary in a way worth naming: sendgrid-health answers what happened, twilio-docs answers what is this field called and which endpoint returns it. An agent with both stops inventing endpoint names, which is the single most common failure in email-agent debugging.

Five workflows that work with these tools

1. Morning deliverability standup.

"Pull SendGrid stats for the last 7 days grouped by day. For each day report delivered, bounce, and spam report counts, and the bounce rate as a percentage. Flag any day more than 2 percentage points above the 7-day average. Then list the 20 most recent bounce events with their reasons."

Bounce reasons come from the webhook or /email_activity, not from /stats — if the agent cannot retrieve them, it should say so rather than returning an empty list as "no bounces".

2. Suppression hygiene before a campaign.

"List all bounced addresses from the suppression list, and cross-check the next planned single-send list against it. Report any address that is on the send list but suppressed, and do not send anything until I approve."

Read-only by construction. The approval clause matters because a well-meaning agent will otherwise try to "fix" the list.

3. Category-level performance review.

"Using category stats for the previous 30 days, compare open and click rates across our category tags. Show a table sorted by delivered volume, and tell me which categories have under 500 delivered — treat those as too small to interpret."

Category tags are a sending-time property (categories in the Mail Send payload), so they only help if the team tags consistently. If results cluster into one bucket, the tags are missing from sends, not the query.

4. Draft-and-approve send.

"Draft a plain-text re-engagement email for contacts on list X who have not opened in 90 days. Show me the full body and the recipient count. Do not send."

Draft first, human sends. This is the boundary that makes an agent with Mail Send permission survivable.

5. Schema lookup instead of guesswork.

"Use the Twilio docs server: what are the required parameters for the SendGrid Send a Single Email to a Single Recipient endpoint in API v3, and what does the 400 error body look like?"

twilio__search then twilio__retrieve. This is the highest-value use of the official server and the reason to register it even in a build-your-own setup.

SendGrid-specific pitfalls

  1. "SendGrid MCP server" is ambiguous by default. Four different artifacts answer to that name; an agent handed the wrong one looks configured and does nothing.
  2. The official Twilio server cannot call an API. Read-only, docs only. Planning a send through it is a dead end.
  3. Community servers default you to a full-access key. Scope it down before the first run.
  4. Event Webhook signature verification needs raw bytes. Hash the timestamp plus the un-parsed body.
  5. Signature setup only generates a key on Save. Test Integration before Save tests nothing.
  6. Disabling signature verification destroys the key pair on save, silently breaking verifiers pinned to the old key.
  7. The webhook POST body is an array. One event per request is a wrong assumption that produces wrong counts.
  8. /stats lags the current day. Morning answers about today are partial by construction.
  9. /email_activity is a paid add-on. Per-recipient questions are unanswerable without it, no matter what MCP server you use.
  10. Suppression endpoints are absent from the popular community server. Diagnostics live outside the mainstream tool set.
  11. Subuser scoping is easy to get wrong. A parent-account key reports parent totals; per-subuser stats need the subuser context.
  12. Unsubscribe vs suppression group are different mechanisms and both suppress. Count them together when predicting delivered volume, or your forecast will be high.
  13. Legacy templates are unsupported in the widely-copied server. If your account still uses them, the template tools will not see them and will not error.

When not to build this

If you want your team to ask "why did bounce rate double yesterday" in Slack, you do not need an MCP server, a proxy, and a skill file. You need a SendGrid connection that already exists, with the scoping, the webhook ingestion, and the approval boundary handled. That is what Cody's SendGrid assistant is, and if you are comparing agent hosts rather than servers, SendGrid with ChatGPT covers the connector path.

Build the server yourself when you need something specific — a private suppression workflow, your own category taxonomy, a webhook handler that writes into your warehouse. Do not build it to re-answer questions the API already answers in one call.

Start read-only. Add Mail Send behind an approval. Keep the docs server registered so the agent stops guessing endpoint names. That ordering turns an email agent from a novelty into something you leave running.

How to Connect SendGrid via MCP

There are two main paths:

Option A: Use a community MCP server for SendGrid

No company-maintained MCP server currently exists for SendGrid. Community-built servers are available — search the MCP Registry or GitHub for "SendGrid MCP server".

What you'll need:

  • An MCP-compatible client (Claude Desktop, OpenClaw, or another host)
  • A running MCP server process with SendGrid credentials configured
  • Basic familiarity with running a local service or Docker container

Community servers vary in completeness and maintenance quality — review the repo before committing to one.

Option B: Use Cody (OpenClaw-based, managed)

Cody is built on OpenClaw and supports MCP-compatible integrations out of the box. You connect SendGrid once from the Cody dashboard — no server to run, no code to write — and Cody handles authentication, context passing, and write-back actions with appropriate guardrails.

Cody works where your team already operates: Slack, Telegram, or the web chat. The SendGrid connection is available to your entire team without each person setting up their own MCP client.

Want SendGrid Connected to AI Without Running Your Own MCP Server?

Cody gives your team a SendGrid AI assistant in Slack, so people can review deliverability, bounce and spam-report trends, suppression-list issues, and category-level email performance without wiring API keys or building deliverability reporting glue.

Get started with Cody →

MCP vs Other AI Integration Patterns

Approach What it is Tradeoff
MCP Standardised protocol for live tool access Requires an MCP server; most powerful when set up correctly
RAG (retrieval) Pre-index SendGrid content and retrieve it Good for static docs; not suitable for live/transactional data
Manual copy-paste Paste SendGrid output into ChatGPT/Claude Fast to start; breaks for anything recurring or at scale
Custom API wrappers Bespoke integration code per tool Full control; high maintenance overhead

MCP wins when you need live data from SendGrid and want to avoid rebuilding integrations as APIs change.

Common Mistakes

  • Using training data when live data is needed — if the AI doesn't have an MCP connection, it will answer from memory, which is often outdated or wrong for account-specific questions
  • No write-back guardrails — MCP can write to SendGrid, so it's worth adding an approval step for any action that modifies records
  • Too many tools exposed at once — give the AI access to the SendGrid actions it actually needs; a scoped connection is easier to reason about and audit
  • Skipping structured outputs — ask the AI to return structured JSON or clear fields when writing back to SendGrid; free-form output is harder to validate

Credentials, approvals, and the first hour

The first hour of a SendGrid MCP project is not about MCP at all. It is about deciding which key exists and what it may do.

Three keys, three jobs. A read key (Stats → Read, Suppressions → Read) for the monitoring agent. A send key (Mail Send) for the drafting agent, behind an approval. A full-access key used only to configure webhook signature verification, never bound to an agent. Twilio's own docs require full access for the signature setup, which is exactly why that key must not be the agent's working credential.

Check what the server does not expose before you promise it. Run tools/list against your server and read the names. If suppression search is absent — and it is absent from the most popular community server — then any deliverability question in your prompt set will fail, and the agent will fail by returning an empty list rather than an error. Test the failure case before you test the happy path.

Time-box the stats. Every /stats answer should carry its own date range and its aggregation. An agent that says "bounces are up" without naming the window is not reporting, it is guessing with a table around it.

Probe the webhook before trusting it. Send one real event, verify the signature path end to end with raw bytes, then disable and re-enable signing once to confirm your verifier survives a key rotation. That five-minute test prevents the failure where every event silently fails verification in production and the only symptom is a metrics dashboard that quietly stops moving.


Related MCP Guides


Want the full workflow picture? See: SendGrid AI Automation and How to Connect SendGrid to OpenClaw.