SendGrid Secure

v0.1.0
io.github.Choppaaahh/sendgrid-mcp-secure Checked 13 hours ago Published 3 months ago

Security-first SendGrid MCP server: dry-run default, recipient allowlists, rate caps, audit log.

Values you need

VariableWhat it is
SENDGRID_API_KEYrequired secret SendGrid API key (use a restricted key with Mail Send scope only)
SENDGRID_MCP_MODEoptional dry-run (default) or live
SENDGRID_MCP_RECIPIENT_ALLOWLISToptional Comma-separated recipient addresses/domains allowed to receive mail
SENDGRID_MCP_WRITES_PER_HOURoptional Hourly cap on write operations (sends)
SENDGRID_MCP_MAX_RECIPIENTSoptional Max recipients per send
SENDGRID_MCP_AUDIT_LOGoptional Path to the append-only audit log
SENDGRID_MCP_ALLOW_BCCoptional BCC stays disabled unless explicitly enabled

PyPI (uvx) discovery passed

Requires uv (https://docs.astral.sh/uv/)

Run in a terminal
claude mcp add sendgrid-mcp-secure -e 'SENDGRID_API_KEY=<SENDGRID_API_KEY>' -- uvx sendgrid-mcp-secure==0.1.0
Add to claude_desktop_config.json
{
  "mcpServers": {
    "sendgrid-mcp-secure": {
      "args": [
        "sendgrid-mcp-secure==0.1.0"
      ],
      "command": "uvx",
      "env": {
        "SENDGRID_API_KEY": "<SENDGRID_API_KEY>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "sendgrid-mcp-secure": {
      "args": [
        "sendgrid-mcp-secure==0.1.0"
      ],
      "command": "uvx",
      "env": {
        "SENDGRID_API_KEY": "<SENDGRID_API_KEY>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "SENDGRID_API_KEY",
      "id": "sendgrid-api-key",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "sendgrid-mcp-secure": {
      "args": [
        "sendgrid-mcp-secure==0.1.0"
      ],
      "command": "uvx",
      "env": {
        "SENDGRID_API_KEY": "${input:sendgrid-api-key}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.sendgrid-mcp-secure]
command = "uvx"
args = ["sendgrid-mcp-secure==0.1.0"]
env = { "SENDGRID_API_KEY" = "<SENDGRID_API_KEY>" }

For AI agents

  1. Ask the user for: SENDGRID_API_KEY. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: preview_email, send_email, add_suppression, remove_suppression, list_templates, get_template, get_email_stats, list_suppressions, ….
  5. If it fails, check that the required runtime is installed (uv (https://docs.astral.sh/uv/)) and that the values above are set.

Machine-readable: install.md · manifest.json