A Model Context Protocol server for SMTP email services
A Model Context Protocol (MCP) server that provides email sending capabilities for Claude and other MCP-compatible AI assistants.
## Clone the repository
git clone https://github.com/samihalawa/mcp-server-smtp.git
cd mcp-server-smtp
## Install dependencies
npm install
## Build the server
npm run build
npm start
Add the server to your MCP configuration:
{
"servers": {
"smtp-email-server": {
"command": "/path/to/node",
"args": ["/path/to/mcp-server-smtp/build/index.js"],
"enabled": true,
"port": 3007,
"environment": {
"NODE_PATH": "/path/to/node_modules",
"PATH": "/usr/local/bin:/usr/bin:/bin"
}
}
}
}
Send an email to one or more recipients.
Parameters:
to
: Array of recipients with email and optional namesubject
: Email subjectbody
: Email body (HTML supported)from
: (Optional) Sender email and namecc
: (Optional) CC recipientsbcc
: (Optional) BCC recipientstemplateId
: (Optional) ID of a template to usetemplateData
: (Optional) Data to populate template variablessmtpConfigId
: (Optional) ID of the SMTP configuration to useSend emails to multiple recipients in batches.
Parameters:
recipients
: Array of recipients with email and optional namesubject
: Email subjectbody
: Email body (HTML supported)from
: (Optional) Sender email and namecc
: (Optional) CC recipientsbcc
: (Optional) BCC recipientstemplateId
: (Optional) ID of a template to usetemplateData
: (Optional) Data to populate template variablesbatchSize
: (Optional) Number of emails to send in each batchdelayBetweenBatches
: (Optional) Delay in milliseconds between batchessmtpConfigId
: (Optional) ID of the SMTP configuration to useGet all configured SMTP servers.
Parameters: None
Add a new SMTP server configuration.
Parameters:
name
: Name for the configurationhost
: SMTP server hostnameport
: SMTP server portsecure
: Whether to use SSL/TLSauth
: Authentication credentials (user and pass)isDefault
: (Optional) Whether this is the default configurationUpdate an existing SMTP server configuration.
Parameters:
id
: ID of the configuration to updatename
: Name for the configurationhost
: SMTP server hostnameport
: SMTP server portsecure
: Whether to use SSL/TLSauth
: Authentication credentials (user and pass)isDefault
: (Optional) Whether this is the default configurationDelete an SMTP server configuration.
Parameters:
id
: ID of the configuration to deleteGet all email templates.
Parameters: None
Add a new email template.
Parameters:
name
: Template namesubject
: Email subject templatebody
: Email body template (HTML supported)isDefault
: (Optional) Whether this is the default templateUpdate an existing email template.
Parameters:
id
: ID of the template to updatename
: Template namesubject
: Email subject templatebody
: Email body template (HTML supported)isDefault
: (Optional) Whether this is the default templateDelete an email template.
Parameters:
id
: ID of the template to deleteGet logs of sent emails.
Parameters: None
Configure an SMTP server:
add-smtp-config(
name: "Gmail",
host: "smtp.gmail.com",
port: 587,
secure: false,
auth: {
user: "[email protected]",
pass: "your-app-password"
},
isDefault: true
)
Create an email template:
add-email-template(
name: "Welcome Email",
subject: "Welcome to {{company}}!",
body: "<h1>Hello {{name}},</h1><p>Welcome to {{company}}!</p>",
isDefault: false
)
Send an email using a template:
send-email(
to: [{ email: "[email protected]", name: "John Doe" }],
templateId: "welcome-email",
templateData: {
name: "John",
company: "ACME Corp"
}
)
Send bulk emails:
send-bulk-emails(
recipients: [
{ email: "[email protected]", name: "User 1" },
{ email: "[email protected]", name: "User 2" }
],
subject: "Important Announcement",
body: "<p>This is an important announcement.</p>",
batchSize: 10,
delayBetweenBatches: 1000
)
MIT
Audius Mcp Atris
Model Context Protocol server for Audius. Perform market research, purchase premium tracks, upload songs, and much more!
Hive Mcp Server
Perplexity Mcp Server
This Model Context Protocol (MCP) server enables LLMs like Claude to perform internet research using the Perplexity API. It provides real-time, up-to-date information with source citations.