126-email-mcp-server
v1.0.4
Published
A powerful MCP server for sending emails via 126.com SMTP service. Perfect for AI assistants and automation workflows!
Maintainers
Readme
126 Email MCP Server
🚀 A powerful MCP (Model Context Protocol) server for sending emails via 126.com SMTP service. Perfect for AI assistants like Claude Desktop!
✨ Features
- 🔒 Secure email sending via 126.com SMTP with SSL/TLS
- 📧 Rich email support - HTML, plain text, CC, BCC
- 🤖 MCP Protocol ready - Works seamlessly with Claude Desktop and other MCP clients
- ⚡ Zero configuration - Works entirely via command line arguments
- 🎯 npx ready - No installation required, use directly with npx
🚀 Quick Start for Claude Desktop
1. Add to Claude Desktop Configuration
Edit your ~/.claude_desktop_config.json file:
{
"mcpServers": {
"126-email": {
"command": "npx",
"args": [
"-y",
"126-email-mcp-server",
"--email-user", "[email protected]",
"--email-password", "your-password-or-app-specific-password"
]
}
}
}2. With Custom Settings
{
"mcpServers": {
"126-email": {
"command": "npx",
"args": [
"-y",
"126-email-mcp-server",
"[email protected]",
"--email-password=your-password-or-app-specific-password",
"--from-name=Your Name",
"--debug=false"
]
}
}
}3. Restart Claude Desktop
After saving the configuration, restart Claude Desktop to load the MCP server.
📧 Available Tools in Claude
Once configured, Claude will have access to these email tools:
send_email
Send emails with rich content support:
- to (required): Recipient email address
- subject (required): Email subject
- text (optional): Plain text content
- html (optional): HTML content
- cc (optional): CC recipients (comma-separated)
- bcc (optional): BCC recipients (comma-separated)
verify_smtp_connection
Test your SMTP configuration:
- No parameters required
- Returns connection status and details
🔧 Configuration Parameters
Required Parameters
--email-user <email>- Your 126.com email address--email-password <password>- Your 126.com password or app-specific password
Optional Parameters
--debug <true|false>- Enable debug mode (default: false)--smtp-host <host>- SMTP server (default: smtp.126.com)--smtp-port <port>- SMTP port (default: 465)--smtp-secure <true|false>- Use SSL/TLS (default: true)--from-name <name>- Display name for sender--require-tls <true|false>- Require TLS (default: false)
🔐 126.com Email Setup
Step 1: Enable SMTP Service
- Log into your 126.com email account
- Go to Settings → POP3/SMTP/IMAP
- Enable SMTP service
- Note down the SMTP settings (usually smtp.126.com:465 with SSL)
Step 2: Get App-Specific Password (if using 2FA)
- If you have 2-factor authentication enabled
- Generate an app-specific password
- Use this app-specific password instead of your regular password
Step 3: Test Configuration
npx 126-email-mcp-server --email-user [email protected] --email-password yourpass --help🎯 Usage Examples
Basic MCP Configuration
{
"mcpServers": {
"126-email": {
"command": "npx",
"args": ["-y", "126-email-mcp-server", "--email-user", "[email protected]", "--email-password", "yourpass"]
}
}
}Advanced MCP Configuration
{
"mcpServers": {
"126-email": {
"command": "npx",
"args": [
"-y", "126-email-mcp-server",
"[email protected]",
"--email-password=yourpass",
"--from-name=AI Assistant",
"--debug=true",
"--smtp-secure=true"
]
}
}
}Alternative MCP Client Configuration
{
"servers": {
"126-email-server": {
"command": "npx",
"args": ["-y", "126-email-mcp-server", "--email-user", "[email protected]", "--email-password", "yourpass"],
"env": {}
}
}
}🧪 Testing Outside Claude
Interactive Mode
npx 126-email-mcp-server --email-user [email protected] --email-password yourpassSTDIO Mode (for MCP clients)
npx 126-email-mcp-server --stdio --email-user [email protected] --email-password yourpassConfiguration Check
npx 126-email-mcp-server --email-user [email protected] --email-password yourpass --help🔍 Troubleshooting
Claude Desktop Not Recognizing the Server
- Check configuration syntax - Ensure JSON is valid
- Restart Claude Desktop - Required after config changes
- Check credentials - Verify email and password are correct
- Enable SMTP - Ensure SMTP is enabled in your 126.com account
Authentication Issues
- Use app-specific password if 2FA is enabled
- Check SMTP settings in your 126.com account
- Try debug mode: Add
--debug=trueto see detailed logs
Connection Issues
- Check firewall settings
- Try different ports: 25, 465, 587
- Verify SMTP host: Should be smtp.126.com
📋 Configuration File Locations
Claude Desktop
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
🚀 Advanced Usage
Multiple Email Accounts
{
"mcpServers": {
"126-email-personal": {
"command": "npx",
"args": ["-y", "126-email-mcp-server", "--email-user", "[email protected]", "--email-password", "pass1"]
},
"126-email-work": {
"command": "npx",
"args": ["-y", "126-email-mcp-server", "--email-user", "[email protected]", "--email-password", "pass2"]
}
}
}Custom SMTP Settings
{
"mcpServers": {
"126-email-custom": {
"command": "npx",
"args": [
"-y", "126-email-mcp-server",
"[email protected]",
"--email-password=yourpass",
"--smtp-host=smtp.126.com",
"--smtp-port=587",
"--smtp-secure=false",
"--require-tls=true"
]
}
}
}📦 Package Information
- Package:
126-email-mcp-server - npx ready: Use directly without installation
- Node.js: Requires Node.js 18+
- MCP SDK: Built with official MCP SDK
🤝 Support
- Issues: Report bugs and feature requests
- Documentation: Complete usage examples
- Community: Share your use cases
📄 License
ISC License - see LICENSE file for details.
Ready to send emails from Claude? Just add the configuration above to your Claude Desktop settings and restart! 🚀
