mcp-sendgrid mcp

v1.0.0 · MCP Tool · communication · registry.pascalai.org

Email delivery via SendGrid API v3. Operations: send (plain text or HTML email), send_template (template-based email), list_contacts, add_contact, remove_contact, get_stats (email stats by date). Requires SendGrid API key.

sendgridemailtransactionalsmtpnotifications

Input Parameters

ParameterTypeDescription
operationrequired string send: send plain/HTML email; send_template: send using a template; list_contacts: list contact lists; add_contact: add to contact list; remove_contact: remove from list; get_stats: delivery statistics. One of: send, send_template, list_contacts, add_contact, remove_contact, get_stats.
apiKeyoptional string SendGrid API key.
tooptional string Recipient email address.
fromoptional string Sender email address (must be verified in SendGrid).
fromNameoptional string Sender display name.
subjectoptional string Email subject line.
bodyoptional string Plain text email body.
htmlBodyoptional string HTML email body (overrides plain text for HTML-capable clients).
templateIdoptional string Dynamic template ID for send_template (format: d-xxxxxxxx...).
templateDataoptional string JSON object with template data variables.
daysoptional integer Number of days of stats to retrieve for get_stats (default: 7). Default: 7.
emailoptional string Contact email for add_contact/remove_contact.

Output Fields

FieldTypeDescription
messageId string
contacts array[object]
stats array[object]
ok boolean
error string

Examples

Send an email

// Input
{
  "operation": "send",
  "apiKey": "SG.xxx",
  "to": "user@example.com",
  "from": "noreply@myapp.com",
  "subject": "Welcome!",
  "body": "Thanks for signing up."
}

// Output
{
  "ok": true,
  "messageId": "sendgrid-msg-id"
}

Install & Discovery

Install

ppm install mcp-sendgrid

Get JSON Schema

GET /v1/packages/mcp-sendgrid/1.0.0/schema

Discover by keyword

GET /v1/mcp/discover?q=sendgrid
Discovery hint: Install with ppm install mcp-sendgrid or invoke remotely via POST /v1/invoke/mcp-sendgrid on the MCP Service.

PascalAI Usage

uses toolslib;
var Tool := LoadTool('mcp-sendgrid');
var R := Tool.Call(JsonObj(['operation','send','apiKey','SG.xxx','to','u@ex.com','from','no@app.com','subject','Hi','body','Hello!']));
Writeln(R.ToJSON);