Skip to main content
Glama
SDK-E

mailbox-mcp

by SDK-E

mailbox

CI npm license

ローカル開発用のメールシンクです。マシン全体で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

目的

mailbox

シンクを実行(SMTP + HTTP + 受信トレイUI)

mailbox-cli

listread <id>wait [match] [--timeout s]clearhealthopen

mailbox-mcp

MCPサーバー(list_emailsread_emailclear_emailswait_for_email

CLIの例

mailbox-cli list
mailbox-cli read 3
mailbox-cli wait "verification code" --timeout 10   # blocks until a new matching message arrives
mailbox-cli clear

wait は起動に届いたメッセージのみを対象とします。送信をトリガーする前に起動してください。

ライブラリとしての利用

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(安定したワイヤープロトコル)

ルート

メソッド

レスポンス

/api/health

GET

{ ok, smtpPort, httpUrl, messageCount }

/api/email

GET

{ id, receivedAt, from, to, subject, text, html } の配列

/api/email/:id

GET

上記のメッセージに加えて raw ソース。存在しない場合は 404 {"error": …}

/api/email/all

DELETE

{ ok: true, messageCount: 0 }

/

GET

受信トレイUI

設定

環境変数(作業ディレクトリにある .env.local、次に .env が存在する場合は読み込まれます):

変数

デフォルト

目的

MAIL_SMTP_PORT

11025

SMTPリッスンポート

MAIL_HTTP_PORT

11090

HTTP API/UIポート

MAIL_HTTP_URL

ポートから導出

CLI/MCPがシンクに到達するために使用するベースURL

MAILBOX_HOST

127.0.0.1

バインドインターフェース(デフォルトはループバック)

ローカルではアプリのメーラーを 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, build

CONTRIBUTING.md を参照してください。

ライセンス

MIT

-
license - not tested
Not graded
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
1Releases (12mo)
Commit activity

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.

View all MCP Connectors

Latest Blog Posts

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