Lightweight MCP server to send emails to multiple recipients with optional CC and attachments.
claude mcp add --transport stdio spongycode-email-mcp-server node index.js --verbose \ --env GMAIL_PASS="yourpasscode" \ --env GMAIL_USER="yourmail@gmail.com"
How to use
This MCP server is a lightweight multi-recipient email sender built to work with a Gmail-based SMTP flow. It uses a Node.js server entry point (index.js) and can be run with verbose logging for debugging. Configure your Gmail credentials in the environment to authenticate with Google's SMTP service, and then invoke the server to send emails to multiple recipients as configured in your client (e.g., via the Gemini CLI integration). When running with the Gemini CLI, you provide a path to the server and enable verbose output to diagnose issues during message composition and delivery.
To use the server with the Gemini CLI, ensure your .gemini/settings.json includes an entry under mcpServers that points to this Node.js server (as shown in the README). Provide your Gmail username and password in environment variables (GMAIL_USER and GMAIL_PASS) so the server can authenticate with Gmail's SMTP service. With the verbose flag enabled, you will receive detailed logs about SMTP handshakes, recipient handling, and per-message status, which helps in troubleshooting deliverability problems or misconfigurations in your message payload.
How to install
Prerequisites:
- Node.js installed (LTS recommended)
- Access to a Gmail account and credentials for SMTP authentication (see notes about app passwords below)
- The MCP repository cloned to your local machine or a server with Node.js installed
Steps:
-
Install Node.js if not already installed. Visit https://nodejs.org/ and follow the installation instructions for your platform.
-
Clone the MCP server repository and navigate into the project directory:
git clone <repository-url>
cd email-mcp-server
- Install dependencies:
npm install
- Create an environment file or export variables for Gmail credentials when starting the server. A simple .env example:
GMAIL_USER=yourmail@gmail.com
GMAIL_PASS=yourpasscode
Alternatively, you can export them in your shell:
export GMAIL_USER=yourmail@gmail.com
export GMAIL_PASS=yourpasscode
- Run the server with verbose logging (as recommended for initial setup):
node index.js --verbose
- If you are integrating with the Google Gemini CLI or another client, ensure the client is configured to connect to this MCP server (as shown in the README example). The server will listen for requests and send emails via Gmail SMTP.
Notes:
- Gmail may require an App Password if 2FA is enabled. Use an App Password instead of your primary Gmail password.
- Some organizations block less secure apps; ensure your Gmail account is allowed to be used by SMTP clients.
- In production, consider rotating credentials and securing them with a secret manager.
Additional notes
Environment tips and common issues:
- GMAIL_USER and GMAIL_PASS must be kept secret. Do not commit them to version control; use a secret manager or a protected .env file.
- If you encounter authentication errors, verify that your Gmail account allows SMTP access and that you are using an App Password if 2FA is enabled.
- Ensure network egress to smtp.gmail.com is allowed by your firewall.
- Logs produced with --verbose will help diagnose issues with recipient resolution, delivery status, and potential SMTP rejections.
- If you plan to send to many recipients, consider batching messages to respect Gmail sending limits and avoid being rate-limited.
- The server name in the MCP config (email-node-server) should reflect your deployment name for clarity in a multi-server setup.
Related MCP Servers
MiniMax -JS
Official MiniMax Model Context Protocol (MCP) JavaScript implementation that provides seamless integration with MiniMax's powerful AI capabilities including image generation, video generation, text-to-speech, and voice cloning APIs.
furi
CLI & API for MCP management
rod
Model Context Protocol Server of Rod
unity-editor
An MCP server and client for LLMs to interact with Unity Projects
website-publisher
AI Website builder and publisher MCP. Quickly publish and deploy your AI generated code as real website URL. Support html, css, js, python etc.
xgmem
Global Memory MCP server, that manage all projects data.