mcp-smtp mcp

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

Sends an email via SMTP. REQUIRED params: host, username, password, from, recipients, subject, body. Always use port=587 and ssl=starttls. Example: {host:'smtp.zoho.com',port:587,ssl:'starttls',username:'user@zoho.com',password:'pass',from:'user@zoho.com',recipients:'dest@example.com',subject:'Hello',body:'Hi there'}. Returns {ok:true,from,recipients,subject}.

smtpemailsendmailtls

Input Parameters

ParameterTypeDescription
hostrequired string SMTP server hostname (e.g. smtp.gmail.com, smtp.office365.com)
portoptional integer SMTP port (default: 587) Default: 587.
ssloptional string SSL mode: starttls (default, port 587), ssl (port 465), none One of: starttls, ssl, none. Default: starttls.
usernamerequired string SMTP username (usually the email address)
passwordrequired string SMTP password or app password
fromrequired string Sender email address
from_nameoptional string Sender display name (optional)
recipientsrequired string Recipient email address(es), comma-separated (e.g. a@x.com,b@x.com)
ccoptional string CC address(es), comma-separated
bccoptional string BCC address(es), comma-separated
subjectrequired string Email subject line
bodyoptional string Plain text body
html_bodyoptional string HTML body. Send both body and html_body for best compatibility.
attachmentsoptional string File paths to attach, comma-separated (e.g. /tmp/file1.pdf,/tmp/file2.png)

Output Fields

FieldTypeDescription
ok boolean
from string
recipients string
subject string

Examples

Send HTML email via Gmail

// Input
{
  "host": "smtp.gmail.com",
  "port": 587,
  "ssl": "starttls",
  "username": "user@gmail.com",
  "password": "apppassword",
  "from": "user@gmail.com",
  "recipients": "client@example.com",
  "subject": "Invoice Ready",
  "body": "Your invoice is ready.",
  "html_body": "<h1>Your invoice is ready</h1>"
}

// Output
{
  "ok": true,
  "from": "user@gmail.com",
  "recipients": "client@example.com",
  "subject": "Invoice Ready"
}

Install & Discovery

Install

ppm install mcp-smtp

Get JSON Schema

GET /v1/packages/mcp-smtp/1.2.2/schema

Discover by keyword

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

PascalAI Usage

uses toolslib;
var Tool := LoadTool('mcp-smtp');
var R := Tool.Call(JsonObj(['host','smtp.gmail.com','port',587,'ssl','starttls','username','user@gmail.com','password','apppass','from','user@gmail.com','recipients','dest@example.com','subject','Hello','body','Hi there']));
Writeln(R.ToJSON);