AI Onboarding

Easy-to-follow documentation to onboard your AI agent to Mailtrap.

Building with AI? Mailtrap provides several resources to make your life easier:

Email API/SMTPEmail SandboxEmail Marketing

Getting started

Before you start, keep in mind that we require a human to:

Mailtrap MCP server

With the Mailtrap MCP server, you can perform various email operations through your favorite AI IDE (e.g., VS Code, Cursor, etc.) or your AI assistant (e.g., Claude). Some of the use cases include sending transactional emails, testing emails in your sandbox, managing templates, getting sending statistics, and more.

The Mailtrap MCP server is implemented as a Node.js command line utility and comes with quick-install buttons and pre-made code snippets for easy installation:

{
  "mcpServers": {
    "mailtrap": {
      "command": "npx",
      "args": ["-y", "mcp-mailtrap"],
      "env": {
        "MAILTRAP_API_TOKEN": "your_mailtrap_api_token",
        "DEFAULT_FROM_EMAIL": "[email protected]",
        "MAILTRAP_ACCOUNT_ID": "your_account_id",
        "MAILTRAP_TEST_INBOX_ID": "your_test_inbox_id"
      }
    }
  }
}
Mailtrap MCP Server

Mailtrap docs for agents

To give your agent more context regarding Mailtrap you can share the following docs:

Markdown

To fetch a markdown version of any page from Mailtrap documentation, simply add .md to the end of the page URL. For instance:

AI onboarding documentation https://docs.mailtrap.io/getting-started/ai-onboarding.md

Full llms.txt

Or, you can also give your agent to all of our docs in a single llms.txt file:

Full Mailtrap documentation https://docs.mailtrap.io/llms-full.txt

Mailtrap CLI app

With Mailtrap’s CLI app, you can send emails, inspect sandbox, monitor deliverability stats, and administer domains, templates, contacts, and more – all from your terminal.

To install, you can download the latest release from GitHub Releases and add it to your PATH, or use either Homebrew:

or Go:

Here’s some examples:

Mailtrap skills

Mailtrap skills allow you to give your AI coding assistant accurate Mailtrap context for tasks such as sending emails, testing with sandbox, using email templates, setting up a sending domain, and managing contacts.

To install, simply copy the skills folders into the directory your agent reads. For example, for Cursor, that’s .cursor/skills/. Or, you can install via npx:

And here's a table with each skill and a brief description

Skill
Description

Use when integrating, configuring, or troubleshooting Mailtrap (Email API or SMTP).

Use when capturing outbound email in development or staging in a fake inbox.

Use when creating, managing, and sending Mailtrap-hosted email templates.

Use when adding or verifying a Mailtrap sending domain.

Use when using Mailtrap Contacts API or UI to add, update, bulk import, list, segment marketing contacts, custom fields, or custom events.

Last updated

Was this helpful?