Skip to main content
Glama

Gmail Plugin MCP Server

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. リポジトリをクローンします。
git clone https://github.com/yourusername/gmail-plugin.git cd gmail-plugin
  1. 依存関係をインストールします (1 つの方法を選択):
# Method 1: Install in editable mode uv pip install -e . # Method 2: Install using requirements.txt uv pip install -r requirements.txt # Method 3: Install using uv sync (recommended) uv sync --dev --all-extras
  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 クライアント構成に以下を追加します。

"mcpServers": { "gmail-plugin": { "command": "uv", "args": [ "--directory", "[absolute path to working directory]", "run", "server.py" "--creds-file-path", "[absolute-path-to-credentials-file]", "--token-path", "[absolute-path-to-access-tokens-file]" ] } }
公開サーバーの場合
"mcpServers": { "gmail-plugin": { "command": "uvx", "args": [ "gmail-plugin" ] } }

🛠️ 開発

建築と出版

  1. 同期の依存関係:
uv sync
  1. ビルドパッケージ:
uv build
  1. PyPI に公開:
uv publish

デバッグ

デバッグにはMCP インスペクタを使用します。

npx @modelcontextprotocol/inspector uv --directory C:\Users\sanch\Desktop\gmail_plugin\gmail-plugin run gmail-plugin

📚 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ファイルを参照してください。

-
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.

Gmail 統合を可能にする MCP サーバー。これにより、ユーザーは Claude Desktop などの MCP クライアントを通じて直接メールを管理 (送信、受信、閲覧、ゴミ箱に入れる、既読としてマークする) できるようになります。

  1. 🎥 デモ
    1. ✨ 特徴
      1. 🚀 クイックスタート
        1. 前提条件
        2. インストール
        3. 構成
      2. 🛠️ 開発
        1. 建築と出版
        2. デバッグ
      3. 📚 APIリファレンス
        1. 利用可能なツール
        2. 利用可能なプロンプト
      4. 🤝 貢献する
        1. 📄 ライセンス

          Related MCP Servers

          • A
            security
            A
            license
            A
            quality
            Model 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 -
            3
            7
            8
            JavaScript
            MIT License
            • Apple
          • -
            security
            A
            license
            -
            quality
            Integrates 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 -
            Python
            GPL 3.0
          • -
            security
            F
            license
            -
            quality
            Enables 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 -
            2
            5
            TypeScript
          • A
            security
            F
            license
            A
            quality
            A 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 -
            1
            6
            321
            TypeScript
            • Apple

          View all related MCP servers

          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/sanchisingh01/MCP-Server---Gmail-Plugin-for-Claude-Desktop'

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