MCP server from hdygxsj/email-mcp-server
Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio hdygxsj-email-mcp-server node server.js \ --env SMTP_HOST="SMTP hostname (e.g., smtp.example.com)" \ --env SMTP_PASS="SMTP password or app password" \ --env SMTP_PORT="SMTP port (e.g., 587)" \ --env SMTP_USER="SMTP username/email for authentication" \ --env FROM_ADDRESS="Default from email address (e.g., no-reply@example.com)"
How to use
This MCP server focuses on email-related operations. It exposes endpoints and tooling to manage email sending, templating, and basic email queueing within the MCP ecosystem. After starting the server, configure SMTP credentials via environment variables to enable outbound email delivery. Use the provided MCP commands to create, preview, and send emails, as well as manage templates and delivery status. The server is designed to be integrated with other MCP components, allowing you to trigger email actions from MCP workflows and respond to delivery events or bounces as needed.
How to install
Prerequisites:
- Node.js (12.x or newer) installed on your machine.
- Git to clone the repository (optional if you download a release).
Installation steps:
- Clone the repository or download the release package.
- Navigate to the project directory.
- Install dependencies: npm install
- Create and configure a .env or export required environment variables (SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_PASS, FROM_ADDRESS).
- Start the server: node server.js
Example commands:
- npm install
- export SMTP_HOST=smtp.example.com
- export SMTP_PORT=587
- export SMTP_USER=user@example.com
- export SMTP_PASS=yourpassword
- export FROM_ADDRESS=no-reply@example.com
- node server.js
Additional notes
Tips and common issues:
- Ensure SMTP credentials are correct; incorrect credentials will fail outbound emails.
- If using two-factor authentication, generate an app-specific password and use that for SMTP_PASS.
- Check firewall or hosting provider restrictions if outbound SMTP is blocked.
- Validate any email templates for placeholders before sending.
- Monitor logs for delivery status, bounces, or retries and adjust queue settings if necessary.