McpEmailServer
0
The MCP Email Server is a C# application providing email sending capabilities through SMTP. It is designed as a Model Context Protocol server and supports sending both plain text and HTML emails with proper security measures.
MCP Email Server
A C# Model Context Protocol (MCP) server that provides email sending capabilities using SMTP.
Prerequisites
- .NET 6.0 or later
- SMTP server credentials (e.g., Gmail, Office 365, or your own SMTP server)
Setup
-
Clone the repository
-
Configure SMTP settings using environment variables.
Gmail Setup
- Enable 2-Step Verification
- Generate an App Password for email.
Available Tools
SendEmail
- Parameters:
to
,subject
,body
- Parameters:
SendHtmlEmail
- Parameters:
to
,subject
,htmlBody
- Parameters:
Features
- MCP server with stdio transport
- SMTP email sending
- Support for plain text and HTML emails
- Dependency injection
- Configurable via appsettings.json
- Error handling and logging
Security Notes
- Do not commit email credentials to source control.
- Use app passwords and secure configuration methods.