Email for AI Agents
Google Antigravity
VS Code
Cursor
Windsurf
Augment Code
Let us know you need this integration, and we’ll do our best to make it happen.
Request integrationGive 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
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.
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.
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.
Compliance guardrails
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.