developer-toolsoauth2

Mailtrap

Email Delivery Platform for testing and sending transactional emails

Verdict

Mailtrap's MCP lets your team manage email testing and transactional sending directly from Switchy. @mention it to clean test inboxes, create contact lists, build email templates, or configure sending domains without leaving your workspace. Developers get instant access to inbox cleanup and template drafting during sprint planning; marketing ops can export contact segments or log custom events for campaign triggers. The OAuth flow grants read-write access to your Mailtrap account — you'll manage contacts, templates, and domain DNS records through AI prompts, so review permissions carefully before connecting.

Common use cases

  • Clean test inboxes before QA runs
  • Export contact segments for campaign analysis
  • Draft email templates during sprint planning
  • Create custom contact fields for personalization
  • Track user events for automation triggers

Integration

Vendor
Mailtrap
Category
developer-tools
Auth
OAUTH2
Tools
49
Composio slug
mailtrap

Tools

  • Clean Inbox

    Tool to clean an inbox in Mailtrap by deleting all messages. Use when you need to remove all emails from an inbox while keeping the inbox itself.

  • Create Contact

    Tool to create a new contact in Mailtrap. Use when you need to add a contact with an email address to a Mailtrap account. Optionally include custom fields and assign to contact lists.

  • Create Contact Event

    Tool to create a contact event in Mailtrap. Use when you need to track custom events associated with a contact for segmentation or automation triggers.

  • Create Contact Export

    Tool to create a contact export job for a Mailtrap account. Use when you need to export contacts with filters. The export is processed asynchronously - the response includes a job ID and status. Check the status field; when it becomes 'fini

  • Create Contact Field

    Tool to create a custom contact field in Mailtrap. Use when you need to add new contact attributes for personalization and segmentation in email campaigns.

  • Create Contact List

    Tool to create a new contact list in Mailtrap. Use when you need to organize contacts into groups or segments. Each contact list has a unique ID and name that can be used to add contacts to it later.

  • Create Email Template

    Tool to create a new email template in Mailtrap account. Use when you need to create a reusable email template with HTML/text content, subject, and category. The template can be used for sending promotional, transactional, or newsletter ema

  • Create Sending Domain

    Tool to create a new sending domain in Mailtrap. Use when you need to register a domain for sending transactional emails. After creation, DNS records must be configured before the domain can be used for sending.

  • Delete Contact
    destructive

    Tool to delete a contact from a Mailtrap account. Use when you need to permanently remove a contact by their UUID or email address. The deletion is permanent and cannot be undone.

  • Delete Contact Field
    destructive

    Tool to delete a contact field by its ID. Use when you need to remove a custom contact field from an account.

  • Delete Contact List
    destructive

    Tool to delete a contact list by its ID. Use when you need to remove a contact list from an account.

  • Delete Email Template
    destructive

    Tool to delete an email template from a Mailtrap account. Use when you need to remove an existing email template.

  • Delete Project
    destructive

    Tool to delete a project from Mailtrap. Use when you need to permanently remove a project and its associated resources. Returns the ID of the deleted project.

  • Delete Sending Domain
    destructive

    Tool to delete a sending domain from a Mailtrap account. Use when you need to remove a domain permanently.

  • Get Billing Usage

    Tool to retrieve current billing cycle usage for an account. Use when you need to check billing information, usage limits, or consumption for Email Sandbox and Email Sending services.

  • Get Contact

    Tool to retrieve a contact by UUID or email address from Mailtrap. Use when you need to fetch details of a specific contact including their subscription status, lists, and custom fields.

  • Get Contact Export

    Tool to retrieve the status of a contact export. Use when you need to check the progress of an export or download the exported contacts file.

  • Get Contact Field

    Tool to retrieve contact field details by field ID. Use when you need to get information about a specific custom field in your contacts.

  • Get Contact Import Status

    Tool to retrieve the status of a contact import operation. Use when you need to check the progress or completion status of a contact import. Use after initiating a contact import to monitor its status and retrieve statistics once finished.

  • Get Contact List

    Tool to retrieve a specific contact list by its ID. Use when you need to fetch details about a contact list in a Mailtrap account.

  • Get Email Template

    Tool to retrieve details of a specific email template by ID. Use when you need to fetch template content, metadata, or configuration for an existing email template.

  • Get Inbox Attributes

    Tool to retrieve inbox attributes from Mailtrap. Use when you need to get details about a specific inbox including its configuration, statistics, and permissions.

  • Get Message HTML Body

    Tool to retrieve the HTML body of a message from Mailtrap. Use when you need to get the formatted HTML content of a specific email message.

  • Get Permission Resources

    Tool to retrieve all resources in account for permission management. Use when you need to see the hierarchical structure of projects, inboxes, and other resources with their access levels for the current authentication token.

  • Get Project by ID

    Tool to retrieve project details from Mailtrap by project ID. Use when you need to get information about a specific project including its inboxes, permissions, and share links.

  • Get Sending Domain

    Tool to retrieve sending domain details from Mailtrap. Use when you need to check domain configuration, DNS verification status, or tracking settings.

  • Get Sending Stats

    Tool to retrieve email sending statistics from Mailtrap for a specific account. Use when you need metrics like delivery rate, bounce rate, open rate, click rate, and spam rate for a date range.

  • Get Sending Stats by Categories

    Tool to retrieve email sending statistics grouped by categories. Use when you need to analyze email performance metrics (delivery, bounce, open, click, spam rates) segmented by email categories within a date range.

  • Get Sending Stats by Date

    Tool to retrieve email sending statistics aggregated by date. Use when you need to analyze email delivery performance, bounce rates, open rates, click rates, and spam rates for a specific date range.

  • Get Sending Stats by Domains

    Tool to retrieve sending statistics grouped by domains for a Mailtrap account. Use when you need email delivery, bounce, open, click, and spam metrics broken down by sending domain for a specific date range. Supports filtering by domain IDs

  • Get Sending Stats by ESP

    Tool to retrieve email sending statistics grouped by email service providers (ESPs) for a specified date range. Returns delivery, bounce, open, click, and spam metrics for each ESP. Use when you need to analyze email performance across diff

  • Import Contacts

    Tool to import contacts in bulk to Mailtrap. Use when you need to add or update multiple contacts at once. The import operation is asynchronous and returns a job ID that can be used to check the status later.

  • List Accounts

    Tool to list all Mailtrap accounts you have access to. Use when you need to retrieve account information or get account IDs for other operations. Returns account ID, name, and access levels (1000=owner, 100=admin, 10=viewer).

  • List Contact Fields

    Tool to get all contact fields for a Mailtrap account. Use when you need to retrieve custom field definitions for contacts.

  • List Contact Lists

    Tool to retrieve all contact lists for a Mailtrap account. Use when you need to view available contact lists or obtain contact list IDs for other operations.

  • List Email Suppressions

    Tool to list suppressed email addresses for a Mailtrap account. Use when you need to view which emails are blocked from receiving messages due to bounces, complaints, unsubscribes, or manual suppression.

  • List Email Templates

    Tool to retrieve all email templates for a Mailtrap account. Use when you need to list available templates, browse template configurations, or find a specific template by name or attributes.

  • List Inboxes

    Tool to get a list of inboxes for a Mailtrap account. Use when you need to retrieve all inboxes associated with an account ID. Returns the list of inboxes with their configuration, permissions, and statistics.

  • List Messages in Inbox

    Tool to get messages from a Mailtrap inbox. Use when you need to retrieve emails from a specific inbox, with support for search filtering and pagination. Returns up to 30 messages per request.

  • List Projects

    Tool to get a list of projects for a Mailtrap account. Use when you need to retrieve all projects and their associated inboxes for a specific account. Returns project attributes, permissions, and nested inbox information.

  • List Sending Domains

    Tool to list all sending domains for a Mailtrap account. Use when you need to retrieve configured domains for email sending.

  • Mark Inbox as Read

    Tool to mark all messages in a Mailtrap inbox as read. Use when you need to mark all unread messages as read in a specific inbox.

  • Reset Inbox Credentials

    Tool to reset SMTP credentials for a Mailtrap inbox. Use when you need to regenerate the username and password for inbox access.

  • Update contact

    Tool to update an existing contact in Mailtrap. Use when you need to modify contact details such as email, custom fields, list memberships, or subscription status. If the contact doesn't exist, it will be created.

  • Update Contact Field

    Tool to update a contact field in Mailtrap. Use when you need to modify the name or merge tag of an existing contact field.

  • Update Contact List

    Tool to update a contact list's name in Mailtrap. Use when you need to rename an existing contact list.

  • Update Email Template

    Tool to update an existing email template in Mailtrap account. Use when you need to modify template properties such as name, subject, category, HTML body, or plain text body. All fields in the email_template object are optional - only provi

  • Update inbox

    Tool to update an inbox's settings in Mailtrap. Use when you need to change the inbox name or email username.

  • Update project

    Tool to update a project's name in Mailtrap. Use when you need to rename an existing project.

Setup

Setup guide

  1. 11. Open a Space in Switchy and click 'Add Integration' in the sidebar. 2. Search for Mailtrap and select it from the developer tools category. 3. Click 'Connect with OAuth' — you'll be redirected to Mailtrap's authorization page. 4. Sign in to your Mailtrap account and review the requested scopes (read-write access to inboxes, contacts, templates, and sending domains). 5. Click 'Authorize' to grant Switchy access — you'll return to your Space with Mailtrap connected. 6. Test the connection by typing '@Mailtrap list my contact lists' in the chat. 7. If you see a response listing your contact lists, the integration is live. 8. To invoke any tool, start your message with '@Mailtrap' followed by your request — the AI will route it to the appropriate Mailtrap endpoint.

What teammates see: by default, memories from Mailtrap are scoped to the Space (PROJECT visibility) - you can mark any memory PRIVATE or share it ORG-wide.

Works well with

Top models

Compatibility data appears once enough Spaces have used this MCP together with a given model.

How Switchy teams use it

Not enough Spaces yet to publish anonymised usage stats (we require ≥ 50 Spaces per week).

Starter prompts

Clean Test Inbox

@Mailtrap clean the inbox named 'Staging QA' so we can start today's email flow tests with a blank slate.
Open in a Space →

Create Contact List

@Mailtrap create a contact list called 'Q2 Product Launch' for our upcoming feature announcement emails.
Open in a Space →

Draft Welcome Email

@Mailtrap create an email template named 'Welcome New Users' with a subject line 'Welcome to [Product Name]' and a simple HTML body introducing our platform.
Open in a Space →

Export Contact Segment

@Mailtrap export all contacts from the 'Trial Users' list who signed up in the last 30 days, and give me the job ID to track progress.
Open in a Space →

Log Custom Event

@Mailtrap create a contact event for user@example.com with event type 'feature_activated' and a timestamp of today's date.
Open in a Space →

Example outputs

Illustrative - representative of the model's voice and quality, not literal recordings.

Prompt

@Mailtrap show me all contact lists in my account and how many subscribers are in each one

Output

Based on your Mailtrap account, here are your contact lists: • Newsletter Subscribers — 1,247 contacts • Product Updates — 892 contacts • Beta Testers — 156 contacts • Churned Users — 423 contacts This is an illustrative example showing how the MCP would retrieve and format your contact list data. The actual counts and list names would reflect your account's current state.

Notes

This example demonstrates the MCP's read capability for contact management. Requires OAuth2 authorization with read access to contacts. Useful for auditing list health before campaigns, but note that contact counts may include unsubscribed or bounced addresses depending on your filter settings.

Prompt

@Mailtrap create a new email template called 'Welcome Series Day 1' with subject 'Welcome to our community!' and use our standard onboarding HTML

Output

Created email template 'Welcome Series Day 1' (ID: tpl_8x9k2m4n). Template details: • Subject: Welcome to our community! • Category: Onboarding • Content: HTML template saved (2.3 KB) • Status: Draft This illustrative example shows the confirmation you'd receive after template creation. The template is now available in your Mailtrap account for sending campaigns or automation workflows.

Notes

This write operation creates a reusable template in your account. The MCP needs write permissions for templates. Important: the template starts in draft status and won't be used in live sends until you explicitly activate it through Mailtrap's interface or another API call.

Prompt

@Mailtrap analyze my inbox from the last 24 hours and tell me which test emails had broken links or missing images

Output

Analyzed 18 test emails from the past 24 hours in your Mailtrap inbox. Found issues in 3 messages: • 'Weekly Digest' (10:23 AM) — 2 broken links to blog.example.com, 1 missing hero image • 'Password Reset' (2:45 PM) — Reset link returns 404 • 'Order Confirmation' (4:12 PM) — Product thumbnail missing alt text This illustrative example shows how the AI can synthesize email validation data from Mailtrap's testing tools to surface quality issues before production sends.

Notes

This synthesis example pairs Mailtrap's email inspection capabilities with AI reasoning to identify patterns. The MCP can retrieve message content and metadata, but the AI performs the link/image validation logic. Useful for pre-send QA, though you'll need to manually verify fixes in your email templates.

Use-case deep-dives

Transactional email QA for SaaS teams

When Mailtrap beats production-only testing for email flows

A 6-person SaaS team ships password resets, invoices, and onboarding sequences weekly. Mailtrap's inbox tools let them preview every transactional email in a safe sandbox before it hits real users. The Clean Inbox tool wipes test clutter between QA runs; Create Email Template stores the canonical versions; the domain tools let them test SPF/DKIM setup without risking deliverability. This works until you're sending 10k+ emails per deploy—at that scale, you need production observability more than pre-send inspection. If your team merges email changes daily and can't afford a broken password-reset flow, Mailtrap's 49 tools give you the safety net without the ops overhead of a full staging mail server.

Marketing automation contact sync for growth teams

When this MCP handles contact list hygiene at small scale

A 3-person growth team runs drip campaigns in Mailtrap and needs to keep contact lists current as signups flow in from Stripe and Typeform. The Create Contact and Create Contact List tools let an AI agent auto-segment new users by plan tier or signup source, then trigger the right onboarding sequence. Create Contact Event tracks custom milestones (first login, feature adoption) without manual CSV uploads. This setup holds until you're managing 50k+ contacts or need real-time event streaming—then you want a dedicated CDP. If your team is under 10k contacts and you're tired of spreadsheet imports every Monday, Mailtrap's contact tools turn signup data into targeted campaigns without hiring a marketing ops person.

Email template versioning for distributed product teams

When Mailtrap's template tools beat Git for email content

A 12-person product org spread across 4 time zones ships localized transactional emails in 6 languages. Designers own the HTML; PMs own the copy; engineers own the triggers. Mailtrap's Create Email Template tool becomes the single source of truth—each template gets a UUID, and the AI can diff versions or roll back broken layouts without touching the codebase. Create Contact Field lets PMs add merge tags (user.plan_name, user.trial_days_left) without a deploy. This breaks down if you're shipping 50+ template variants per quarter or need A/B testing at the template level—then you want a headless CMS. If your team argues about email copy in Slack and deploys break because someone forgot to update the footer, Mailtrap's template tools give you change control without the Git ceremony.

Frequently asked

What does the Mailtrap MCP do in Switchy?

The Mailtrap MCP lets your AI agents manage email testing infrastructure and transactional email campaigns directly from Switchy. Agents can clean inboxes, create contact lists, build email templates, register sending domains, and trigger contact events — all without leaving the chat. It's useful for teams that run automated email workflows or need to set up test environments programmatically.

Do I need admin access to connect Mailtrap via OAuth?

You need a Mailtrap account with API access enabled. The OAuth2 flow requests permissions to read and write contacts, templates, domains, and inbox data. If your Mailtrap account is on a team plan, check with your admin that API access isn't restricted. The connection happens at the account level, not per-project.

Can the MCP send actual emails to customers?

No. The MCP creates templates, manages contacts, and registers sending domains, but it doesn't trigger outbound email sends. You still use Mailtrap's UI or API to send campaigns. The MCP is for setup and data management — think of it as the scaffolding, not the send button.

How is this different from using Mailtrap's API directly?

The MCP wraps Mailtrap's API so your AI agents can call it conversationally. Instead of writing curl commands or SDK code, you ask Switchy to "create a contact list for beta users" and the agent executes the right sequence of tools. It's faster for ad-hoc tasks; the API is still better for high-volume automation.

Who on the team should connect this MCP?

Whoever owns your Mailtrap account and understands your email infrastructure. Typically a backend engineer or DevOps lead. Once connected, any Switchy user in your workspace can ask agents to use it, but the person who connects it controls which Mailtrap account the agents touch.

Data last verified 607 hours ago.Sources aggregated hourly to weekly. See docs/architecture/model-directory.md.