SendGrid Secure
v0.1.0Security-first SendGrid MCP server: dry-run default, recipient allowlists, rate caps, audit log.
Values you need
| Variable | What it is | |
|---|---|---|
SENDGRID_API_KEY | required secret | SendGrid API key (use a restricted key with Mail Send scope only) |
SENDGRID_MCP_MODE | optional | dry-run (default) or live |
SENDGRID_MCP_RECIPIENT_ALLOWLIST | optional | Comma-separated recipient addresses/domains allowed to receive mail |
SENDGRID_MCP_WRITES_PER_HOUR | optional | Hourly cap on write operations (sends) |
SENDGRID_MCP_MAX_RECIPIENTS | optional | Max recipients per send |
SENDGRID_MCP_AUDIT_LOG | optional | Path to the append-only audit log |
SENDGRID_MCP_ALLOW_BCC | optional | 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.0Add 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
- Ask the user for: SENDGRID_API_KEY. Never invent or guess these values; secrets go into the client config, not into chat logs.
- 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).
- Restart or reload the client so it starts the server.
- Verify: the server should expose these tools: preview_email, send_email, add_suppression, remove_suppression, list_templates, get_template, get_email_stats, list_suppressions, ….
- 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