Skip to main content
Glama

Gmail Plugin MCP Server

GmailプラグインMCPサーバー

Pythonバージョン ライセンス

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
            Provides tools for interacting with Gmail and Calendar APIs. This server enables you to manage your emails and calendar events programmatically through the MCP interface.
            Last updated -
            25
            MIT License
          • 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 -
            30
            12
            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 -
            2
            GPL 3.0
          • -
            security
            A
            license
            -
            quality
            MCP server that integrates with Gmail to enable sending, reading, and managing emails through tools like send-email, trash-email, get-unread-emails, and read-email.
            Last updated -
            59
            GPL 3.0
            • 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