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認証、すべての認証情報は環境変数で管理し、ハードコーディングは絶対に行わない
アーキテクチャ
┌──────────────┐ 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 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
Read, search, send, organize, draft and schedule email across your inboxes from any MCP client.
Shipmail MCP server for AI agent custom-domain email inboxes with REST API and webhooks.
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/dongjunke/ai-mail-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server