Mailtrap provides email for AI agents

Email for AI Agents

Email infrastructure for AI agents and coding assistants. Tools to use from where they operate — MCP, REST API, Skills, SDKs.

Give your agent access to Mailtrap account via MCP

Send emails, check your sent emails, work with templates, analyze deliverability, and set up new sending domains from Claude, Cursor, VS Code, and more.

Copy

{
  "mcpServers": {
    "mailtrap": {
      "command": "npx",
      "args": ["-y", "mcp-mailtrap"],
      "env": {
        "MAILTRAP_API_TOKEN": "your_mailtrap_api_token",
        "DEFAULT_FROM_EMAIL": "your_sender@example.com",
        "MAILTRAP_ACCOUNT_ID": "your_account_id",
        "MAILTRAP_TEST_INBOX_ID": "your_test_inbox_id"
      }
    }
  }
}

Trusted by 150,000+ monthly active users

Atlassian is a customer of Mailtrap
Adobe is a customer of Mailtrap
Yelp is a customer of Mailtrap
PayPal is a customer of Mailtrap
Toptal is a customer of Mailtrap
Calendly is a customer of Mailtrap

Mailtrap Skills: Built-in capabilities for your agent

Sending emails

Send transactional or bulk emails via API or SMTP. Your agent picks the right stream, handles authentication, and manages suppressions with SDKs for Node.js, Python, PHP, Ruby, and more.

View on GitHub

Using email templates

Create and send with Handlebars templates — conditionals, loops, dynamic data. Your agent references templates by UUID, injects variables via API, and previews results in Sandbox.

View on GitHub

Managing contacts

Build and manage your audience with lists, segments, and custom fields. Your agent syncs contacts via API, triggers events for automation, and keeps your marketing data in one place.

View on GitHub

Compliance guardrails

GDPR, SOC 2, and ISO-27001 certified infrastructure. Flexible permissions control what each agent can access and send. Audit logs track every account action — who did what, when, and what changed. Email logs give per-recipient delivery tracking with 30-day retention.
Trust Center
Mailtrap is GDPR compliant
GDPR
Compliant
Mailtrap is SOC2 certified
SOC 2
Compliant
Mailtrap is ISO 27001 certified
ISO-27001
Compliant

Email infrastructure built for deliverability, managed by agents

Mailtrap provides actively maintained SDKs

REST API

Send emails, manage templates, track deliverability, handle suppressions, and configure domains through a single API.
Mailtrap provides actively maintained SDKs

Actively maintained SDKs

Official, actively maintained libraries for Node.js, PHP, Python, Ruby, Java, .NET, and Elixir. Drop-in integration for any stack.

Separate sending streams

Isolate transactional and bulk email in separate streams to protect sender reputation and keep critical alerts delivering.

Email templates

Host and manage HTML or Drag & Drop templates. Agents inject dynamic data and send personalized emails via API or MCP.
Mailtrap provides automatic email authentication

High email deliverability

Dedicated IPs with automated warm-up, plus automatic SPF, DKIM, and DMARC setup. Automated monthly DKIM key rotation.

Sandbox testing

Capture and inspect emails before sending to real recipients. Validate HTML, check spam scores, verify rendering.
Question icon

Frequently Asked Questions

  • What is Mailtrap’s MCP server?

    A Model Context Protocol server with 24 tools that give AI agents full access to your Mailtrap account. Send transactional and bulk emails, manage templates, test in sandbox with spam and HTML analysis, inspect email logs, pull delivery stats broken down by domain or provider, and configure sending domains — all through natural language.

  • Which AI tools are supported?

    The MCP server works with Claude Code, Google Antigravity, Codex, OpenCode, VS Code, Cursor, and Windsurf, and any other tool that supports the Model Context Protocol. For agents and frameworks without MCP support, use the REST API or official SDKs.

  • Can I control what my agents send?

    Yes. Scope API tokens to limit what each agent can access. Use Email Sandbox to capture and review agent-generated emails before switching to live sending.  Email logs give per-recipient delivery tracking — opens, clicks, bounces, complaints — with 30-day retention and webhook support.

  • What are Mailtrap Skills?

    Reference files that give coding agents Mailtrap-specific context — API endpoints, authentication patterns, payload shapes, and common mistakes to avoid.  Drop Mailtrap Skills into your project and the agent writes working integrations on the first attempt.

  • Is Mailtrap free for agent projects?

    Mailtrap offers a free plan. Check pricing page for current limits and plan details.