# mcp-sendgrid

Connects SendGrid to an AI agent for transactional and marketing email, templates, contacts, suppression data, and delivery stats.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 274
- Author: codespar
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/codespar/mcp-dev-latam/tree/HEAD/packages/communication/sendgrid
- Updated: 2026-09-27
- HTML: https://affpapa.org/en/nevibecode/mcp/mcp-sendgrid

## What it does

mcp-sendgrid exposes 20 SendGrid tools to an agent. It can send direct messages or use dynamic templates, maintain Marketing Campaigns contacts and lists, manage transactional templates, and inspect unsubscribe groups and suppression records. The server also provides bounce data, account email stats, scheduled-send controls, and Event Webhook settings.

Set `SENDGRID_API_KEY` before starting it. `SENDGRID_FROM_EMAIL` is optional, but that address must be a Verified Sender or belong to an authenticated domain. The package runs through `npx` over stdio, with an HTTP mode available for server-to-server testing. The server cannot connect without `SENDGRID_API_KEY`.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `SENDGRID_API_KEY`, `SENDGRID_FROM_EMAIL` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env SENDGRID_API_KEY=<SENDGRID_API_KEY> --env SENDGRID_FROM_EMAIL=<SENDGRID_FROM_EMAIL> --transport stdio sendgrid -- npx -y @codespar/mcp-sendgrid
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add sendgrid --env SENDGRID_API_KEY=<SENDGRID_API_KEY> --env SENDGRID_FROM_EMAIL=<SENDGRID_FROM_EMAIL> -- npx -y @codespar/mcp-sendgrid
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "sendgrid": {
            "command": "npx",
            "args": [
                "-y",
                "@codespar/mcp-sendgrid"
            ],
            "env": {
                "SENDGRID_API_KEY": "<SENDGRID_API_KEY>",
                "SENDGRID_FROM_EMAIL": "<SENDGRID_FROM_EMAIL>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "sendgrid": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@codespar/mcp-sendgrid"
            ],
            "env": {
                "SENDGRID_API_KEY": "<SENDGRID_API_KEY>",
                "SENDGRID_FROM_EMAIL": "<SENDGRID_FROM_EMAIL>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e SENDGRID_API_KEY=<SENDGRID_API_KEY> -e SENDGRID_FROM_EMAIL=<SENDGRID_FROM_EMAIL> sendgrid npx -y @codespar/mcp-sendgrid
```
Replace <…> with your own values

## When to use it
- send a transactional email through SendGrid
- fill a message with a dynamic template
- upsert or search a marketing contact
- inspect bounced recipients
- read account-wide email statistics

## Example prompts
- Send a SendGrid email to the buyer confirming the order.
- Use template `d-abc123...` and fill it with the order details.
- Search Marketing Campaigns contacts with an SGQL query.

## Similar
- [MCP Toolbox for Databases](https://affpapa.org/en/nevibecode/mcp/googleapis-mcp-toolbox-for-databases.md) — MCP server · ★ 16717
- [PostHog MCP Server](https://affpapa.org/en/nevibecode/mcp/posthog-mcp-server.md) — MCP server · ★ 40409
- [OpenWork MCP Gateway](https://affpapa.org/en/nevibecode/mcp/openwork-mcp-gateway.md) — MCP server · ★ 24242
- [Keploy](https://affpapa.org/en/nevibecode/mcp/keploy.md) — MCP server · ★ 18727
- [Nhost](https://affpapa.org/en/nevibecode/mcp/nhost.md) — MCP server · ★ 9366
- [basebalance.cloud — x402 RPC & MCP gateway](https://affpapa.org/en/nevibecode/mcp/basebalancecloud-x402-rpc-mcp-gateway.md) — MCP server · ★ 7506

From the same set: [codespar/mcp-dev-latam](https://affpapa.org/en/nevibecode/by/codespar/mcp-dev-latam.md) — 124 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
