Skip to main content
Glama

Gmail MCP

Gmail MCP

Claude が Gmail アカウントからメールを検索して取得できるようにします。

設定

1. Google API認証情報を取得する

  1. Google Cloud Consoleにアクセスする
  2. 新しいプロジェクトを作成するか、既存のプロジェクトを選択してください
  3. プロジェクトで Gmail API を有効にする
    • 「APIとサービス」>「ライブラリ」に移動します
    • 「Gmail API」を検索して有効にします
  4. OAuth 資格情報を作成します。
    • 「APIとサービス」>「認証情報」に移動します
    • 「認証情報を作成」>「OAuthクライアントID」をクリックします
    • アプリケーションの種類として「デスクトップアプリケーション」を選択します
    • クライアントに名前を付けて「作成」をクリックします
  5. 資格情報JSONファイルをダウンロードする
  6. プロジェクトディレクトリにcredentials.jsonとして保存します。

2. アプリケーションを承認する

認証コマンドを実行してトークンを生成します。

uv run gmail-mcp auth --creds-path credentials.json --token-path token.json

ブラウザウィンドウが開きますので、Googleアカウントにログインして必要な権限を付与してください。権限付与後、プロジェクトディレクトリにtoken.jsonファイルが作成されます。

クロードとの設定

Claude 構成ファイルに Gmail MCP サーバーを追加します。

{ "mcpServers": { "gmail": { "args": [ "--from", "git+https://github.com/vinayak-mehta/gmail-mcp", "gmail-mcp" ], "command": "/Users/username/.local/bin/uvx", "env": { "GMAIL_CREDS_PATH": "/Users/username/path/to/gmail-mcp/credentials.json", "GMAIL_TOKEN_PATH": "/Users/username/path/to/gmail-mcp/token.json" } } } }

必ず次の点に注意してください:

  • /Users/username/path/to/gmail-mcpを実際のプロジェクトパスに置き換えます。
  • インストールしたuvx実行ファイルへのcommandパスを調整します
  • credentials.jsonおよびtoken.jsonファイルへの正しいパスを指定します

クロードは次のツールにアクセスできるようになります。

1. メールを検索する

Gmail アカウントでメールを検索します。

例のプロンプト:example@gmail.comからのすべてのメールを検索」

2. メールの内容を取得する

特定の電子メールの全内容を取得します。

プロンプトの例: 「「明日の会議」という件名のメールの全内容を表示してください」

3. メッセージの一覧

Gmail の受信トレイから最近のメッセージを一覧表示します。

例のプロンプト: 「最近のメール 5 件をリストしてください」

環境変数

環境変数を使用して、資格情報とトークン ファイルへのパスを設定できます。

  • GMAIL_CREDS_PATH : credentials.json ファイルへのパス
  • GMAIL_TOKEN_PATH : token.json ファイルへのパス

簡単に構成できるように、これらの変数を含む.envファイルをプロジェクト ルートに作成します。

-
security - not tested
A
license - permissive license
-
quality - not tested

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.

Claude が Gmail アカウントからメールを検索および取得できるようにするサーバー。メールの検索、特定のメールの完全な内容の取得、最近のメッセージの一覧表示などの機能をサポートします。

  1. 設定
    1. Google API認証情報を取得する
    2. アプリケーションを承認する
  2. クロードとの設定
    1. メールを検索する
    2. メールの内容を取得する
    3. メッセージの一覧
  3. 環境変数

    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
    • A
      security
      F
      license
      A
      quality
      A server that enables Claude Desktop users to access the Claude API directly, allowing them to bypass Professional Plan limitations and use advanced features like custom system prompts and conversation management.
      Last updated -
      1
      5
      Python
      • Apple
    • -
      security
      A
      license
      -
      quality
      An email assistant server that connects Claude Desktop to notmuch email databases, allowing users to search emails, view threads, compose new messages, and reply to conversations with markdown formatting.
      Last updated -
      2
      Python
      Mozilla Public License 2.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/vinayak-mehta/gmail-mcp'

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