Skip to main content
Glama
aaronsb

Google Workspace MCP Server

Google Workspace MCP サーバー

AI エージェントに Google Workspace (Gmail、カレンダー、ドライブなど) への完全なアクセス権を与えます。マルチアカウントの認証ルーティング、AI 消費用のレスポンスフォーマット、コンテキストに応じたガイダンスを処理する単一の MCP サーバーです。

Google 公式 Workspace CLI (gws) をベースに構築されているため、Google の進化に合わせて API の対応範囲も拡大します。このサーバーは、宣言的な YAML を完全に機能する MCP ツールに変換するマニフェスト駆動型のファクトリーを使用しており、新しい Google API 操作の追加はコードの変更ではなく設定の変更で行えます。

この MCP サーバーを選ぶ理由

ユーザー向け: 1 回のインストールで、AI エージェントがあなたの Google アカウントに安全に認証された状態でアクセスできるようになります。メールの検索、カレンダーの確認、ドライブファイルの管理、複数ステップのワークフローの連鎖など、すべて自然な会話を通じて行えます。

チーム向け: マルチアカウント対応により、エージェントは個人用アカウントと仕事用アカウントを同時に操作でき、アカウントごとの認証情報の分離と XDG 準拠のストレージが確保されます。

開発者向け: ファクトリーアーキテクチャにより、対応範囲が迅速に拡大します。Google の Workspace CLI はすでに 15 以上のサービスと数百の API 操作をサポートしています。マニフェストで公開する操作をキュレートし、パッチでドメイン固有のフォーマットを追加すれば、残りの処理はデフォルトで自動的に行われます。

Related MCP server: MCP G Suite Integration

利用可能な機能

3 つの主要サービスで 5 つのツール、32 以上の操作:

ツール

操作

機能

manage_email

search, read, send, reply, replyAll, forward, triage, trash, untrash, modify, labels, threads, getThread

Gmail の完全操作 — 検索、読み取り、作成、スレッド管理、ラベル管理

manage_calendar

list, agenda, get, create, quickAdd, update, delete, calendars, freebusy

カレンダーの CRUD、自然言語によるイベント作成、空き状況確認

manage_drive

search, get, upload, download, copy, delete, export, listPermissions, share, unshare

ファイル管理、Google ドキュメントのエクスポート、共有と権限設定

manage_accounts

list, authenticate, remove, status, refresh, scopes

マルチアカウントのライフサイクル管理 — アカウントの追加、認証情報とスコープの管理

queue_operations

$N.field の結果参照を使用して操作を順次実行

すべてのレスポンスには次のステップのガイダンスが含まれており、エージェントは常に次に何ができるかを把握しています。

仕組み

                          ┌─────────────────────────┐
MCP Client ──stdio──▶     │  manifest.yaml           │
                          │  (52 operations declared) │
                          └────────┬────────────────┘
                                   │
                          ┌────────▼────────────────┐
                          │  Factory Generator       │
                          │  schemas + handlers      │
                          └────────┬────────────────┘
                                   │
                    ┌──────────────┼──────────────┐
                    ▼              ▼              ▼
              ┌──────────┐  ┌──────────┐  ┌──────────┐
              │  Gmail   │  │ Calendar │  │  Drive   │
              │  Patch   │  │  Patch   │  │  Patch   │
              └────┬─────┘  └────┬─────┘  └────┬─────┘
                   │             │             │
                   └──────┬──────┘──────┬──────┘
                          ▼             ▼
                    Account Router ──▶ gws CLI ──▶ Google APIs

ファクトリーは YAML マニフェストを読み取り、起動時に MCP ツールのスキーマとリクエストハンドラーを生成します。パッチは、Gmail 検索のハイドレーション、カレンダーのフォーマット、ドライブのファイルタイプ検出など、必要に応じてドメイン固有の動作を追加します。パッチのない操作には、自動的に適切なデフォルト設定が適用されます。

基盤となるエンジンは、Google の @googleworkspace/cli です。これは Google Workspace API の全表面をラップする Rust バイナリです。MCP サーバーは、どの操作を公開するかをキュレートし、AI が消費しやすいようにレスポンスを整形します。

インストール

MCPB バンドル (Claude Desktop およびその他の MCP クライアント)

最新リリース から、お使いのプラットフォーム用の .mcpb バンドルをダウンロードしてください:

プラットフォーム

ファイル

macOS (Apple Silicon)

google-workspace-mcp-darwin-arm64.mcpb

macOS (Intel)

google-workspace-mcp-darwin-x64.mcpb

Linux x64

google-workspace-mcp-linux-x64.mcpb

Linux ARM64

google-workspace-mcp-linux-arm64.mcpb

Windows x64

google-workspace-mcp-windows-x64.mcpb

Claude Desktop では、.mcpb ファイルをアプリにドラッグ&ドロップするだけで、Google OAuth 認証情報の入力を求められ、すぐに使用可能になります。.mcpb 拡張子をサポートする他の MCP クライアントでも同様の手順でインストールできます。バンドルには、サーバー、gws バイナリ、およびすべての依存関係が含まれています。

Claude Code / npm

npm install @aaronsb/google-workspace-mcp

または直接実行:

npx @aaronsb/google-workspace-mcp

前提条件

  1. Node.js 18 以上

  2. Google Cloud OAuth 認証情報console.cloud.google.com/apis/credentials で作成してください:

    • OAuth 2.0 クライアント ID (デスクトップアプリケーション) を作成

    • 使用したい API (Gmail, Calendar, Drive, Sheets など) を有効化

  3. 環境変数の設定:

    export GOOGLE_CLIENT_ID="your-client-id"
    export GOOGLE_CLIENT_SECRET="your-client-secret"

MCP クライアントの設定

Claude Desktop

claude_desktop_config.json に追加:

{
  "mcpServers": {
    "google-workspace": {
      "command": "npx",
      "args": ["@aaronsb/google-workspace-mcp"],
      "env": {
        "GOOGLE_CLIENT_ID": "your-client-id",
        "GOOGLE_CLIENT_SECRET": "your-client-secret"
      }
    }
  }
}

Claude Code

.mcp.json に追加:

{
  "mcpServers": {
    "google-workspace": {
      "command": "npx",
      "args": ["@aaronsb/google-workspace-mcp"],
      "env": {
        "GOOGLE_CLIENT_ID": "your-client-id",
        "GOOGLE_CLIENT_SECRET": "your-client-secret"
      }
    }
  }
}

使用方法

アカウントの追加 (OAuth 用のブラウザが開きます):

manage_accounts { "operation": "authenticate" }

その後、アカウントのメールアドレスを指定してツールを使用します:

manage_email    { "operation": "triage", "email": "you@gmail.com" }
manage_calendar { "operation": "agenda", "email": "you@gmail.com" }
manage_drive    { "operation": "search", "email": "you@gmail.com", "query": "quarterly report" }

複数ステップのワークフロー

結果参照を使用して操作を連鎖させます。あるステップの出力が次のステップの入力になります:

{
  "operations": [
    { "tool": "manage_email", "args": { "operation": "search", "email": "you@gmail.com", "query": "from:boss subject:review" }},
    { "tool": "manage_email", "args": { "operation": "read", "email": "you@gmail.com", "messageId": "$0.messageId" }}
  ]
}

対応範囲の拡大

このサーバーは gws CLI から操作を検出します。gws CLI はすでに 15 以上の Google サービス (Sheets, Docs, Tasks, People, Chat など) をサポートしています。対応範囲の追加はマニフェストの編集で行えます:

make manifest-discover   # Find all 287+ available operations
make manifest-lint       # Validate the curated manifest
make test                # Verify everything works

新しい操作にはデフォルトのフォーマットが自動的に適用されます。ドメイン固有の表示が必要な場合にのみパッチを追加してください。

データストレージ

XDG Base Directory Specification に準拠しています:

データ

場所

アカウントレジストリ

~/.config/google-workspace-mcp/accounts.json

認証情報

~/.local/share/google-workspace-mcp/credentials/

認証情報はアカウントごとのファイルで、標準の OAuth トークンが保存されます。プロジェクトディレクトリ内にシークレットは保存されません。

ライセンス

MIT

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

Maintenance

Maintainers
16dResponse time
Release cycle
Releases (12mo)
Issues opened vs closed

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/aaronsb/google-workspace-mcp'

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