ai-mail-mcp
ai-mail-mcp
プライベートドメインメールを任意のMCPクライアントに接続するメールサービス。送信(個人署名・ブランド紹介ページリンクの自動追加)、受信、メール本文の読み取り、接続テストをサポート。
WorkBuddy、Claude Desktop、Cursorなど、MCPプロトコルをサポートするすべてのツールと互換性があります。クラウドデプロイにより、WorkBuddyのPC版とモバイル版で同じメールインボックスを共有でき、いつでもどこでも自然言語でメール業務を処理できます。
特徴
✉️
send_email:メールを送信し、「xxがxxから自動送信」という個人署名(紹介ページリンク付き、個人IPの入り口として利用可能)を自動追加📥
get_recent_emails:最近N日間のメール一覧(件名/送信者/日時)を取得📖
get_email_content:UIDごとにメールの本文と添付ファイル情報を完全に読み取り🔌
test_email_connection:SMTP/IMAP接続をワンクリックでテスト🚀 2つの転送方式:stdio(ローカルデバッグ)/ SSE(クラウドリモートデプロイ)
🔐 エンドポイントBearer Token認証、すべての認証情報は環境変数で管理し、ハードコーディングは絶対に行わない
Related MCP server: io.github.p-w-4-z/inbox-mcp
アーキテクチャ
┌──────────────┐ HTTPS + Bearer ┌──────────────────┐ SMTP/IMAP ┌──────────────┐
│ WorkBuddy │ ─────────────────▶ │ ai-mail-mcp │ ────────────▶ │ 你的域名邮箱 │
│ 桌面端 / 移动端 │ │ (云端 MCP Server) │ │ you@your.com │
└──────────────┘ └──────────────────┘ └──────────────┘クラウドデプロイが鍵です:1つのHTTPSエンドポイントで、デスクトップ版もモバイル版も接続可能で、ローカルPCの電源を入れておく必要はありません。
クイックスタート
1. 環境変数の設定
cp .env.example .env
# 编辑 .env,填入你的邮箱账号、授权码、SMTP/IMAP 地址、Bearer Token2A. ローカルデバッグ(stdio)
npm install
MCP_TRANSPORT=stdio node server.js2B. クラウドデプロイ(SSE、推奨)
パブリックIPのサーバーとドメイン(HTTPS)が必要です。
cp .env.example .env # 在服务器上填写真实配置
docker compose up -dさらに、nginxリバースプロキシ + acme.sh/certbotでHTTPS証明書を取得し(docker-compose.yml内にコメント例あり)、
https://mcp.your-domain.com/mail-mcp/sseのようなエンドポイントを用意します。
3. WorkBuddyへの接続(カスタムコネクタ)
~/.workbuddy/mcp.jsonを編集:
{
"mcpServers": {
"ai-mail-mcp": {
"type": "sse",
"url": "https://mcp.your-domain.com/mail-mcp/sse",
"headers": {
"Authorization": "Bearer 你的随机Token"
}
}
}
}WorkBuddyのコネクタ管理ページでそのコネクタをTrust/有効化してセッションを再起動すると、会話内で以下の操作が可能になります:
「xxにメールを送信、件名…、本文…」
「最近3日間のメールを確認して、返信が必要なものをまとめて」
「毎朝9時に昨日のメールまとめを自分のメールに送信して」
ツール一覧
ツール | 説明 | 主要パラメーター |
| メール送信(署名自動追加) |
|
| 最近のメール一覧 |
|
| メール全文の読み取り |
|
| SMTP/IMAPのテスト | なし |
セキュリティに関する注意
MCP_BEARER_TOKENは十分にランダムな長い文字列(openssl rand -hex 32で生成)に設定し、適切に管理してください.envや実際の認証情報はいかなるリポジトリにもコミットしないでください;このドキュメントのリポジトリには.env.exampleのみコミットしますメールには独立したアカウント+最小権限(送受信のみ、削除/管理権限なし)を使用することを推奨します
セルフホスティングにより、メールデータはすべて自サーバーに保持され、第三者に送信されることはありません
ライセンス
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Email infrastructure for AI agents — send, receive, search, and reply to email over MCP.
Real email inboxes for AI agents: register, receive, read and send mail over MCP. Free to receive.
Email inboxes for AI agents: send, receive, reply, search, and manage threaded email over MCP.
Hosted email for AI agents: create inboxes, send, receive, and reply over MCP with scoped API keys
Related MCP Servers
- AlicenseBqualityBmaintenanceAn MCP service that enables AI to fully manage email accounts, supporting sending emails with attachments and multiple recipients across various email providers.71,018 npm92MIT
- AlicenseAqualityDmaintenanceProvider-agnostic email MCP server that connects any IMAP mailbox to AI assistants, enabling email management through natural language.8AGPL 3.0
- AlicenseBqualityBmaintenanceEnables users to manage email accounts via IMAP/SMTP, including reading, searching, sending emails with attachments and calendar invites, all through natural language interactions with MCP-compatible clients.132 PyPI4MIT
- AlicenseNot gradedqualityFmaintenanceAn MCP server that receives emails on your domain and allows AI assistants to search, read, and manage them via natural language queries.1,306 npmMIT