Skip to main content
Glama

@kazuph/mcp-gmail-gas

by kazuph

MCP Gmail

Gmail統合用のモデルコンテキストプロトコルサーバー。これにより、Claude Desktop(または任意のMCPクライアント)はGoogle Apps Scriptを介してGmailアカウントとやり取りできるようになります。

クイックスタート(ユーザー向け)

前提条件

  • Node.js 18+ ( brew install nodeでインストール)
  • Gmailアカウント
  • Google Apps Scriptのデプロイメント
  • Claude Desktop ( https://claude.ai/desktopからインストール)

構成

  1. Google Apps Scriptをデプロイする
  • Google Apps Scriptにアクセスして新しいプロジェクトを作成します
  • code.gsの内容全体をコピーし、スクリプトエディタに貼り付けます。
  • 「デプロイ」>「新しいデプロイ」をクリックします
  • 展開タイプとして「Webアプリ」を選択します
  • 次の設定を構成します。
    • 実行者: 私
    • アクセスできるユーザー: 誰でも
    • 「デプロイ」をクリック
  • プロンプトが表示されたら、アプリを確認して Gmail アカウントへのアクセスを許可します。
  • デプロイURLをコピーし、セキュリティのためにランダムなAPIキーを生成します

注: このスクリプトにはGmailへのアクセス権限が必要です。スクリプトを初めてデプロイして実行する際、Googleからこれらの権限の確認と付与を求められます。以下の点にご注意ください。

  1. 「権限を確認」をクリックします
  2. Googleアカウントを選択してください
  3. 警告が表示された場合は「詳細設定」をクリックしてください
  4. [プロジェクト名] に移動 (安全ではありません)」をクリックします。
  5. 「許可」をクリックして、必要なGmail権限を付与します
  6. Claude Desktop 構成ファイルを開きます: ~/Library/Application Support/Claude/claude_desktop_config.json

これは、Claude デスクトップ メニューから見つけることができます。

  1. クロードデスクトップを開く
  2. MacのメニューバーでClaudeをクリック
  3. 「設定」をクリック
  4. 「開発者」をクリック
  5. 設定に以下を追加します。
{ "tools": { "gmail": { "command": "npx", "args": ["-y", "@kazuph/mcp-gmail-gas"], "env": { "GAS_ENDPOINT": "YOUR_DEPLOYMENT_URL", "VALID_API_KEY": "YOUR_API_KEY" } } } }

注: YOUR_DEPLOYMENT_URLYOUR_API_KEY実際の値に置き換えてください。

開発者向け

前提条件

  • Node.js 18+ ( brew install nodeでインストール)
  • Gmailアカウント
  • Google Apps スクリプト
  • Claude Desktop ( https://claude.ai/desktopからインストール)
  • tsx ( npm install -g tsxでインストール)

インストール

git clone https://github.com/kazuph/mcp-gmail-gas.git cd mcp-gmail-gas npm install npm run build

開発構成

  1. Claude Desktop がインストールされ、実行されていることを確認してください。
  2. まだインストールしていない場合は、tsx をグローバルにインストールします。
npm install -g tsx # or pnpm add -g tsx
  1. Claude Desktop の設定を変更してください: ~/Library/Application Support/Claude/claude_desktop_config.json

MCP クライアントの構成に以下を追加します。

{ "tools": { "gmail": { "args": ["tsx", "/path/to/mcp-gmail-gas/index.ts"], "env": { "GAS_ENDPOINT": "YOUR_DEPLOYMENT_URL", "VALID_API_KEY": "YOUR_API_KEY" } } } }

利用可能なツール

  • gmail_search_messages : Gmailの検索クエリ構文を使用してメールを検索します(例: "subject:Meeting newer_than:1d")
  • gmail_get_message : 特定のメールの全内容と詳細を取得します
  • gmail_download_attachment : 特定のメールから添付ファイルをダウンロードする

セキュリティに関する注意事項

VALID_API_KEYは常に秘密にし、バージョン管理にコミットしないでください。このキーは、Google Apps Script の導入を通じて、承認されたクライアントのみが Gmail にアクセスできるようにするために役立ちます。

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Gmail統合用のモデルコンテキストプロトコルサーバー。これにより、Claude Desktop(または任意のMCPクライアント)はGoogle Apps Scriptを介してGmailアカウントとやり取りできるようになります。

  1. クイックスタート(ユーザー向け)
    1. 前提条件
    2. 構成
  2. 開発者向け
    1. 前提条件
    2. インストール
    3. 開発構成
  3. 利用可能なツール
    1. セキュリティに関する注意事項

      Related MCP Servers

      • -
        security
        A
        license
        -
        quality
        Server for Gmail integration in Claude Desktop with auto authentication support. This server enables AI assistants to manage Gmail through natural language interactions.
        Last updated -
        57,424
        283
        JavaScript
        MIT License
        • Linux
        • Apple
      • -
        security
        F
        license
        -
        quality
        A specialized Model Context Protocol (MCP) server that integrates Google services (Gmail, Calendar, etc.) into your AI workflows. This server enables seamless access to Google services through MCP, allowing AI agents to interact with Gmail, Google Calendar, and other Google services.
        Last updated -
        10
        3
        TypeScript
      • -
        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
        An integration server that provides Claude Desktop access to Gmail, enabling users to view recent emails and search their Gmail inbox using natural language commands.
        Last updated -
        6
        Python

      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/kazuph/mcp-gmail-gas'

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