SMTP Email Manager MCP server

Provides SMTP email functionality with tools for sending individual and bulk emails, managing configurations, and creating customizable templates with variable substitution for automated, personalized email campaigns.
Back to servers
Provider
/servers/samihalawa-smtp-email-manager
Release date
Feb 28, 2025
Language
TypeScript
Stats
3 stars

The SMTP Email MCP Server provides email sending capabilities for Claude and other MCP-compatible AI assistants. It offers multiple SMTP configurations, email templates, bulk sending, and HTML support through a standard Model Context Protocol interface.

Installation

To install the SMTP Email MCP Server:

# 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

Server Configuration

Starting the Server

npm start

Adding to MCP Configuration

Add the server to your MCP configuration file:

{
  "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

Email Sending

send-email

Send an email to one or more recipients.

send-email(
  to: [{ email: "[email protected]", name: "John Doe" }],
  subject: "Hello!",
  body: "<p>This is a test email.</p>",
  from: { email: "[email protected]", name: "Sender Name" },
  cc: [{ email: "[email protected]" }],
  bcc: [{ email: "[email protected]" }],
  templateId: "welcome-email",
  templateData: { name: "John", company: "ACME Corp" },
  smtpConfigId: "gmail-config"
)

send-bulk-emails

Send emails to multiple recipients in batches.

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>",
  from: { email: "[email protected]", name: "Sender Name" },
  cc: [{ email: "[email protected]" }],
  bcc: [{ email: "[email protected]" }],
  templateId: "announcement-template",
  templateData: { announcement: "New feature launch" },
  batchSize: 10,
  delayBetweenBatches: 1000,
  smtpConfigId: "gmail-config"
)

SMTP Configuration Management

get-smtp-configs

Get all configured SMTP servers.

get-smtp-configs()

add-smtp-config

Add a new SMTP server configuration.

add-smtp-config(
  name: "Gmail",
  host: "smtp.gmail.com",
  port: 587,
  secure: false,
  auth: {
    user: "[email protected]",
    pass: "your-app-password"
  },
  isDefault: true
)

update-smtp-config

Update an existing SMTP server configuration.

update-smtp-config(
  id: "smtp-config-id",
  name: "Updated Gmail",
  host: "smtp.gmail.com",
  port: 587,
  secure: false,
  auth: {
    user: "[email protected]",
    pass: "your-new-app-password"
  },
  isDefault: true
)

delete-smtp-config

Delete an SMTP server configuration.

delete-smtp-config(
  id: "smtp-config-id"
)

Email Template Management

get-email-templates

Get all email templates.

get-email-templates()

add-email-template

Add a new email template.

add-email-template(
  name: "Welcome Email",
  subject: "Welcome to {{company}}!",
  body: "<h1>Hello {{name}},</h1><p>Welcome to {{company}}!</p>",
  isDefault: false
)

update-email-template

Update an existing email template.

update-email-template(
  id: "template-id",
  name: "Updated Welcome Email",
  subject: "Welcome to {{company}}!",
  body: "<h1>Hello {{name}},</h1><p>Welcome to {{company}}!</p>",
  isDefault: true
)

delete-email-template

Delete an email template.

delete-email-template(
  id: "template-id"
)

get-email-logs

Get logs of sent emails.

get-email-logs()

Usage Examples

Complete Setup and Email Sending Workflow

  1. First, 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
    )
    
  2. Create an email template with variables:

    add-email-template(
      name: "Welcome Email",
      subject: "Welcome to {{company}}!",
      body: "<h1>Hello {{name}},</h1><p>Welcome to {{company}}!</p>",
      isDefault: false
    )
    
  3. Send an email using the template:

    send-email(
      to: [{ email: "[email protected]", name: "John Doe" }],
      templateId: "welcome-email",
      templateData: {
        name: "John",
        company: "ACME Corp"
      }
    )
    
  4. Or send a direct email without a template:

    send-email(
      to: [{ email: "[email protected]", name: "John Doe" }],
      subject: "Important Information",
      body: "<p>This is some important information.</p>"
    )
    
  5. For bulk emails to multiple recipients:

    send-bulk-emails(
      recipients: [
        { email: "[email protected]", name: "User 1" },
        { email: "[email protected]", name: "User 2" },
        { email: "[email protected]", name: "User 3" }
      ],
      subject: "Monthly Newsletter",
      body: "<p>Here's what's new this month...</p>",
      batchSize: 2,
      delayBetweenBatches: 1000
    )
    

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later