SMTP MCP Server
Enables sending emails via SMTP with template management, supporting multiple SMTP configurations, template creation with variable substitution, and bulk email sending with rate limiting.
samihalawa
Tools
send-email
Send an email to one or more recipients
send-bulk-emails
Send emails in bulk to multiple recipients with rate limiting
get-smtp-configs
Get all SMTP configurations
add-smtp-config
Add a new SMTP configuration
update-smtp-config
Update an existing SMTP configuration
delete-smtp-config
Delete an SMTP configuration
get-email-templates
Get all email templates
add-email-template
Add a new email template
update-email-template
Update an existing email template
delete-email-template
Delete an email template
get-email-logs
Get logs of all email sending activity
README
SMTP Email MCP Server
A Model Context Protocol (MCP) server that provides email sending capabilities for Claude and other MCP-compatible AI assistants.
Features
- Multiple SMTP Configurations: Configure and manage multiple SMTP servers
- Email Templates: Create, update, and use reusable email templates
- Bulk Email Sending: Send emails to multiple recipients with batching and rate limiting
- HTML Support: Full HTML support for rich email content
- Logging: Comprehensive logging of all email activities
- Template Variables: Dynamic content using template variables
Installation
# 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
Usage
Starting the Server
npm start
Configuration
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"
}
}
}
}
Available Tools
send-email
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 use
send-bulk-emails
Send 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 use
get-smtp-configs
Get all configured SMTP servers.
Parameters: None
add-smtp-config
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 configuration
update-smtp-config
Update 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 configuration
delete-smtp-config
Delete an SMTP server configuration.
Parameters:
id
: ID of the configuration to delete
get-email-templates
Get all email templates.
Parameters: None
add-email-template
Add a new email template.
Parameters:
name
: Template namesubject
: Email subject templatebody
: Email body template (HTML supported)isDefault
: (Optional) Whether this is the default template
update-email-template
Update 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 template
delete-email-template
Delete an email template.
Parameters:
id
: ID of the template to delete
get-email-logs
Get logs of sent emails.
Parameters: None
Example Usage
-
Configure an SMTP server:
add-smtp-config( name: "Gmail", host: "smtp.gmail.com", port: 587, secure: false, auth: { user: "your-email@gmail.com", 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: "recipient@example.com", name: "John Doe" }], templateId: "welcome-email", templateData: { name: "John", company: "ACME Corp" } )
-
Send bulk emails:
send-bulk-emails( recipients: [ { email: "user1@example.com", name: "User 1" }, { email: "user2@example.com", name: "User 2" } ], subject: "Important Announcement", body: "<p>This is an important announcement.</p>", batchSize: 10, delayBetweenBatches: 1000 )
Requirements
- Node.js 14+
- Nodemailer for email sending
- Access to an SMTP server
License
MIT
Recommended Servers
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Excel MCP Server
A Model Context Protocol server that enables AI assistants to read from and write to Microsoft Excel files, supporting formats like xlsx, xlsm, xltx, and xltm.
Playwright MCP Server
Provides a server utilizing Model Context Protocol to enable human-like browser automation with Playwright, allowing control over browser actions such as navigation, element interaction, and scrolling.
Claude Code MCP
An implementation of Claude Code as a Model Context Protocol server that enables using Claude's software engineering capabilities (code generation, editing, reviewing, and file operations) through the standardized MCP interface.
Apple MCP Server
Enables interaction with Apple apps like Messages, Notes, and Contacts through the MCP protocol to send messages, search, and open app content using natural language.
contentful-mcp
Update, create, delete content, content-models and assets in your Contentful Space
serper-search-scrape-mcp-server
This Serper MCP Server supports search and webpage scraping, and all the most recent parameters introduced by the Serper API, like location.
The Verge News MCP Server
Provides tools to fetch and search news from The Verge's RSS feed, allowing users to get today's news, retrieve random articles from the past week, and search for specific keywords in recent Verge content.
@kazuph/mcp-gmail-gas
Model Context Protocol server for Gmail integration. This allows Claude Desktop (or any MCP client) to interact with your Gmail account through Google Apps Script.