mcpj-mailtrap
Provides tools for interacting with Mailtrap's API, enabling analytics, email logs, sending transactional and bulk emails, managing templates, contacts, sandbox testing, domains, and account settings.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcpj-mailtrapsend a test email to my sandbox inbox"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Quick Start
1. Get Your API Token
Get an API token from Mailtrap API Tokens.
2. Add to Claude Code
Minimal
claude mcp add mailtrap -e MAILTRAP_API_TOKEN=your_token -- npx mcpj-mailtrapFull
claude mcp add mailtrap \
-e MAILTRAP_API_TOKEN=your_token \
-e MAILTRAP_SENDING_TOKEN=your_sending_token \
-e MAILTRAP_ACCOUNT_ID=12345 \
-e MAILTRAP_DEFAULT_FROM_EMAIL=noreply@yourdomain.com \
-e MAILTRAP_TEST_INBOX_ID=12345 \
-- npx mcpj-mailtrapThat's it. Restart Claude Code and the tools are available.
Also works with
bunx mcpj-mailtrap@latestif you have Bun. Requires Node 18+ when running vianpx.
Claude Desktop / Cursor
Minimal
{
"mcpServers": {
"mailtrap": {
"command": "npx",
"args": ["-y", "mcpj-mailtrap@latest"],
"env": {
"MAILTRAP_API_TOKEN": "your_token"
}
}
}
}Full
{
"mcpServers": {
"mailtrap": {
"command": "npx",
"args": ["-y", "mcpj-mailtrap@latest"],
"env": {
"MAILTRAP_API_TOKEN": "your_token",
"MAILTRAP_SENDING_TOKEN": "your_sending_token",
"MAILTRAP_ACCOUNT_ID": "12345",
"MAILTRAP_DEFAULT_FROM_EMAIL": "noreply@yourdomain.com",
"MAILTRAP_TEST_INBOX_ID": "12345"
}
}
}
}Download a pre-built binary from Releases:
Platform | File |
macOS (Apple Silicon) |
|
macOS (Intel) |
|
Linux |
|
Windows |
|
macOS / Linux:
curl -Lo mcpj-mailtrap https://github.com/pijusz/mcp-mailtrap/releases/latest/download/mcpj-mailtrap-darwin-arm64
chmod +x mcpj-mailtrap
sudo mv mcpj-mailtrap /usr/local/bin/
claude mcp add mailtrap -e MAILTRAP_API_TOKEN=your_token -- /usr/local/bin/mcpj-mailtrapWindows (PowerShell):
Invoke-WebRequest -Uri "https://github.com/pijusz/mcp-mailtrap/releases/latest/download/mcpj-mailtrap-windows-x64.exe" -OutFile "$env:LOCALAPPDATA\mcpj-mailtrap.exe"
claude mcp add mailtrap -e MAILTRAP_API_TOKEN=your_token -- "%LOCALAPPDATA%\mcpj-mailtrap.exe"Related MCP server: GetMailer MCP Server
Tools (48)
Analytics
Tool | Description |
| Sending statistics — delivery, bounce, open, click, spam rates. Group by domain, category, ESP, or date |
Email Logs
Tool | Description |
| List sent emails with filtering by status, stream, date. Cursor-based pagination |
| Single message detail with delivery events timeline |
| List suppressed emails (bounces, spam complaints, unsubscribes) |
| Re-enable sending to a suppressed address |
| Find suppressed emails that still exist in contact lists and suggest exact cleanup actions |
Sending
Tool | Description |
| Send via transactional or bulk stream. Supports HTML, text, or templates |
| Send up to 500 emails in one request |
| Send to a sandbox inbox for testing, with optional env defaults for inbox and sender |
Templates
Tool | Description |
| List all email templates |
| Get template details including HTML/text body |
| Create a new template |
| Update an existing template |
| Delete a template |
| Render a react-email component file ( |
Contacts
Tool | Description |
| Create a contact with email, custom fields, list membership |
| Get contact by UUID or email |
| Update contact fields, list membership, subscription status |
| Delete a contact |
| Trigger automations for a contact |
| List all contact lists |
| Get a single contact list |
| Create a new contact list |
| Rename a contact list |
| Delete a contact list |
| List, get, create, update, or delete custom contact fields |
| Bulk import up to 50k contacts, or check import status |
| Start contact export or check export status |
Email Sandbox
Tool | Description |
| List sandbox projects with inboxes |
| Get a single project |
| Create, update, or delete a project |
| List all sandbox inboxes |
| Get inbox details (credentials redacted by default) |
| Create, update, clean, mark read, reset credentials, or delete |
| List messages in a sandbox inbox |
| Get message body in HTML/text/raw/EML format, with optional attachments |
| Combined spam score + HTML analysis + headers report |
| Forward a test message to an email |
Domains
Tool | Description |
| List sending domains with DNS status |
| Get domain details including DNS records |
| Create or delete a sending domain |
| Email DNS setup instructions to a colleague |
Accounts
Tool | Description |
| List accounts or get one by ID |
| Plan limits and current usage |
| List, remove, update permissions, view resources |
| List, get, create, delete, or reset API tokens |
Configuration
Variable | Required | Default | Description |
| Yes | — | General API token from mailtrap.io/api-tokens |
| No |
| Separate token for transactional and bulk |
| No | auto-discovered | Default account ID |
| No | — | Default sender email for |
| No | — | Default sandbox inbox ID for |
| No | — | Enable debug logging |
Updates
Using npx @latest (recommended): You always get the latest version — no manual updates needed.
Using a binary: The server checks for new releases on startup and logs to stderr if outdated:
[mcpj-mailtrap] Update available: v0.2.0 (current: v0.1.0)Check your installed version:
mcpj-mailtrap --versionDevelopment
Requires Bun.
git clone https://github.com/pijusz/mcp-mailtrap.git
cd mcp-mailtrap
bun install
bun test # tests
bun run build # standalone binary
bun run inspect # MCP Inspector
bun run check # biome format + lintLicense
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityAmaintenanceIntegrates with Mailtrap Email Platform to enable sending transactional emails via API.833264MIT
- AlicenseAqualityDmaintenanceEnables sending transactional emails through GetMailer from AI assistants. Supports email operations, template management, domain verification, analytics, suppression lists, and batch email jobs.1410MIT
- FlicenseBqualityDmaintenanceEnables AI assistants to interact with the Inbound Email API to manage domains, endpoints, and email communications. Users can send or schedule emails, manage webhooks, and retrieve email threads through natural language commands.142
- AlicenseBqualityDmaintenanceEnables interaction with Mailosaur email and SMS testing services, allowing message management, server configuration, file downloads, spam analysis, and TOTP code retrieval via natural language.29MIT
Related MCP Connectors
AI email inbox and sending tools with attachments, search, live events, and webhooks.
Email for AI agents: send mail, manage contacts, automations & webhooks. Zero-DNS first send.
Email for AI agents — send, receive as a webhook, manage domains, templates, routing.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/pijusz/mcp-mailtrap'
If you have feedback or need assistance with the MCP directory API, please join our Discord server