mailbox-mcp
mailbox
ローカル開発用のメールシンクです。マシン全体で1つのSMTPサーバーとHTTP APIを実行し、すべてのプロジェクトからそれを指すようにします。メールはデバイスから出ることはなく、代わりにWeb UI、CLI、AIエージェント用のMCPサーバーを備えた検査可能な受信トレイに届きます。
共有インスタンス1つでプロジェクトごとのポート衝突を排除します。一度起動すれば、多数のプロジェクトから接続できます。
インストール
pnpm add -D @sdk-e/mailbox # or npm i -D / yarn add -Dまたはアドホックに実行:
npx @sdk-e/mailboxクイックスタート
mailbox # SMTP on :11025, inbox UI on http://localhost:11090任意のアプリ(nodemailer、Resend開発モードなど)から smtp://127.0.0.1:11025 にメールを送信し、次に:
open http://localhost:11090 # or: mailbox-cli openバイナリ
Bin | 目的 |
| シンクを実行(SMTP + HTTP + 受信トレイUI) |
|
|
| MCPサーバー( |
CLIの例
mailbox-cli list
mailbox-cli read 3
mailbox-cli wait "verification code" --timeout 10 # blocks until a new matching message arrives
mailbox-cli clearwait は起動後に届いたメッセージのみを対象とします。送信をトリガーする前に起動してください。
ライブラリとしての利用
import { startMailbox } from "@sdk-e/mailbox";
const mailbox = await startMailbox({ smtpPort: 0, httpPort: 0 }); // 0 = ephemeral
console.log(mailbox.smtpPort, mailbox.url);
await mailbox.close();分離された使い捨ての受信トレイが必要な統合テストに最適です。
HTTP API(安定したワイヤープロトコル)
ルート | メソッド | レスポンス |
| GET |
|
| GET |
|
| GET | 上記のメッセージに加えて |
| DELETE |
|
| GET | 受信トレイUI |
設定
環境変数(作業ディレクトリにある .env.local、次に .env が存在する場合は読み込まれます):
変数 | デフォルト | 目的 |
|
| SMTPリッスンポート |
|
| HTTP API/UIポート |
| ポートから導出 | CLI/MCPがシンクに到達するために使用するベースURL |
|
| バインドインターフェース(デフォルトはループバック) |
ローカルではアプリのメーラーを smtp://127.0.0.1:$MAIL_SMTP_PORT に向けます。本番では実際のプロバイダーを使い続けてください。NODE_ENV=production の場合、サーバーは起動を拒否します。
なぜ高いポート番号なのか?
1025/1080(従来のMailHogスタイルのデフォルト)は頻繁に衝突します。mailboxは11025/11090をデフォルトにすることで、複数のSDK-Eプロジェクトが互いに、または他のローカルツールと衝突することなく、単一のインスタンスを共有できます。
開発
Node >= 20 と pnpm >= 11 が必要です。
pnpm install
pnpm verify # format, lint, typecheck, test, buildCONTRIBUTING.md を参照してください。
ライセンス
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 Connectors
Give an AI agent its own email address: send, reply, read, and wait for mail.
Email for AI agents — send, receive as a webhook, manage domains, templates, routing.
Hosted email MCP for AI agents with inboxes, send/receive, memory, recovery, and credits.
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/SDK-E/mailbox'
If you have feedback or need assistance with the MCP directory API, please join our Discord server