Skip to main content
Glama
Shy2593666979

MCP Email Server

MCP メールサーバー

電子メール機能を提供するモデルコンテキストプロトコルサーバー。このサーバーにより、LLMは電子メールの作成と送信、および指定されたディレクトリ内の添付ファイルの検索が可能になります。 1742711978001

1742712768132

特徴

  • 複数の受信者にメールを送信する

  • メール添付ファイルのサポート

  • パターンマッチングに基づいてディレクトリ内のファイルを検索する

  • SMTPを使用した安全な電子メール送信

利用可能なツール

  • send_email - 指定された件名、本文、受信者に基づいてメールを送信します。

    • receiver (文字列の配列、必須): 受信者のメールアドレスのリスト

    • body (文字列、必須): メールの本文

    • subject (文字列、必須): メールの件名

    • attachments (文字列の配列または文字列、オプション): メールの添付ファイル(ファイル名)

  • search_attachments - 指定されたディレクトリ内で、指定されたパターンに一致するファイルを検索します。

    • pattern (文字列、必須): ファイル名で検索するテキストパターン

プロンプト

  • メールを送信

    • オプションの添付ファイル付きのメールを送信する

    • 引数:

      • receiver (必須): 受信者のメールアドレスのリスト

      • body (必須): メールのメインコンテンツ

      • subject (必須): メールの件名

      • attachments (オプション): メールの添付ファイル

  • 検索添付ファイル

    • パターンに一致するファイルを検索する

    • 引数:

      • pattern (必須): ファイル名で検索するテキストパターン

Related MCP server: MCP Mail Server

インストール

pipの使用

必要な依存関係をインストールします。

pip install pydantic python-dotenv

メール設定

SMTP サーバー構成を含むemail.jsonファイル:

[
  {
    "domain": "@gmail.com",
    "server": "smtp.gmail.com", 
    "port": 587
  },
  {
    "domain": "@outlook.com",
    "server": "smtp.office365.com",
    "port": 587
  },
  {
    "domain": "@yahoo.com",
    "server": "smtp.mail.yahoo.com",
    "port": 587
  }
]

使用法

サーバーの実行

次のコマンドで MCP 電子メール サーバーを起動します。

python -m mcp_email_server (--dir /path/to/attachment/directory)

Claude.app 用に設定する

Claude 設定に追加:

コンダ

{
  "mcpServers": {
    "email": {
      "command": "D:\\conda\\envs\\mcp\\python.exe",
      "args": [
        "C:\\Users\\YourUserName\\Desktop\\servers\\src\\email\\src\\mcp_server_email",
        "--dir",
        "C:\\Users\\YourUserName\\Desktop"
      ],
      "env": {
        "SENDER": "2593666979q@gmail.com",
        "PASSWORD": "tuogk......."
      }
    }
  }
}

紫外線

{
  "mcpServers": {
    "email": {
      "command": "uv",
      "args": [
        "~\\servers\\src\\email\\src\\mcp_server_email",
        "--dir",
        "C:\\Users\\YourUserName\\Desktop"
      ],
      "env": {
        "SENDER": "2593666979q@gmail.com",
        "PASSWORD": "tuogk......."
      }
    }
  }
}

セキュリティノート

  • Gmailやその他のサービスでは、アプリ固有のパスワードを使用する必要がある場合があります。

  • セキュリティ上の理由から、サーバーは限られた種類の添付ファイルをサポートしています。

サポートされているファイル形式

サーバーは次の添付ファイルの種類をサポートしています:

  • ドキュメント: doc、docx、xls、xlsx、ppt、pptx、pdf

  • アーカイブ: zip、rar、7z、tar、gz

  • テキストファイル: txt、log、csv、json、xml

  • 画像: jpg、jpeg、png、gif、bmp

  • その他: md

使用例

メールを送信する

{
  "receiver": ["recipient@example.com"],
  "subject": "Test Email from MCP Server",
  "body": "This is a test email sent via the MCP Email Server.",
  "attachments": ["document.pdf", "image.jpg"]
}

添付ファイルの検索

{
  "pattern": "report"
}

貢献

MCP メールサーバーの拡張と改善にご協力いただけることを歓迎いたします。新しいツールの追加、既存の機能の強化、ドキュメントの改善など、皆様からの貴重なご意見をお待ちしております。

他の MCP サーバーと実装パターンの例については、https: //github.com/modelcontextprotocol/serversを参照してください。

プルリクエストを歓迎します。MCP メールサーバーをさらに強力で便利なものにするために、新しいアイデア、バグ修正、機能強化などをお気軽にご提供ください。

ライセンス

MCP Email ServerはMITライセンスに基づいてライセンスされています。つまり、MITライセンスの条件に従って、ソフトウェアを自由に使用、変更、配布できます。

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    A Model Context Protocol server that provides a seamless email management interface through Claude, allowing users to search, read, and send emails directly through natural language conversations.
    4
    114
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    A Model Context Protocol server that enables email operations through POP3 and SMTP protocols in Cursor AI, allowing users to send, receive, list, and manage emails using natural language commands.
    468 npm
    52
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server that enables AI assistants to search, read, and send emails with attachment support through the Gmail API. It also provides tools for comprehensive label management and uses secure OAuth2 authentication for mailbox access.
    181 npm
    MIT
  • A
    license
    Not graded
    quality
    Not graded
    maintenance
    A Model Context Protocol server that provides email access via IMAP and SMTP, enabling AI agents to read, search, send, and manage emails. It features specialized tools for folder management, message retrieval, and replying to threads through a standardized HTTP/SSE interface.
    MIT