Mailtrap MCP Server

Integrates with Mailtrap Email API.

Local serverstdioTypeScript

What is the Mailtrap MCP server?

Mailtrap mcp server connects Mailtrap to AI assistants that speak the Model Context Protocol. Integrates with Mailtrap Email API.

What Mailtrap does

An MCP server that provides tools for sending and testing in sandbox via Mailtrap.

Installing the mailtrap mcp server

The server is distributed via npm as @smithery/cli, so most clients can run it without a manual build step. Add it to your MCP client's configuration and restart the client to pick it up — the copy-paste configs for Claude Desktop, Claude Code and Cursor are on this page.

Configuration

Before the server will start you need to supply 8 environment variables: MAILTRAP_API_TOKEN, DEFAULT_FROM_EMAIL, MAILTRAP_ACCOUNT_ID, MAILTRAP_TEST_INBOX_ID, ASDF_DIR, ASDF_DATA_DIR, ASDF_NODEJS_VERSION, MAILTRAP_SANDBOX_ID. Keep credentials in your client's env block or a secrets manager rather than committing them.

Requirements

Before using this MCP server, you need to: 1. Create a Mailtrap account 2. Verify your domain 3. Get your API token from Mailtrap API settings 4. Get your Account ID from Mailtrap account management Required Environment Variables: -

Where it fits

Communication servers earn their keep on volume — summarising channels and threads that would otherwise cost you an hour of scrollback. Mailtrap sits in that group. Worth comparing against the other communication servers in this directory before you commit to one, since several overlap in scope but differ sharply in setup cost and permissions.

Practical notes

  • This server runs locally, so it operates with whatever access your machine and its credentials already have. Scope that deliberately rather than by default.
  • It will not start until its required credentials are present, so set those before wondering why the tools never appear.
  • Written in TypeScript.
  • MCP clients ask for confirmation before each tool call by default. Keep that on while you learn what the mailtrap mcp server actually does with your data.
  • Every entry in this directory is reviewed by hand before it goes live, and details are checked against the project's own documentation.

How to install the Mailtrap MCP server

{
  "mcpServers": {
    "mailtrap": {
      "command": "npx",
      "args": ["-y", "@smithery/cli"],
      "env": {
        "MAILTRAP_API_TOKEN": "your-value",
        "DEFAULT_FROM_EMAIL": "your-value",
        "MAILTRAP_ACCOUNT_ID": "your-value",
        "MAILTRAP_TEST_INBOX_ID": "your-value",
        "ASDF_DIR": "your-value",
        "ASDF_DATA_DIR": "your-value",
        "ASDF_NODEJS_VERSION": "your-value",
        "MAILTRAP_SANDBOX_ID": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

Before using this MCP server, you need to: 1. Create a Mailtrap account 2. Verify your domain 3. Get your API token from Mailtrap API settings 4. Get your Account ID from Mailtrap account management Required Environment Variables: -

VariableDescriptionRequired
MAILTRAP_API_TOKENCredential the server authenticates with.Yes
DEFAULT_FROM_EMAILConfiguration value read at startup.Optional
MAILTRAP_ACCOUNT_IDConfiguration value read at startup.Optional
MAILTRAP_TEST_INBOX_IDConfiguration value read at startup.Optional
ASDF_DIRFilesystem location the server is allowed to use.Optional
ASDF_DATA_DIRFilesystem location the server is allowed to use.Optional
ASDF_NODEJS_VERSIONConfiguration value read at startup.Optional
MAILTRAP_SANDBOX_IDConfiguration value read at startup.Optional

Frequently asked questions

It connects Mailtrap to MCP-compatible AI assistants such as Claude and Cursor. Instead of copying data back and forth by hand, the assistant works with Mailtrap directly.