Skip to main content
Glama
Yahoo Mail MCP Server

Yahoo Mail MCP Server

by doohinkus

Yahoo Mail MCPサーバー

LLMがYahooメールとやり取りできるようにするModel Context Protocol (MCP) サーバーです。このサーバーを使用すると、Claude Desktopなどのツールから、安全なOAuth2認証を介してYahooアカウントのメールを直接読み取り、検索、送信できるようになります。

機能(予定)

  • メールの読み取り: 受信トレイから最近のメッセージを取得します。

  • メールの検索: キーワード、送信者、日付を使用して特定のメッセージを検索します。

  • メールの送信: YahooのSMTPサーバーを使用してメールを作成・送信します。

Related MCP server: Gmail MCP Server

前提条件

  • Node.js: バージョン20以上。

  • Yahoo Developer App: Yahoo Developer Portalでアプリを作成し、OAuth2認証情報を取得する必要があります。

OAuth2用Yahooアプリの作成

  1. Yahoo Developer Portalにアクセスします。

  2. 新しいアプリを作成します。

  3. API PermissionsでMail(読み取りおよび書き込み)を有効にします。

  4. Redirect URIをhttps://localhost/callback(または任意のURI)に設定します。

  5. Client IDとClient Secretを控えておきます。

セットアップ

  1. リポジトリのクローン:

    git clone <repository-url>
    cd yahoo-mail-mcp
  2. 依存関係のインストール:

    npm install
  3. 環境変数の設定: ルートディレクトリに.envファイルを作成し、Yahooの認証情報を追加します:

    YAHOO_EMAIL=your-email@yahoo.com
    YAHOO_CLIENT_ID=your-client-id
    YAHOO_CLIENT_SECRET=your-client-secret
    YAHOO_REDIRECT_URI=https://localhost/callback

認証

サーバーを初めて実行すると、OAuth2フローが開始されます:

  1. ブラウザウィンドウが開き、Yahooへのログインを求められます。

  2. 承認後、REDIRECT_URIにリダイレクトされます。

  3. ページは読み込みに失敗する可能性がありますが、問題ありません。アドレスバーからcodeパラメータをコピーしてください。

  4. コピーしたコードをターミナルに貼り付けます。

  5. サーバーがコードをトークンと交換し、.tokens.jsonに安全に保存します。

使用方法

開発

vite-nodeを使用して開発モードでサーバーを実行するには:

npm run dev

ビルド

本番環境用にプロジェクトをビルドするには:

npm run build

Claude Desktopとの統合

このサーバーをClaude Desktopで使用するには、claude_desktop_config.jsonに追加します:

{
  "mcpServers": {
    "yahoo-mail": {
      "command": "node",
      "args": ["/path/to/yahoo-mail-mcp/dist/index.js"]
    }
  }
}

プロジェクト構造

  • src/index.ts: MCPサーバーのエントリーポイント。

  • src/server.ts: MCPサーバーの初期化とツールの登録。

  • src/auth/: OAuth2フローとトークン管理。

  • src/tools/: 個別のメールツールの実装。

  • src/lib/: IMAPおよびSMTP接続用のヘルパーライブラリ。

ライセンス

ISC

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to search and retrieve emails from Yahoo accounts using keywords, folder, date range, and attachment filters.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables Claude to read, search, organize, and clean up Yahoo Mail emails over IMAP without Yahoo API keys.
      4
      MIT
    • F
      license
      Not graded
      quality
      B
      maintenance
      Enables AI assistants to read, organize, draft, and send Yahoo Mail email with user approval, integrating with various clients via a remote MCP endpoint.
      1
      -