- Home
- MCP servers
- javascript
0
GitHub Stars
javascript
Language
6 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"u1pns-sendmail-mcp": {
"command": "node",
"args": [
"/absolute/path/to/sendmail-mcp/index.js"
],
"env": {
"MAIL_FROM": "sender@example.com",
"SMTP_HOST": "smtp.example.com",
"SMTP_PASS": "your_password",
"SMTP_PORT": "465",
"SMTP_USER": "your_email@example.com",
"SMTP_SECURE": "true"
}
}
}
}You can send emails through a dedicated MCP server that uses your SMTP credentials. This setup lets AI agents act on your behalf to dispatch plain text or HTML emails while keeping your own email provider credentials secure and logged for auditing.
How to use
To send emails, configure your MCP client to run the mail MCP server as a local (stdio) process or via npm/npx. You’ll provide SMTP credentials and a sender address. The server exposes a single tool named send_email that takes the recipient, subject, and body (text and optional HTML). After setup, you can ask your AI agent to compose and send emails by specifying the recipient, subject, and content.
How to install
Prerequisites: Node.js v14 or higher. You also need SMTP credentials from your email provider (host, port, user, and password). Follow these steps to get started locally and then connect with your MCP client.
# Step 1: Clone and install
git clone https://github.com/u1pns/sendmail-mcp.git
cd sendmail-mcp
npm install
# Step 2: Run with local script (example path; adjust to your environment)
node /absolute/path/to/sendmail-mcp/index.js
Configuration and usage notes
You configure your MCP client to run the server with the SMTP credentials you supply. The following options are shown for local development and for using npx to run the package.
{
"mcpServers": {
"sendmail-mcp": {
"command": "node",
"args": ["/absolute/path/to/sendmail-mcp/index.js"],
"env": {
"SMTP_HOST": "smtp.example.com",
"SMTP_PORT": "465",
"SMTP_SECURE": "true",
"SMTP_USER": "your_email@example.com",
"SMTP_PASS": "your_password",
"MAIL_FROM": "sender@example.com"
}
}
}
}
Security and logging
The server uses your SMTP credentials directly for sending messages. It logs email activities to daily files under the log/ directory to help with auditing and debugging.
Additional usage notes
If you prefer using the package via npx, you can run the server with a minimal setup and session-based credentials.
{
"mcpServers": {
"sendmail-mcp": {
"command": "npx",
"args": ["sendmail-mcp@latest"],
"env": {
"SMTP_HOST": "smtp.example.com",
"SMTP_PORT": "465",
"SMTP_SECURE": "true",
"SMTP_USER": "your_email@example.com",
"SMTP_PASS": "your_password",
"MAIL_FROM": "sender@example.com"
}
}
}
}
Troubleshooting and notes
Common issues include authentication failures when using Gmail. Use an App Password if 2FA is enabled. If you see a connection error, verify that the SMTP port and host are correct and that your firewall allows outgoing SMTP traffic. Logs are found in the log/ directory and rotate daily.
Development
If you’re contributing, you can test locally by creating a .env file with your credentials and running the server as part of your MCP client workflow. The server will load credentials from the environment when started by the client.
Available tools
send_email
Sends an email using the configured SMTP server. Requires to, subject, text and optional html content.