acs-email
C# (.NET) MCP Server that allows sending emails using Azure Communication Services.
claude mcp add --transport stdio lukemurraynz-acs-email-mcp-server dotnet path/to/ACS.EmailMCP.Server.dll \ --env ACS_ENDPOINT="Azure Communication Services endpoint" \ --env DEFAULT_SENDER_ADDRESS="Default sender email address"
How to use
The ACS Email MCP Server is a .NET 8 MCP implementation designed to run as an Azure Functions custom handler. It leverages Azure Communication Services (ACS) to provide automated email capabilities, including templated emails, attachments, and incident-based notifications. The server exposes MCP tools such as SendEmail, SendSimpleEmail, SendEmailWithMultipleAttachments, SendIncidentEmail, and ListEmailTemplates, enabling you to perform common email workflows directly through MCP payloads. Health and readiness endpoints (/api/healthz and /api/ready) help you monitor the service in production, while infrastructure as code (Bicep templates) simplifies deployment to Azure. Local development and testing are supported via standard .NET tooling and Azure Functions Core Tools.
How to install
Prerequisites:
- .NET 8 SDK (https://dotnet.microsoft.com/download/dotnet/8.0)
- Azure Functions Core Tools (https://learn.microsoft.com/azure/azure-functions/functions-run-local)
- Azure Developer CLI (azd) (https://learn.microsoft.com/azure/developer/azure-developer-cli/install-azd)
- Visual Studio Code (optional but recommended)
- An Azure subscription with a configured Azure Communication Services Email resource
Installation steps:
-
Clone the repository and navigate into it git clone https://github.com/lukemurraynz/acs-email-mcp.git cd acs-email-mcp
-
Restore and build the project dotnet restore dotnet build
-
Configure local environment
- Create or update local.settings.json with ACS_ENDPOINT and DEFAULT_SENDER_ADDRESS, or set them in your environment.
- Example local.settings.json snippet: { "IsEncrypted": false, "Values": { "AzureWebJobsStorage": "UseDevelopmentStorage=true", "ACS_ENDPOINT": "https://<your-acs-resource>.communication.azure.com", "DEFAULT_SENDER_ADDRESS": "donotreply@yourdomain.example" } }
-
Run locally (as an Azure Functions custom handler) func start
-
Run unit/integration tests dotnet test
-
Deploy to Azure azd up
Notes:
- Ensure your sender domain is verified in ACS and that you have proper permissions for sending emails.
- The server is intended to run as an Azure Functions custom handler, so the runtime host should be configured accordingly in production.
Additional notes
Tips and common issues:
- DomainNotLinked and Unauthorized errors typically stem from ACS configuration issues or missing permissions. Verify your ACS domain bindings and managed identities.
- For production deployments, ensure your environment variables (ACS_ENDPOINT, DEFAULT_SENDER_ADDRESS) are securely provided via managed identities or Key Vault references.
- The MCP endpoints exposed by the server include health and readiness checks at /api/healthz and /api/ready. Use these for Kubernetes or orchestrator health checks.
- If you enable attachments or templates, ensure the specified templates exist in your ACS resource and that attachment content types are correctly handled by the server.
- Debug locally with func start and inspect logs for detailed error messages when troubleshooting.
Related MCP Servers
mssql
MSSQL Server MCP implementation written in C#
McpDotNet.Extensions.SemanticKernel
Microsoft SemanticKernel integration for the Model Context Protocol (MCP). Enables seamless use of MCP tools as AI functions.
DatabaseMcpServer
MCP server from ttcc666/DatabaseMcpServer
mcp-dataverse
MCP Server for querying Dataverse using SQL
xperience-community
ASP.NET Core MCP server for Xperience by Kentico projects
console-to-http
Example of converting a stdio MCP server to HTTP using ModelContextProtocol.AspNetCore