@xiaoyu-mcp/mcp-mail-service3
v0.0.3
Published
A MCP server for sending emails
Downloads
48
Readme
Email Service via MCP Protocol
This project provides an MCP (Model Context Protocol) server that allows sending emails through a standardized interface. The server exposes a tool named send-email that can be called by MCP clients to send emails.
Features
- Exposes an MCP tool for sending emails
- Uses
nodemailerfor reliable email delivery - Supports Gmail and other SMTP services
- Easy integration with MCP clients
Installation
- Clone the repository or download the source code.
- Install dependencies:
npm installEnvironment Variables
Set the following environment variables before running the server:
| Variable | Description |
|-------------------|--------------------------------------------------|
| EMAIL_USER | Your email address (e.g., Gmail username) |
| EMAIL_PASSWORD | Your email password or app-specific password |
For Gmail, you may need to generate an app-specific password if 2FA is enabled.
Running the Server
Start the MCP server using Node.js:
npx @modelcontextprotocol/inspector node dist/index.jsThe server will listen for MCP requests via stdin/stdout.
Using the Email Tool
Tool Definition
The send-email tool accepts the following parameters:
| Parameter | Type | Description |
|-----------|--------|----------------------|
| to | string | Recipient's email |
| subject | string | Email subject |
| body | string | Email body content |
License
This project is licensed under the MIT License. See the LICENSE file for details.
