- Home
- MCP servers
- Email Sender
Email Sender
- python
0
GitHub Stars
python
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": {
"wyccywwyc-emailmcp": {
"command": "uv",
"args": [
"--directory",
"/Users/wangyichao/study/mcp/emailMCP",
"run",
"main.py"
],
"env": {
"USE_SSL": "false",
"USE_TLS": "true",
"SMTP_PORT": "587",
"SMTP_SERVER": "smtp.qq.com",
"SENDER_EMAIL": "your-email@qq.com",
"SENDER_PASSWORD": "your-authorization-code"
}
}
}
}You can run a dedicated MCP server that sends email via a Model Context Protocol, enabling simple and full email delivery with customizable SMTP settings and common provider presets. This server reads its configuration from environment variables and can be launched through the MCP runner to integrate with your broader automation workflow.
How to use
Run the email sender MCP server from your MCP client to send both plain text and HTML emails, with support for single recipients or multiple recipients, CC, BCC, and attachments. Configure SMTP settings via environment variables or use a custom SMTP configuration when needed. Use the available helper tools to get suggested SMTP configurations or view your current configuration.
How to install
Prerequisites: you need the MCP runner available in your environment. Ensure you have the MCP ecosystem installed and that you can run local MCP servers using the runner.
-
Install prerequisites if needed for your workspace and MCP runner.
-
Download or prepare the email sender MCP server files and place them in your project directory.
-
Start the MCP server using the command shown in the configuration below.
Configuration and usage details
Environment variables control the SMTP connection and sender credentials. Provide values for the SMTP server, port, sender email, password or authorization code, and flags for TLS/SSL usage.
You can also configure a dedicated MCP server command when you prefer not to rely on environment variables. The server exposes several helper endpoints and functions to send emails in both simple and full formats.
Common email configurations are provided for popular providers (QQ, 163, Gmail, Outlook) with recommended ports and security settings. Ensure you generate and use an authorization code or app password as required by the provider.
Quick start: you can run the server via the MCP runner using the stdio approach shown in the example below. This method starts a local process that the MCP framework can manage.
Troubleshooting and notes
Password safety: avoid hard-coding passwords in code or configuration files; prefer environment variables or secret management.
If you encounter authentication failures, verify the sender address, the password or authorization code, and that SMTP services are enabled for the account.
Check the SMTP server address and port, and ensure network access to the SMTP endpoint. Review firewall settings if connections fail.
Attach file paths must be absolute or relative to the working directory and must be readable by the sending process.
Available tools
send_simple_email
Send a simple email to a single recipient with optional plain or HTML content.
send_email
Send a full email to multiple recipients with support for attachments, CC, and BCC, and optional HTML content.
send_email_with_custom_config
Send emails using a custom SMTP configuration that does not rely on environment variables.
get_smtp_configs
Retrieve common SMTP provider configurations as JSON.
get_current_config
Retrieve the current SMTP configuration in use (password masked).