Skip to main content
Glama
vinayak-mehta

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ファイルが作成されます。

Related MCP server: Gmail MCP Server

クロードとの設定

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ファイルをプロジェクト ルートに作成します。

A
license - permissive license
Not graded
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    F
    maintenance
    Server for Gmail integration in Claude Desktop with auto authentication support. This server enables AI assistants to manage Gmail through natural language interactions.
    26,678
    1,165
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    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.
    8
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server that enables Claude AI to interact with Gmail, supporting email sending, reading, searching, labeling, draft management, and batch operations through natural language commands.
    2
    MIT
  • -
    license
    Not graded
    quality
    Not graded
    maintenance
    A Model Context Protocol server that enables Claude to interact with Gmail through a secure OAuth2 connection, providing email management capabilities like listing, sending, deleting, and organizing emails.

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

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