{
  "markdown": "<p align=\"center\">\n  <img src=\"logo.svg\" alt=\"mcpj-mailtrap\" width=\"280\" />\n</p>\n\n<h1 align=\"center\">mcpj-mailtrap</h1>\n\n<p align=\"center\">\n  Mailtrap MCP server — analytics, email logs, contacts, sandbox testing & more via natural language.\n  <br/>\n  Built with Bun + TypeScript. Works with Claude, Cursor, and any MCP client.\n</p>\n\n---\n\n## Quick Start\n\n### 1. Get Your API Token\n\nGet an API token from [Mailtrap API Tokens](https://mailtrap.io/api-tokens).\n\n### 2. Add to Claude Code\n\n**Minimal**\n\n```bash\nclaude mcp add mailtrap -e MAILTRAP_API_TOKEN=your_token -- npx mcpj-mailtrap\n```\n\n**Full**\n\n```bash\nclaude mcp add mailtrap \\\n  -e MAILTRAP_API_TOKEN=your_token \\\n  -e MAILTRAP_SENDING_TOKEN=your_sending_token \\\n  -e MAILTRAP_ACCOUNT_ID=12345 \\\n  -e MAILTRAP_DEFAULT_FROM_EMAIL=noreply@yourdomain.com \\\n  -e MAILTRAP_TEST_INBOX_ID=12345 \\\n  -- npx mcpj-mailtrap\n```\n\nThat's it. Restart Claude Code and the tools are available.\n\n> Also works with `bunx mcpj-mailtrap@latest` if you have [Bun](https://bun.sh/).\n> Requires Node 18+ when running via `npx`.\n\n### Claude Desktop / Cursor\n\n**Minimal**\n\n```json\n{\n  \"mcpServers\": {\n    \"mailtrap\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"mcpj-mailtrap@latest\"],\n      \"env\": {\n        \"MAILTRAP_API_TOKEN\": \"your_token\"\n      }\n    }\n  }\n}\n```\n\n**Full**\n\n```json\n{\n  \"mcpServers\": {\n    \"mailtrap\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"mcpj-mailtrap@latest\"],\n      \"env\": {\n        \"MAILTRAP_API_TOKEN\": \"your_token\",\n        \"MAILTRAP_SENDING_TOKEN\": \"your_sending_token\",\n        \"MAILTRAP_ACCOUNT_ID\": \"12345\",\n        \"MAILTRAP_DEFAULT_FROM_EMAIL\": \"noreply@yourdomain.com\",\n        \"MAILTRAP_TEST_INBOX_ID\": \"12345\"\n      }\n    }\n  }\n}\n```\n\n<details>\n<summary>Alternative: standalone binary</summary>\n\nDownload a pre-built binary from [Releases](https://github.com/pijusz/mcp-mailtrap/releases):\n\n| Platform | File |\n|----------|------|\n| macOS (Apple Silicon) | `mcpj-mailtrap-darwin-arm64` |\n| macOS (Intel) | `mcpj-mailtrap-darwin-x64` |\n| Linux | `mcpj-mailtrap-linux-x64` |\n| Windows | `mcpj-mailtrap-windows-x64.exe` |\n\n**macOS / Linux:**\n\n```bash\ncurl -Lo mcpj-mailtrap https://github.com/pijusz/mcp-mailtrap/releases/latest/download/mcpj-mailtrap-darwin-arm64\nchmod +x mcpj-mailtrap\nsudo mv mcpj-mailtrap /usr/local/bin/\nclaude mcp add mailtrap -e MAILTRAP_API_TOKEN=your_token -- /usr/local/bin/mcpj-mailtrap\n```\n\n**Windows (PowerShell):**\n\n```powershell\nInvoke-WebRequest -Uri \"https://github.com/pijusz/mcp-mailtrap/releases/latest/download/mcpj-mailtrap-windows-x64.exe\" -OutFile \"$env:LOCALAPPDATA\\mcpj-mailtrap.exe\"\nclaude mcp add mailtrap -e MAILTRAP_API_TOKEN=your_token -- \"%LOCALAPPDATA%\\mcpj-mailtrap.exe\"\n```\n\n</details>\n\n## Tools (48)\n\n### Analytics\n| Tool | Description |\n|------|-------------|\n| `get_stats` | Sending statistics — delivery, bounce, open, click, spam rates. Group by domain, category, ESP, or date |\n\n### Email Logs\n| Tool | Description |\n|------|-------------|\n| `get_email_logs` | List sent emails with filtering by status, stream, date. Cursor-based pagination |\n| `get_email_log` | Single message detail with delivery events timeline |\n| `get_suppressions` | List suppressed emails (bounces, spam complaints, unsubscribes) |\n| `delete_suppression` | Re-enable sending to a suppressed address |\n| `check_list_hygiene` | Find suppressed emails that still exist in contact lists and suggest exact cleanup actions |\n\n### Sending\n| Tool | Description |\n|------|-------------|\n| `send_email` | Send via transactional or bulk stream. Supports HTML, text, or templates |\n| `batch_send` | Send up to 500 emails in one request |\n| `send_test_email` | Send to a sandbox inbox for testing, with optional env defaults for inbox and sender |\n\n### Templates\n| Tool | Description |\n|------|-------------|\n| `list_templates` | List all email templates |\n| `get_template` | Get template details including HTML/text body |\n| `create_template` | Create a new template |\n| `update_template` | Update an existing template |\n| `delete_template` | Delete a template |\n| `render_react_email` | Render a react-email component file (`.tsx`, `.jsx`, `.js`, `.mjs`) to HTML + plain text |\n\n### Contacts\n| Tool | Description |\n|------|-------------|\n| `create_contact` | Create a contact with email, custom fields, list membership |\n| `get_contact` | Get contact by UUID or email |\n| `update_contact` | Update contact fields, list membership, subscription status |\n| `delete_contact` | Delete a contact |\n| `trigger_contact_event` | Trigger automations for a contact |\n| `list_contact_lists` | List all contact lists |\n| `get_contact_list` | Get a single contact list |\n| `create_contact_list` | Create a new contact list |\n| `update_contact_list` | Rename a contact list |\n| `delete_contact_list` | Delete a contact list |\n| `manage_contact_field` | List, get, create, update, or delete custom contact fields |\n| `import_contacts` | Bulk import up to 50k contacts, or check import status |\n| `export_contacts` | Start contact export or check export status |\n\n### Email Sandbox\n| Tool | Description |\n|------|-------------|\n| `list_projects` | List sandbox projects with inboxes |\n| `get_project` | Get a single project |\n| `manage_project` | Create, update, or delete a project |\n| `list_inboxes` | List all sandbox inboxes |\n| `get_inbox` | Get inbox details (credentials redacted by default) |\n| `manage_inbox` | Create, update, clean, mark read, reset credentials, or delete |\n| `get_messages` | List messages in a sandbox inbox |\n| `get_message` | Get message body in HTML/text/raw/EML format, with optional attachments |\n| `analyze_message` | Combined spam score + HTML analysis + headers report |\n| `forward_message` | Forward a test message to an email |\n\n### Domains\n| Tool | Description |\n|------|-------------|\n| `list_domains` | List sending domains with DNS status |\n| `get_domain` | Get domain details including DNS records |\n| `manage_domain` | Create or delete a sending domain |\n| `send_domain_setup_instructions` | Email DNS setup instructions to a colleague |\n\n### Accounts\n| Tool | Description |\n|------|-------------|\n| `list_accounts` | List accounts or get one by ID |\n| `get_billing_usage` | Plan limits and current usage |\n| `manage_account_access` | List, remove, update permissions, view resources |\n| `manage_api_token` | List, get, create, delete, or reset API tokens |\n\n## Configuration\n\n| Variable | Required | Default | Description |\n|----------|----------|---------|-------------|\n| `MAILTRAP_API_TOKEN` | Yes | — | General API token from [mailtrap.io/api-tokens](https://mailtrap.io/api-tokens) |\n| `MAILTRAP_SENDING_TOKEN` | No | `MAILTRAP_API_TOKEN` | Separate token for transactional and bulk `send.api` requests |\n| `MAILTRAP_ACCOUNT_ID` | No | auto-discovered | Default account ID |\n| `MAILTRAP_DEFAULT_FROM_EMAIL` | No | — | Default sender email for `send_email` / `send_test_email` |\n| `MAILTRAP_TEST_INBOX_ID` | No | — | Default sandbox inbox ID for `send_test_email` |\n| `DEBUG` | No | — | Enable debug logging |\n\n## Updates\n\n**Using `npx @latest`** (recommended): You always get the latest version — no manual updates needed.\n\n**Using a binary**: The server checks for new releases on startup and logs to stderr if outdated:\n\n```\n[mcpj-mailtrap] Update available: v0.2.0 (current: v0.1.0)\n```\n\nCheck your installed version:\n\n```bash\nmcpj-mailtrap --version\n```\n\n## Development\n\nRequires [Bun](https://bun.sh/).\n\n```bash\ngit clone https://github.com/pijusz/mcp-mailtrap.git\ncd mcp-mailtrap\nbun install\nbun test           # tests\nbun run build      # standalone binary\nbun run inspect    # MCP Inspector\nbun run check      # biome format + lint\n```\n\n## License\n\nMIT\n",
  "bytes": 7698,
  "sha": "2b75e5cd74603b9fed0c688115996fb1637be2087c21135a2f5b5396c11e51be",
  "repo_slug": "pijusz/mcp-mailtrap",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_pijusz_mcp_mailtrap_5d77a95d/readme"
}