Skip to main content
Glama
Guascoign

Mail Notification MCP

by Guascoign

Mail Notification MCP

SMTP を介してプロジェクトの進捗状況や人による承認のメールを送信する MCP Server です。標準の stdio transport を使用しており、Codex、Claude Desktop、Cursor、VS Code などの MCP クライアントから呼び出すのに適しています。

提供されるツール

  • send_progress_update:プロジェクトの進捗・完了・ブロック状況の報告を送信します。

  • request_human_approval:人による承認/拒否が必要な事項を送信し、承認番号を生成します。

  • send_simple_email:通常のプレーンテキストまたは HTML メールを送信します。

  • send_custom_email:CC/BCC と添付ファイル付きのカスタムメールを送信します。

  • test_smtp_connection:SMTP 接続と認証をテストします。

  • test_imap_connection:IMAP 接続と認証をテストします。

  • read_replies:受信トレイの最新の返信を読み取ります。デフォルトでは既読にしません。

  • check_approval_status:承認番号に基づいて「承認」「拒否」「処理待ち」を判別します。

  • wait_for_approval:承認、拒否、またはタイムアウトまで、人からの返信をポーリングして待機します。

進捗ツールのデフォルトの受信者は config.json から取得されます。承認メールでは「承認」または「拒否」の返信を明示的に求めます。他のプロジェクトはSMTPを自分で実装する必要はなく、MCPツールを呼び出すだけで済みます。

Related MCP server: mcp-email-server

1. SMTP と送信先メールの設定

プロジェクトルートの config.json を編集します(テンプレートは config.example.json):

{
  "smtp": {
    "host": "smtp.gmail.com",
    "port": 587,
    "secure": false,
    "username": "你的发件邮箱@gmail.com",
    "password": "",
    "password_env": "MAIL_SMTP_PASSWORD",
    "from_email": "你的发件邮箱@gmail.com"
  },
  "imap": {
    "host": "imap.gmail.com",
    "port": 993,
    "secure": true,
    "username": "你的发件邮箱@gmail.com",
    "password": "",
    "password_env": "MAIL_SMTP_PASSWORD"
  },
  "notification": {
    "to": "目标收件邮箱@example.com",
    "subject_prefix": "[工程通知]",
    "project_name": "我的工程"
  }
}

パスワードはファイルに直接書き込むのではなく、環境変数に入れることをお勧めします:

$env:MAIL_SMTP_PASSWORD = "你的邮箱应用专用密码"

また smtp.password を直接記入することもできます。config.json.gitignore で無視されるため、リポジトリにコミットしないでください。

一般的な SMTP 設定:

メールサービス

host

port

secure

Gmail

smtp.gmail.com

587

false

Outlook

smtp-mail.outlook.com

587

false

QQ 邮箱

smtp.qq.com

587

false

163 邮箱

smtp.163.com

465

true

Gmail、QQ などでは通常、SMTP を有効にし、アプリ専用パスワードを使用する必要があります。Web ログイン用パスワードを直接使用できない場合は、メールサービスの要件に従って認証コード/アプリパスワードを生成してください。

IMAP は返信の読み取りに使用します。QQ 邮箱は通常 imap.qq.com:993 + SSL を使用します。imap.password を省略すると、SMTP のパスワード/認証コードを再利用します。環境変数は config.json を上書きします。IMAP_HOSTIMAP_PORTIMAP_SECUREIMAP_USERIMAP_PASSNOTIFY_TO も使用できます。

2. インストールとテスト

Python 3.11+ と uv が必要です。PowerShell で次を実行します:

cd C:\AI_Tools\Mail
uv sync --extra dev
uv run pytest
uv run python -m email_mcp_server.server

MCP の stdio モードでは、通常の文字を手動で入力しないでください。MCP クライアントから起動します。まず test_smtp_connectiontest_imap_connection を呼び出すことをお勧めします。

3. 他のプロジェクトと接続する

mcpServers 形式に対応したクライアントを例として、以下のサーバー項目をクライアント設定に統合します。Windows のパスは二重バックスラッシュを使用する必要があります:

{
  "mcpServers": {
    "mail-notification": {
      "command": "uv",
      "args": [
        "--directory",
        "C:\\AI_Tools\\Mail",
        "run",
        "python",
        "-m",
        "email_mcp_server.server"
      ]
    }
  }
}

uv がクライアントの PATH にない場合は、commanduv.exe の絶対パスに置き換えてください。MCP 設定を変更した後、クライアントを再起動します。

呼び出し例

進捗報告:

调用 send_progress_update:
project="订单系统"
status="进行中"
summary="已完成数据库迁移脚本,并通过本地测试"
details="迁移了 12 张表,新增回滚检查"
next_steps="部署到测试环境并等待接口联调"

人による承認:

调用 request_human_approval:
project="订单系统"
title="是否允许部署到生产环境"
request="请批准今晚 22:00 执行生产部署"
reason="测试环境已通过,预计需要 15 分钟,期间会短暂重启服务"
options="批准部署 / 延后到明天"
deadline="今天 21:30 前"

ツールは任意の to パラメータをサポートし、一度だけ受信者を上書きできます。省略時は config.jsonnotification.to が使用されます。

返信の読み取り:

调用 read_replies:
from_address="target@example.com"
subject_contains="Mail Notification MCP 测试邮件"
since_hours=72

承認の確認:

调用 check_approval_status:
approval_id="APR-ABC1234567"

承認ツールが返すステータスは approvedrejectedpending、または timeout です。デフォルトでは INBOX のみを読み取り、メールの既読状態を自動的に変更しません。

セキュリティ上の注意

  • メインのメールパスワードではなく、アプリ専用パスワードまたは認証コードを優先してください。

  • 実際のパスワードや実際の送信先メール設定を Git にコミットしないでください。

  • デフォルトはローカルの stdio です。HTTP モードは 127.0.0.1 のみにバインドします。

Install Server
A
license - permissive license
A
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (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 Servers

  • A
    license
    A
    quality
    B
    maintenance
    A multi-service email platform for MCP-compatible clients that supports standard email providers, transactional APIs, and local testing environments. It enables users to send and receive emails, monitor service health, and integrate with messaging webhooks like Slack and Discord through natural language commands.
    10
    2
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables reading and sending emails via IMAP and SMTP through the MCP protocol. Supports multiple email accounts and configuration via UI or environment variables.
    BSD 3-Clause
  • A
    license
    Not graded
    quality
    B
    maintenance
    MCP server that enables Claude Code agents to send and read emails via SMTP/IMAP with per-agent credential isolation and audit logging.
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Exposes any IMAP mailbox and SMTP relay as MCP tools, enabling email management (read, search, send, delete) through MCP-compatible agents.
    MIT

View all related MCP servers

Related MCP Connectors

  • Read, search, send, organize, draft and schedule email across your inboxes from any MCP client.

  • Fully-managed email as MCP tools - register domains, real mailboxes, send and receive mail.

  • 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/Guascoign/Mail_MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server