MCP Mailtrap Server
An MCP server that provides tools for sending transactional emails and managing email templates via Mailtrap
Prerequisites
Before using this MCP server, you need to:
- Create a Mailtrap account
- Verify your domain
- Get your API token from Mailtrap API settings
- Get your Account ID from Mailtrap account management
Quick Install
Setup
Claude Desktop or Cursor
Add the following configuration:
If you are using asdf
for managing Node.js you must use absolute path to executable (example for Mac)
Claude Desktop config file location
Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Cursor config file location
Mac: ~/.cursor/mcp.json
Windows: %USERPROFILE%\.cursor\mcp.json
VS Code
Manually changing config
Run in Command Palette: Preferences: Open User Settings (JSON)
Then, in the settings file, add the following configuration:
Tip
Don't forget to restart your MCP server after changing the "env" section.
Usage
Once configured, you can ask agent to send emails and manage templates, for example:
Email Operations:
- "Send an email to john.doe@example.com with the subject 'Meeting Tomorrow' and a friendly reminder about our upcoming meeting."
- "Email sarah@example.com about the project update, and CC the team at team@example.com"
Template Operations:
- "List all email templates in my Mailtrap account"
- "Create a new email template called 'Welcome Email' with subject 'Welcome to our platform!'"
- "Update the template with ID 12345 to change the subject to 'Updated Welcome Message'"
- "Delete the template with ID 67890"
Available Tools
send-email
Sends a transactional email through Mailtrap.
Parameters:
to
(required): Email address of the recipientsubject
(required): Email subject linefrom
(optional): Email address of the sender, if not provided "DEFAULT_FROM_EMAIL" will be usedtext
(optional): Email body text, required if "html" is emptyhtml
(optional): HTML version of the email body, required if "text" is emptycc
(optional): Array of CC recipient email addressesbcc
(optional): Array of BCC recipient email addressescategory
(required): Email category for tracking and analytics
create-template
Creates a new email template in your Mailtrap account.
Parameters:
name
(required): Name of the templatesubject
(required): Email subject linehtml
(ortext
is required): HTML content of the templatetext
(orhtml
is required): Plain text version of the templatecategory
(optional): Template category (defaults to "General")
list-templates
Lists all email templates in your Mailtrap account.
Parameters:
- No parameters required
update-template
Updates an existing email template.
Parameters:
template_id
(required): ID of the template to updatename
(optional): New name for the templatesubject
(optional): New email subject linehtml
(optional): New HTML content of the templatetext
(optional): New plain text version of the templatecategory
(optional): New category for the template
Note
At least one updatable field (name, subject, html, text, or category) must be provided when calling update-template to perform an update.
delete-template
Deletes an existing email template.
Parameters:
template_id
(required): ID of the template to delete
Development
- Clone the repository:
- Install dependencies:
Configuration with Claude Desktop or Cursor
Tip
See the location of the config file in the Setup section.
Add the following configuration:
If you are using asdf
for managing Node.js you should use absolute path to executable:
(example for Mac)
VS Code
Tip
See the location of the config file in the Setup section.
Testing
You can test the server using the MCP Inspector:
Contributing
Bug reports and pull requests are welcome on GitHub. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
License
The package is available as open source under the terms of the MIT License.
Code of Conduct
Everyone interacting in the Mailtrap project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Tools
与 Mailtrap 电子邮件平台集成,以便通过 API 发送交易电子邮件。
Related MCP Servers
- AsecurityFlicenseAqualityProvides an interface to manage email marketing, contact lists, dynamic templates, and email analytics via SendGrid's API.Last updated -18
- AsecurityAlicenseAqualityProvides IMAP and SMTP capabilities, enabling developers to manage email services with seamless integration and automated workflows.Last updated -473BSD 3-Clause
- AsecurityFlicenseAqualityEnables sending emails via SMTP with template management, supporting multiple SMTP configurations, template creation with variable substitution, and bulk email sending with rate limiting.Last updated -116
- -securityAlicense-qualityA server that provides integration with PayPal's APIs, enabling seamless interaction with payment processing, invoicing, subscription management, and business operations through a standardized interface.Last updated -MIT License