Mcp Mailtrap

io.github.pijusz由 GitHub 帳號 pijusz 發布v0.1.4更新於 Oct 27, 2026

MCP server for the Mailtrap email platform — analytics, sending, contacts, sandbox

概覽

AI 產生的概覽

Mailtrap 郵件平台的 MCP 伺服器,讓助理寄送郵件、查看日誌與統計、管理聯絡人、範本、網域和沙箱收件匣。

可以做什麼
  • 寄送交易性、批次或沙箱測試郵件,單次批次最多 500 封
  • 讀取寄送統計與郵件日誌,查看投遞事件,列出並刪除抑制項目,檢查名單衛生
  • 建立、讀取、更新和刪除郵件範本,並將 react-email 元件檔案轉譯為 HTML 和純文字
  • 管理聯絡人、聯絡人名單、自訂欄位、批次匯入匯出,並觸發聯絡人自動化
  • 操作沙箱專案與收件匣:列出郵件、以 HTML/文字/原始/EML 讀取內文、分析垃圾郵件評分與郵件標頭、轉寄郵件
  • 查看寄件網域與 DNS 記錄、帳戶與帳單用量,並管理 API 權杖和帳戶權限
適用情境
當你使用 Mailtrap 處理交易性或行銷郵件,希望助理起草並寄送郵件、排查投遞問題、清理聯絡人名單,或在上線前於沙箱中測試郵件時適用。
執行需求
透過 npx(Node 18+)或預先建置的執行檔在本機執行。需要 MAILTRAP_API_TOKEN 中的 Mailtrap API 權杖;選用 MAILTRAP_SENDING_TOKEN、MAILTRAP_ACCOUNT_ID、MAILTRAP_DEFAULT_FROM_EMAIL、MAILTRAP_TEST_INBOX_ID 和 DEBUG。需要連線至 Mailtrap API 的網路存取。
安裝前請注意
此權杖可廣泛存取 Mailtrap 帳戶,包括寄送真實郵件以及管理 API 權杖和帳戶權限。許多工具會寫入或刪除資料:寄送、批次寄送、刪除範本和聯絡人、刪除抑制項目、清理收件匣和重設憑證。寄送會消耗方案額度,帳單用量也可見。請限制權杖權限,並在核准寄送或刪除動作前先確認。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Mcp Mailtrap,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

[mcpj-mailtrap]

mcpj-mailtrap

Mailtrap MCP server — analytics, email logs, contacts, sandbox testing & more via natural language.
Built with Bun + TypeScript. Works with Claude, Cursor, and any MCP client.


Quick Start

1. Get Your API Token

Get an API token from Mailtrap API Tokens.

2. Add to Claude Code

Minimal

bash
claude mcp add mailtrap -e MAILTRAP_API_TOKEN=your_token -- npx mcpj-mailtrap

Full

bash
claude mcp add mailtrap \  -e MAILTRAP_API_TOKEN=your_token \  -e MAILTRAP_SENDING_TOKEN=your_sending_token \  -e MAILTRAP_ACCOUNT_ID=12345 \  -e [email protected] \  -e MAILTRAP_TEST_INBOX_ID=12345 \  -- npx mcpj-mailtrap

That's it. Restart Claude Code and the tools are available.

Also works with bunx mcpj-mailtrap@latest if you have Bun. Requires Node 18+ when running via npx.

Claude Desktop / Cursor

Minimal

json
{  "mcpServers": {    "mailtrap": {      "command": "npx",      "args": ["-y", "mcpj-mailtrap@latest"],      "env": {        "MAILTRAP_API_TOKEN": "your_token"      }    }  }}

Full

json
{  "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": "[email protected]",        "MAILTRAP_TEST_INBOX_ID": "12345"      }    }  }}
Alternative: standalone binary

Download a pre-built binary from Releases:

PlatformFile
macOS (Apple Silicon)mcpj-mailtrap-darwin-arm64
macOS (Intel)mcpj-mailtrap-darwin-x64
Linuxmcpj-mailtrap-linux-x64
Windowsmcpj-mailtrap-windows-x64.exe

macOS / Linux:

bash
curl -Lo mcpj-mailtrap https://github.com/pijusz/mcp-mailtrap/releases/latest/download/mcpj-mailtrap-darwin-arm64chmod +x mcpj-mailtrapsudo mv mcpj-mailtrap /usr/local/bin/claude mcp add mailtrap -e MAILTRAP_API_TOKEN=your_token -- /usr/local/bin/mcpj-mailtrap

Windows (PowerShell):

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"

Tools (46)

Analytics

ToolDescription
get_statsSending statistics — delivery, bounce, open, click, spam rates. Group by domain, category, ESP, or date

Email Logs

ToolDescription
get_email_logsList sent emails filtered by status, stream, date range, recipient, sender, subject, or category. Cursor-based pagination
get_email_logSingle message detail with delivery events timeline
get_suppressionsList suppressed emails (bounces, spam complaints, unsubscribes) with the IDs delete_suppression needs
delete_suppressionRe-enable sending to a suppressed address
check_list_hygieneFind suppressed emails that still exist in contact lists and suggest exact cleanup actions

Sending

ToolDescription
send_emailSend via transactional or bulk stream. Supports HTML, text, or templates
batch_sendSend up to 500 emails in one request
send_test_emailSend to a sandbox inbox for testing, with optional env defaults for inbox and sender

Templates

ToolDescription
list_templatesList all email templates
get_templateGet template details including HTML/text body
create_templateCreate a new template
update_templateUpdate an existing template
delete_templateDelete a template
render_react_emailRender a react-email component file (.tsx, .jsx, .js, .mjs) to HTML + plain text

Contacts

ToolDescription
create_contactCreate a contact with email, custom fields, list membership
get_contactGet contact by UUID or email
update_contactUpdate contact fields, list membership, subscription status
delete_contactDelete a contact
trigger_contact_eventTrigger automations for a contact
list_contact_listsList all contact lists
get_contact_listGet a single contact list
create_contact_listCreate a new contact list
update_contact_listRename a contact list
delete_contact_listDelete a contact list
manage_contact_fieldList, get, create, update, or delete custom contact fields
import_contactsBulk import up to 50k contacts, or check import status
export_contactsStart contact export or check export status

Email Sandbox

ToolDescription
list_projectsList sandbox projects with inboxes
get_projectGet a single project
manage_projectCreate, update, or delete a project
list_inboxesList all sandbox inboxes
get_inboxGet inbox details (credentials redacted by default)
manage_inboxCreate, update, clean, mark read, reset credentials, or delete
get_messagesList messages in a sandbox inbox
get_messageGet message body in HTML/text/raw/EML format, with optional attachments
analyze_messageCombined spam score + HTML analysis + headers report
forward_messageForward a test message to an email

Domains

ToolDescription
list_domainsList sending domains with DNS status
get_domainGet domain details including DNS records
manage_domainCreate or delete a sending domain
send_domain_setup_instructionsEmail DNS setup instructions to a colleague

Accounts

ToolDescription
list_accountsList accounts or get one by ID
get_billing_usagePlan limits and current usage
manage_account_accessList, remove, update permissions, view resources
manage_api_tokenList, get, create, delete, or reset API tokens

Configuration

VariableRequiredDefaultDescription
MAILTRAP_API_TOKENYes—General API token from mailtrap.io/api-tokens
MAILTRAP_SENDING_TOKENNoMAILTRAP_API_TOKENSeparate token for transactional and bulk send.api requests
MAILTRAP_ACCOUNT_IDNoauto-discoveredDefault account ID
MAILTRAP_DEFAULT_FROM_EMAILNo—Default sender email for send_email / send_test_email
MAILTRAP_TEST_INBOX_IDNo—Default sandbox inbox ID for send_test_email
DEBUGNo—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:

bash
mcpj-mailtrap --version

Development

Requires Bun.

bash
git clone https://github.com/pijusz/mcp-mailtrap.gitcd mcp-mailtrapbun installbun test           # testsbun run typecheck  # tscbun run build      # standalone binarybun run inspect    # MCP Inspectorbun run check      # biome format + lint

License

MIT

來源:README.md,提交 37aa2c0

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.4最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分