Email Server

by yahyamohmuedpro99

1 stars
291 downloads
Not rated
GitHub

Description

# Mailer MCP A Model Context Protocol (MCP) server for sending emails. This server is designed to be completely SMTP provider agnostic, allowing you to use any SMTP relay service of your choice (Gmail, SendGrid, Mailgun, SMTP2Go, etc.) by simply configuring the appropriate…

About

# Mailer MCP A Model Context Protocol (MCP) server for sending emails. This server is designed to be completely SMTP provider agnostic, allowing you to use any SMTP relay service of your choice (Gmail, SendGrid, Mailgun, SMTP2Go, etc.) by simply configuring the appropriate environment variables. The server provides…

Details

Author
yahyamohmuedpro99
GitHub stars
1
Downloads
291
Categories
Communication

- Send emails to specified recipients via SMTP.
- Test email functionality for configuration verification.
- Environment variable configuration for SMTP credentials.
- Proper error handling and logging.
- TypeScript implementation for type safety.

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Email Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Clone the repository, install dependencies with npm install, and build with npm run build. Configure the required environment variables (SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_PASSWORD, EMAIL_FROM) in the MCP client settings. The server exposes two tools: send_email (to send an email to a specified recipient) and test_email (to verify the configuration).

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "email server": {
            "email-server": {
                "autoApprove": [],
                "disabled": false,
                "timeout": 60,
                "command": "node",
                "args": [
                    "pathToTheBuild/dist/index.js"
                ],
                "env": {
                    "SMTP_HOST": "smtp.smtp2go.com",
                    "SMTP_PORT": "2525",
                    "SMTP_USER": "your-email@example.com",
                    "SMTP_PASSWORD": "your-password",
                    "EMAIL_FROM": "your-email@example.com",
                    "SMTP_TIMEOUT": "30000"
                },
                "transportType": "stdio"
            }
        }
    }
}

McpServers

{
    "email-server": {
        "autoApprove": [],
        "disabled": false,
        "timeout": 60,
        "command": "node",
        "args": [
            "pathToTheBuild/dist/index.js"
        ],
        "env": {
            "SMTP_HOST": "smtp.smtp2go.com",
            "SMTP_PORT": "2525",
            "SMTP_USER": "your-email@example.com",
            "SMTP_PASSWORD": "your-password",
            "EMAIL_FROM": "your-email@example.com",
            "SMTP_TIMEOUT": "30000"
        },
        "transportType": "stdio"
    }
}

Mailer MCP

A Model Context Protocol (MCP) server for sending emails. This server is designed to be completely SMTP provider agnostic, allowing you to use any SMTP relay service of your choice (Gmail, SendGrid, Mailgun, SMTP2Go, etc.) by simply configuring the appropriate environment variables. The server provides tools for sending emails through SMTP using environment variables for configuration.

Features

- Send emails to specified recipients
- Test email functionality
- Environment variable configuration
- Proper error handling and logging
- TypeScript implementation for type safety

Installation

1. Clone the repository:

git clone https://github.com/yourusername/mailer-mcp.git
cd mailer-mcp

2. Install dependencies:

npm install

3. Build the project:

npm run build

Configuration

The server requires the following environment variables to be set in the MCP configuration:

| Variable | Description | Example |
|----------|-------------|---------|
| SMTP_HOST | SMTP server hostname | smtp.example.com |
| SMTP_PORT | SMTP server port | 587 |
| SMTP_USER | SMTP username | user@example.com |
| SMTP_PASSWORD | SMTP password | password123 |
| EMAIL_FROM | Sender email address | sender@example.com |

Optional environment variables:

| Variable | Description | Default |
|----------|-------------|---------|
| SMTP_SECURE | Use secure connection (TLS) | false |
| SMTP_REJECT_UNAUTHORIZED | Reject unauthorized TLS certificates | true |
| SMTP_TIMEOUT | Connection timeout in milliseconds | 10000 |

MCP Configuration

Add the following to your Cline MCP settings configuration file:

"email-server": {
  "autoApprove": [],
  "disabled": false,
  "timeout": 60,
  "command": "node",
  "args": [
    "path/to/mailer-mcp/dist/index.js"
  ],
  "env": {
    "SMTP_HOST": "smtp.example.com",
    "SMTP_PORT": "587",
    "SMTP_USER": "user@example.com",
    "SMTP_PASSWORD": "password123",
    "EMAIL_FROM": "sender@example.com"
  },
  "transportType": "stdio"
}

Available Tools

send_email

Sends an email to a specified recipient.

Parameters:
- recipient (string, required): Email address of the recipient
- body (string, required): Email body content

Example:

{
"recipient": "recipient@example.com",
"body": "Hello, this is a test email from the MCP server."
}

test_email

Sends a test email to verify the configuration.

Parameters: None

Development

1. Start the TypeScript compiler in watch mode:

npm run dev

2. Make your changes to the source files in the src directory.

3. The TypeScript compiler will automatically recompile the files when changes are detected.

License

MIT

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.