GmailプラグインMCPサーバー
Gmailとの連携を可能にする強力なMCPサーバー。MCPクライアントから直接メールを管理できます。このプラグインは、メールの閲覧、送信、管理など、Gmailのコア機能にシームレスにアクセスできるようにします。
参考: uvx を使用した MCP サーバーの実装のサンプルについては、この例を参照してください。
🎥 デモ
https://github.com/user-attachments/assets/df9e86cf-1f6b-4265-9c68-b3ed88103d1f
✨ 特徴
- 📧 メールの送受信
- 📥 未読メッセージを読む
- 🗑️ ゴミ箱メール
- 📱 ブラウザでメールを開く
- 📝 メールを既読にする
- 🔒 安全なOAuth2認証
🚀 クイックスタート
前提条件
- Python 3.12以上
- Gmail API 認証情報
- MCP クライアント (Claude Desktop など)
インストール
- リポジトリをクローンします。
- 依存関係をインストールします (1 つの方法を選択):
- Gmail API の資格情報を設定します。
- Google Cloud Consoleに移動
- 新しいプロジェクトを作成するか、既存のプロジェクトを選択してください
- Gmail APIを有効にする
- OAuth 同意画面を設定します。
- 「外部」ユーザータイプを選択(公開は不要)
- オーディエンスタブに移動して、「テストユーザー」としてメールアドレスを追加します
- OAuth スコープの追加:
https://www.googleapis.com/auth/gmail/modify
- OAuth 2.0 認証情報を作成します。
- アプリケーションの種類として「デスクトップアプリ」を選択します
- JSON認証情報ファイルをダウンロードする
- 資格情報ファイルを保存し、その絶対パスをメモします(
--creds-file-path
で使用されます)。
構成
開発/未公開サーバー向け
MCP クライアント構成に以下を追加します。
公開サーバーの場合
🛠️ 開発
建築と出版
- 同期の依存関係:
- ビルドパッケージ:
- PyPI に公開:
デバッグ
デバッグにはMCP インスペクタを使用します。
📚 APIリファレンス
利用可能なツール
ツール名 | 説明 | 必須引数 |
---|---|---|
send-email | メールを送信 | 受信者ID、件名、メッセージ |
get-unread-emails | 未読メールを取得する | なし |
read-email | メールの内容を読む | メールID |
trash-email | メールをゴミ箱に移動する | メールID |
mark-email-as-read | メールを既読にする | メールID |
open-email | ブラウザでメールを開く | メールID |
利用可能なプロンプト
プロンプト名 | 説明 | 議論 |
---|---|---|
manage-email | メール管理者として行動する | なし |
draft-email | 新しいメールを作成する | コンテンツ、受信者、受信者のメール |
edit-draft | 既存のメールの下書きを編集する | 変更、現在のドラフト |
🤝 貢献する
貢献を歓迎します!お気軽にプルリクエストを送信してください。
📄 ライセンス
このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細についてはLICENSEファイルを参照してください。
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
Gmail 統合を可能にする MCP サーバー。これにより、ユーザーは Claude Desktop などの MCP クライアントを通じて直接メールを管理 (送信、受信、閲覧、ゴミ箱に入れる、既読としてマークする) できるようになります。
Related MCP Servers
- AsecurityAlicenseAqualityModel Context Protocol server for Gmail integration. This allows Claude Desktop (or any MCP client) to interact with your Gmail account through Google Apps Script.Last updated -378JavaScriptMIT License
- -securityAlicense-qualityIntegrates with Gmail to enable sending, reading, drafting, and managing emails via the Model Context Protocol (MCP), allowing users to interact with email tasks through automated client prompts.Last updated -PythonGPL 3.0
- -securityFlicense-qualityEnables users to manage Gmail accounts using AI agent-assisted operations via an MCP protocol, supporting email search, reading, deletion, and sending with a voice-powered interface.Last updated -25TypeScript
- AsecurityFlicenseAqualityA simple MCP server that enables users to send emails using Resend's API, integrating with tools like Cursor and Claude Desktop for seamless email composition and delivery.Last updated -16321TypeScript