Elastic Email MCP Server
OfficialThis server has a remotely hosted endpoint. Open its connector listing for connection details, authentication requirements, and setup instructions:
Elastic Email MCP Server
The official Model Context Protocol server for the Elastic Email REST API v4. Written in C# / .NET.
Installation โข Quick start โข Tools โข Examples โข Contributing
Features
Transactional and bulk email. Let your AI assistant send single messages or bulk sends, with plain content or an existing template.
Contacts and lists. Add, import, list and delete contacts, and create and manage contact lists.
Campaigns. Create, update, pause and list campaigns, including A/X split tests and scheduled sends.
Segments and templates. Create and read segments, and look up personal or global templates.
Statistics. Read opens, clicks and other numbers for one campaign or all of them.
Works with any MCP client. VS Code (GitHub Copilot agent mode), Cursor, Claude Code and other clients that speak MCP over HTTP.
Per-request authentication. Each client sends its own Elastic Email API key. The server keeps no credentials of its own.
Don't want to run a server? Elastic Email hosts this server athttps://mcp.elasticemail.com. See the hosted MCP guide. This repository is for running it yourself.
Related MCP server: RuSender MCP
Requirements
Requirement | Version |
10.0 or later | |
Network | Port 5001 open for HTTP, outbound HTTPS to |
MCP client | Any client that supports MCP over HTTP |
You'll also need an Elastic Email API key. You can create one in your API settings. Give it view and modify access to Account, Templates, Campaigns, Contacts, Files and Send HTTP, and at least view access to Access Tokens. The server rejects keys that can't list API keys.
Installation
Clone the repository and build it:
git clone https://github.com/ElasticEmail/elasticemail-mcp-server.git
cd elasticemail-mcp-server
dotnet build src/ElasticEmail.Mcp.Service.slnThe build restores its NuGet dependencies (ModelContextProtocol.AspNetCore, Newtonsoft.Json and Serilog.AspNetCore) for you.
Quick start
Elastic Email only sends from verified domains. Before your first send,verify your sending domain and use an address on that domain as the sender.
Run the server
dotnet run --project src/ElasticEmail.Mcp.Service.csprojThe server listens on http://0.0.0.0:5001/ and writes daily rolling logs to the working directory.
Connect VS Code (GitHub Copilot)
Add the server to .vscode/mcp.json in your workspace:
{
"inputs": [
{
"type": "promptString",
"id": "elasticemail-api-key",
"description": "Elastic Email API key",
"password": true
}
],
"servers": {
"elasticemail": {
"type": "http",
"url": "http://localhost:5001/",
"headers": {
"X-Auth-Token": "${input:elasticemail-api-key}"
}
}
}
}Then open Copilot Chat, switch to Agent mode, click Start above the server entry, and check that the Elastic Email tools are selected in the tools picker.
Keep your API key out of files you commit. Theinputs prompt above asks for it once and stores it securely in VS Code.
Connect Claude Code
claude mcp add --transport http elasticemail http://localhost:5001/ \
--header "X-Auth-Token: $ELASTICEMAIL_API_KEY"Connect Cursor
Add the server to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global):
{
"mcpServers": {
"elasticemail": {
"url": "http://localhost:5001/",
"headers": {
"X-Auth-Token": "YOUR_API_KEY"
}
}
}
}Try it
Ask your assistant something like:
"Check that the Elastic Email MCP server is ready."
"Send a transactional email to john.doe@example.com from no-reply@yourdomain.com with the subject Welcome aboard!"
"Create a list called beta-testers with jane@example.com and john@example.com."
"Show me open and click statistics for all my campaigns."
The from address must use a domain you've verified in your Elastic Email account. If you leave it out, the server uses your account's default sender.
More examples
More complete, runnable samples are in the Elastic Email examples repository. It covers transactional email, SMTP, webhooks, inbound email, contacts and serverless platforms across 20+ languages and frameworks.
๐ค AI agent examples (LangChain, OpenAI Agents, Vercel AI SDK)
๐ฃ .NET / C# examples
๐ All examples
Authentication
Header | Sent by | Used for |
| Your MCP client, on every request | Your Elastic Email API key. The server checks it against |
Requests without the header, or with a key the API rejects, get 401 Unauthorized.
The server speaks plain HTTP, so the API key travels unencrypted. Keep it onlocalhost or a private network. If you expose it, put it behind a reverse proxy that terminates TLS.
API limits
The server calls the Elastic Email API v4 with your key, so the API's limits apply:
Up to 20 concurrent connections per account. The API doesn't return
429; a5xxunder load means slow down and retry with backoffA request with no response for about 50 seconds fails with a gateway error (
5xx)Up to 50 recipients per
POST /emails/transactionaland 1000 contacts or suppressions per upload (413above that)
Tools
The server exposes 26 tools in 6 groups: EmailSending, ContactsManagement, CampaignManagement, SegmentsManagement, TemplatesManagement and HealthCheck. Most tools return the API's JSON response as a string. Tools marked bool return only true or false.
Group | Tool | Parameters | Description |
EmailSending | SendTransactionalEmail |
| Send a transactional email, with content or a template |
EmailSending | SendBulkEmails |
| Send email to many recipients, with content or a template |
ContactsManagement | FetchContacts |
| Load contacts |
ContactsManagement | FetchContactHistory |
| Load a contact's history |
ContactsManagement | AddContact (bool) |
| Add a contact |
ContactsManagement | DeleteContacts (bool) |
| Delete contacts by email list or rule |
ContactsManagement | UploadContacts |
| Import contacts from a file, creating the list if needed |
ContactsManagement | FetchLists | Load all contact lists | |
ContactsManagement | FetchList |
| Load a list's details |
ContactsManagement | FetchListContacts |
| Load the contacts in a list |
ContactsManagement | CreateList |
| Create a list with the given contacts |
ContactsManagement | AddContactsToList |
| Add contacts to a list |
ContactsManagement | RemoveContactsFromList (bool) |
| Remove contacts from a list |
CampaignManagement | CreateCampaign |
| Create and send a campaign |
CampaignManagement | ListCampaigns | Load campaigns | |
CampaignManagement | GetCampaign |
| Load a campaign |
CampaignManagement | UpdateCampaign |
| Update a campaign (change its status to start it again) |
CampaignManagement | PauseCampaign (bool) |
| Pause a campaign |
CampaignManagement | GetCampaignStatistics |
| Load one campaign's statistics |
CampaignManagement | GetAllCampaignStatistics | Load statistics for all campaigns | |
SegmentsManagement | CreateSegment |
| Create a segment |
SegmentsManagement | GetSegments | Load segments | |
SegmentsManagement | GetSegment |
| Load a segment |
TemplatesManagement | FetchTemplates |
| Load templates, filtered by scope and type |
TemplatesManagement | FetchTemplate |
| Load a template |
HealthCheck | IsReady | Check the server and its connection to the API |
Your MCP client shows each tool's full description and input schema. The source is in src/Tools.
Versioning
The server follows the Elastic Email API v4. Releases and release notes are listed in GitHub Releases.
API version: 4.0.0
Target framework:
net10.0MCP SDK:
ModelContextProtocol.AspNetCore0.4.0-preview.3Transport: HTTP (Streamable HTTP and SSE), port 5001
Contributing
Contributions are welcome! Please read CONTRIBUTING.md before opening a pull request.
๐ Report a bug
๐ก Request a feature
This project follows the Contributor Covenant Code of Conduct.
Support
The fastest way to get help is thechat widget on elasticemail.com. Our support team can help with your account, sending, deliverability and API questions.
๐ฌ Chat with support on elasticemail.com (preferred)
๐ API documentation
๐งญ Hosted MCP guide
๐งช Examples repository
๐ GitHub issues, for bugs in this server only
License
Released under the MIT License. Copyright ยฉ 2025โ2026 Elastic Email.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
This server cannot be deployed
Maintenance
Related MCP Connectors
Send email, manage domains, templates, webhooks and broadcasts from your AI agent.
Send email, manage domains, templates, webhooks and broadcasts from your AI agent.
Send transactional and marketing emails, manage contacts and campaigns, and read stats.
Send, track, and manage transactional and bulk email delivery
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables AI agents to send transactional email, authenticate sending domains, track delivery, and diagnose deliverability issues programmatically.1361 npmMIT

RuSender MCPofficial
AlicenseNot gradedqualityBmaintenanceEnables AI assistants to manage email campaigns, contact lists, analytics, A/B tests, and transactional emails through natural language, using OAuth for secure connection.1MIT- AlicenseAqualityBmaintenanceEnables AI agents to send transactional emails and manage email infrastructure through the AgentiSend API, including domain verification, budgeted keys, and message logs.46MIT

ZapSMTP MCP serverofficial
AlicenseNot gradedqualityBmaintenanceEnables MCP clients to send, receive, and track email and manage templates, domains, webhooks, and other email API operations from AI assistants.27 npmMIT