Skip to main content
Glama

mcp-gsuite

mcp-gsuite MCP サーバー

Google 製品とやり取りするための MCP サーバー。

プロンプトの例

現在、この MCP サーバーは次の機能で Gmail とカレンダーの統合をサポートしています。

  1. 一般的な
  • 複数のGoogleアカウント
  1. Gメール
  • Gmailユーザー情報を取得する
  • 柔軟な検索でメールを検索(例:未読、特定の送信者、日付範囲、添付ファイル付き)
  • IDでメールの全コンテンツを取得する
  • 受信者、件名、本文、CC オプションを指定して新しい下書きメールを作成する
  • 下書きメールを削除する
  • 既存のメールに返信する(すぐに送信することも、下書きとして保存することもできます)
  • ID で複数のメールを一度に取得します。
  • 電子メールの複数の添付ファイルをローカル システムに保存します。
  1. カレンダー
  • 複数のカレンダーを管理する
  • 指定した時間範囲内のカレンダーイベントを取得する
  • 次のカレンダー イベントを作成します:
    • タイトル、開始/終了時間
    • オプションの場所と説明
    • 任意の参加者
    • カスタムタイムゾーンのサポート
    • 通知設定
  • カレンダーイベントを削除する

試すことができるプロンプトの例:

  • 最新の未読メッセージを取得する
  • スクラムマスターからのメールを検索する
  • 経理部からすべてのメールを取得する
  • ABCに関するメールを要約します
  • アリスの最後のメールに対する素敵な返信を書いて、下書きをアップロードしてください。
  • ボブのメールに「ありがとう」の返信を添えて、下書きとして保存しましょう。
  • 明日の予定は何ですか?
  • 来週の私のプライベートアカウントのファミリーアジェンダを確認してください
  • 来週、ティムと2時間のイベントを計画したいのですが、時間帯を提案していただけますか?

クイックスタート

インストール

Smithery経由でインストール

Smithery経由で Claude Desktop 用の mcp-gsuite を自動的にインストールするには:

npx -y @smithery/cli install mcp-gsuite --client claude
OAuth 2

Google Workspace(G Suite)API には OAuth2 認証が必要です。認証を設定するには、以下の手順に従ってください。

  1. OAuth2 資格情報を作成する:
    • Google Cloud Consoleにアクセスします
    • 新しいプロジェクトを作成するか、既存のプロジェクトを選択してください
    • プロジェクトで Gmail API と Google カレンダー API を有効にする
    • 「認証情報」→「認証情報の作成」→「OAuthクライアントID」に移動します
    • アプリケーションの種類として「デスクトップアプリ」または「Webアプリケーション」を選択します
    • 必要な情報を入力してOAuth同意画面を設定する
    • 承認されたリダイレクト URI を追加します (ローカル開発の場合はhttp://localhost:4100/codeを含めます)
  2. 必要な OAuth2 スコープ:
[ "openid", "https://mail.google.com/", "https://www.googleapis.com/auth/calendar", "https://www.googleapis.com/auth/userinfo.email" ]
  1. 次に、作業ディレクトリにクライアントの.gauth.jsonを作成します。
{ "web": { "client_id": "$your_client_id", "client_secret": "$your_client_secret", "redirect_uris": ["http://localhost:4100/code"], "auth_uri": "https://accounts.google.com/o/oauth2/auth", "token_uri": "https://oauth2.googleapis.com/token" } }
  1. アカウント情報を含む.accounts.jsonファイルを作成する
{ "accounts": [ { "email": "alice@bob.com", "account_type": "personal", "extra_info": "Additional info that you want to tell Claude: E.g. 'Contains Family Calendar'" } ] }

複数のアカウントを指定できます。Google Authアプリでアクセス権が付与されていることを確認してください。特にextra_infoフィールドは、アカウントについてAIに伝えたい情報(例えば、特定の目的があるかどうかなど)を追加できるため、特に重要です。

注: 特定のアカウントでツールのいずれかを初めて実行すると、ブラウザが開き、Googleにリダイレクトされ、認証情報やスコープなどの入力を求められます。ログインに成功すると、認証情報は.oauth.{email}.jsonというローカルファイルに保存されます。認証が完了すると、リフレッシュトークンが使用されます。

クロードデスクトップ

MacOSの場合: ~/Library/Application\ Support/Claude/claude_desktop_config.json

Windows の場合: %APPDATA%/Claude/claude_desktop_config.json

{ "mcpServers": { "mcp-gsuite": { "command": "uv", "args": [ "--directory", "<dir_to>/mcp-gsuite", "run", "mcp-gsuite" ] } } }

注: uv run mcp-gsuite --accounts-file /path/to/custom/.accounts.jsonを使用して別のアカウント ファイルを指定したり、 --credentials-dir /path/to/custom/credentialsして別の資格情報ディレクトリを指定したりすることもできます。

{ "mcpServers": { "mcp-gsuite": { "command": "uv", "args": [ "--directory", "<dir_to>/mcp-gsuite", "run", "mcp-gsuite", "--accounts-file", "/path/to/custom/.accounts.json", "--credentials-dir", "/path/to/custom/credentials" ] } } }
{ "mcpServers": { "mcp-gsuite": { "command": "uvx", "args": [ "mcp-gsuite", "--accounts-file", "/path/to/custom/.accounts.json", "--credentials-dir", "/path/to/custom/credentials" ] } } }

設定オプション

MCP サーバーは、認証とアカウント情報のカスタム パスを指定するために、いくつかのコマンド ライン オプションを使用して構成できます。

  • --gauth-file : OAuth2クライアント設定を含む.gauth.jsonファイルへのパスを指定します。デフォルトは./.gauth.jsonです。
  • --accounts-file : Googleアカウントに関する情報を含む.accounts.jsonファイルへのパスを指定します。デフォルトは./.accounts.jsonです。
  • --credentials-dir : 認証成功後にOAuth認証情報を保存するディレクトリを指定します。デフォルトは現在の作業ディレクトリで、各アカウントごとに.oauth.{email}.jsonサブディレクトリが作成されます。

これらのオプションにより、さまざまな環境や複数の資格情報とアカウントのセットを柔軟に管理できるため、開発やテストのシナリオで特に役立ちます。

使用例:

uv run mcp-gsuite --gauth-file /path/to/custom/.gauth.json --accounts-file /path/to/custom/.accounts.json --credentials-dir /path/to/custom/credentials

この構成は、異なる構成で実行されているサーバーのインスタンスが複数ある場合や、デフォルトのパスが適切でない環境に展開する場合に特に便利です。

発達

建築と出版

配布用のパッケージを準備するには:

  1. 依存関係を同期し、ロックファイルを更新します。
uv sync
  1. パッケージディストリビューションをビルドします。
uv build

これにより、 dist/ディレクトリにソースとホイールのディストリビューションが作成されます。

  1. PyPI に公開:
uv publish

注: 環境変数またはコマンド フラグを使用して PyPI 資格情報を設定する必要があります。

  • トークン: --tokenまたはUV_PUBLISH_TOKEN
  • またはユーザー名/パスワード: --username / UV_PUBLISH_USERNAMEおよび--password / UV_PUBLISH_PASSWORD

デバッグ

MCPサーバーはstdio経由で実行されるため、デバッグが困難になる場合があります。最適なデバッグ環境を実現するには、 MCP Inspectorの使用を強くお勧めします。

次のコマンドを使用して、 npm経由で MCP Inspector を起動できます。

npx @modelcontextprotocol/inspector uv --directory /path/to/mcp-gsuite run mcp-gsuite

起動すると、ブラウザでアクセスしてデバッグを開始できる URL がインスペクタに表示されます。

次のコマンドでサーバー ログを監視することもできます。

tail -n 20 -f ~/Library/Logs/Claude/mcp-server-mcp-gsuite.log
-
security - not tested
A
license - permissive license
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

Google 製品と対話するための MCP サーバー。

  1. プロンプトの例
    1. クイックスタート
      1. インストール
      2. Smithery経由でインストール
      3. 設定オプション
    2. 発達
      1. 建築と出版
      2. デバッグ

    Related MCP Servers

    • -
      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
    • A
      security
      F
      license
      A
      quality
      An MCP (Model Context Protocol) server that provides Google search capabilities and webpage content analysis tools. This server enables AI models to perform Google searches and analyze webpage content programmatically.
      Last updated -
      3
      31
      52
      TypeScript
    • -
      security
      A
      license
      -
      quality
      A secure MCP (Model Context Protocol) server hosted on Google Cloud Run that enables team collaboration by providing authenticated access via Google Cloud IAM, allowing teams to share custom MCP servers over the internet before official MCP authentication is implemented.
      Last updated -
      20
      TypeScript
      MIT License
    • -
      security
      A
      license
      -
      quality
      This MCP server integrates with Google Drive to allow listing, reading, and searching files, as well as the ability to read and write to Google Sheets.
      Last updated -
      91
      JavaScript
      MIT License

    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/MarkusPfundstein/mcp-gsuite'

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