MCP Email Server

Integrations

  • Allows sending emails through Gmail's SMTP server with support for multiple recipients and file attachments.

  • Supports sending emails with XML files as attachments.

MCP メールサーバー

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

特徴

  • 複数の受信者にメールを送信する
  • メール添付ファイルのサポート
  • パターンマッチングに基づいてディレクトリ内のファイルを検索する
  • SMTPを使用した安全な電子メール送信

利用可能なツール

  • send_email - 指定された件名、本文、受信者に基づいてメールを送信します。
    • receiver (文字列の配列、必須): 受信者のメールアドレスのリスト
    • body (文字列、必須): メールの本文
    • subject (文字列、必須): メールの件名
    • attachments (文字列の配列または文字列、オプション): メールの添付ファイル(ファイル名)
  • search_attachments - 指定されたディレクトリ内で、指定されたパターンに一致するファイルを検索します。
    • pattern (文字列、必須): ファイル名で検索するテキストパターン

プロンプト

  • メールを送信
    • オプションの添付ファイル付きのメールを送信する
    • 引数:
      • receiver (必須): 受信者のメールアドレスのリスト
      • body (必須): メールのメインコンテンツ
      • subject (必須): メールの件名
      • attachments (オプション): メールの添付ファイル
  • 検索添付ファイル
    • パターンに一致するファイルを検索する
    • 引数:
      • pattern (必須): ファイル名で検索するテキストパターン

インストール

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ライセンスの条件に従って、ソフトウェアを自由に使用、変更、配布できます。

-
security - not tested
A
license - permissive license
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

LLM が添付ファイル付きの電子メールを作成して送信したり、指定されたディレクトリ内で指定されたパターンに一致するファイルを検索したりできるようにするモデル コンテキスト プロトコル サーバー。

  1. Features
    1. Available Tools
    2. Prompts
  2. Installation
    1. Using pip
    2. Email Configuration
  3. Usage
    1. Running the Server
    2. Configure for Claude.app
  4. Security Notes
    1. Supported File Types
      1. Example Usage
        1. Sending an Email
        2. Searching for Attachments
      2. Contributing
        1. License

          Related MCP Servers

          • A
            security
            A
            license
            A
            quality
            A Model Context Protocol server that enables LLMs to interact with Salesforce data through SOQL queries, SOSL searches, and various API operations including record management.
            Last updated -
            10
            53
            Python
            MIT License
          • A
            security
            A
            license
            A
            quality
            A Model Context Protocol server that gives LLMs the ability to interact with Ethereum networks, manage wallets, query blockchain data, and execute smart contract operations through a standardized interface.
            Last updated -
            31
            323
            2
            TypeScript
            MIT License
          • -
            security
            F
            license
            -
            quality
            A Model Context Protocol server that enables LLMs to extract and use content from unstructured documents across a wide variety of file formats.
            Last updated -
            2
            Python
            • Apple
          • -
            security
            F
            license
            -
            quality
            A Model Context Protocol server that enables LLMs to fetch and process web content in multiple formats (HTML, JSON, Markdown, text) with automatic format detection.
            Last updated -
            TypeScript
            • Apple

          View all related MCP servers

          ID: 6q0abxepu2