/ 目錄 / 演練場 / google-workspace-mcp
● 社群 aaronsb ⚡ 即開即用

google-workspace-mcp

作者 aaronsb · aaronsb/google-workspace-mcp

Gmail + Calendar + Drive + multi-account management in one MCP, built on Google's official Workspace CLI — 287 operations across 15+ services.

aaronsb/google-workspace-mcp exposes 5 aggregated tools (manage_email, manage_calendar, manage_drive, manage_accounts, queue_operations) that together cover 287+ operations across Google Workspace. Built on Google's official gws CLI with a manifest-driven factory — it's official-adjacent without being first-party.

為什麼要用

核心特性

即時演示

實際使用效果

google-workspace-2.replay ▶ 就緒
0/0

安裝

選擇你的客戶端

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "google-workspace-2": {
      "command": "npx",
      "args": [
        "-y",
        "google-workspace-mcp"
      ],
      "_inferred": true
    }
  }
}

開啟 Claude Desktop → Settings → Developer → Edit Config。儲存後重啟應用。

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "google-workspace-2": {
      "command": "npx",
      "args": [
        "-y",
        "google-workspace-mcp"
      ],
      "_inferred": true
    }
  }
}

Cursor 使用與 Claude Desktop 相同的 mcpServers 格式。專案級設定優先於全域。

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "google-workspace-2": {
      "command": "npx",
      "args": [
        "-y",
        "google-workspace-mcp"
      ],
      "_inferred": true
    }
  }
}

點擊 Cline 側欄中的 MCP Servers 圖示,然後選 "Edit Configuration"。

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "google-workspace-2": {
      "command": "npx",
      "args": [
        "-y",
        "google-workspace-mcp"
      ],
      "_inferred": true
    }
  }
}

格式與 Claude Desktop 相同。重啟 Windsurf 生效。

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "google-workspace-2",
      "command": "npx",
      "args": [
        "-y",
        "google-workspace-mcp"
      ]
    }
  ]
}

Continue 使用伺服器物件陣列,而非映射。

~/.config/zed/settings.json
{
  "context_servers": {
    "google-workspace-2": {
      "command": {
        "path": "npx",
        "args": [
          "-y",
          "google-workspace-mcp"
        ]
      }
    }
  }
}

加入 context_servers。Zed 儲存後熱重載。

claude mcp add google-workspace-2 -- npx -y google-workspace-mcp

一行命令搞定。用 claude mcp list 驗證,claude mcp remove 移除。

使用場景

實戰用法: google-workspace-mcp

Triage your inbox and draft replies

👤 Anyone buried in email ⏱ ~15 min intermediate

何時使用: Morning inbox. 200 unread. You want to know what needs a response today.

前置條件
  • Google Cloud OAuth client — console.cloud.google.com > Credentials
步驟
  1. Authenticate
    Authenticate my Gmail account via OAuth.✓ 已複製
    → OAuth flow completes
  2. Classify
    Go through unread emails from last 24h. Bucket into: urgent reply, FYI, newsletter, spam-like. Count each bucket.✓ 已複製
    → Counts + sample subjects per bucket
  3. Draft replies
    For the 'urgent reply' bucket, draft short replies (don't send). Show me drafts for approval.✓ 已複製
    → Drafts ready for review

結果: 30 minutes of inbox triage in 5.

注意事項
  • LLM hallucinates commitments in drafts — Never have it send directly — always draft + human review

Find a meeting slot across 5 attendees

👤 Anyone scheduling meetings ⏱ ~5 min beginner

何時使用: You need 45 minutes next week that works for 5 people across time zones.

步驟
  1. Check availability
    Find a 45-min slot next week that works for me + these 4 attendees [emails]. Exclude lunch hours in each TZ.✓ 已複製
    → Candidate slots
  2. Create event
    Book the best slot as 'Weekly sync' with a Google Meet link; invite all.✓ 已複製
    → Event created with video link

結果: Meeting scheduled without the Doodle dance.

注意事項
  • Free/busy API only shows free/busy, not priorities — Ask each person before hard-booking optional slots

Audit a Drive folder's sharing permissions

👤 Ops / compliance ⏱ ~30 min intermediate

何時使用: Somebody shared a sensitive folder broadly. You want to know exactly who has access.

步驟
  1. Enumerate
    List all files under /Shared drives/Contracts/2025 with their sharing settings. Flag anything with 'anyone with link' or 'public'.✓ 已複製
    → File list with exposure flags
  2. Remediate
    For each public file, change to 'restricted' and notify the owner. Show me the diff before executing.✓ 已複製
    → Per-file change plan

結果: Drive posture improved in one pass.

注意事項
  • Revoking may break active external workflows — Announce before revoking; use a grace period

組合

與其他 MCP 搭配,撬動十倍槓桿

google-workspace-2 + notion

Mirror Google Docs to Notion weekly

For each Doc created in /Shared/Team this week, export as Markdown and create Notion page in 'Team Docs'.✓ 已複製

工具

此 MCP 暴露的能力

工具輸入參數何時呼叫成本
manage_email action: 'search'|'read'|'send'|'reply'|'label'|..., ... Any Gmail op 1 Gmail API call
manage_calendar action: 'list'|'create'|'update'|'delete'|'freebusy'|..., ... Any Calendar op 1 Calendar API call
manage_drive action: 'search'|'upload'|'download'|'share'|'export'|..., ... Any Drive op 1 Drive API call
manage_accounts action: 'add'|'remove'|'switch'|'list' Multi-account switching free
queue_operations steps[] Chain ops that depend on each other (e.g. create doc, share it) sum of steps

成本與限制

運行它的成本

API 配額
Gmail: 1B units/day (most ops 5-50 units). Calendar/Drive: generous quotas.
每次呼叫 Token 數
Drive list results can be big — paginate
費用
Free; Google Workspace license required for business accounts
提示
Cache account metadata. Gmail search is quota-heavy; scope with label/date filters.

安全

權限、密鑰、影響範圍

最小權限: Gmail.readonly + Calendar + Drive — grant only what you use
憑證儲存: Tokens in OS keychain (XDG-compliant); OAuth refresh handled automatically
資料出站: Your Google data flows through MCP to your LLM provider
切勿授予: Gmail.modify to an unsupervised agent that can also read external URLs

故障排查

常見錯誤與修復

invalid_grant during OAuth

Client ID / redirect URI mismatch. Confirm the redirect URI registered in GCP matches what the MCP uses.

Quota exceeded

Backoff + batch. Gmail send has a daily cap; Drive has per-user/per-second limits.

驗證: Google Cloud Console > APIs > Quotas
Tokens expired despite refresh

Refresh token revoked — re-auth. Common when account password changed or security event triggered.

替代方案

google-workspace-mcp 對比其他方案

替代方案何時用它替代權衡
Official Google Workspace MCP (when/if shipped)Google ships a first-party MCPWould be more authoritative; for now this is the strongest community option
Zapier/Composio hosted Google Workspace toolsYou want hosted + no OAuth setupMiddleware fees; less control

更多

資源

📖 閱讀 GitHub 上的官方 README

🐙 查看未解決的 issue

🔍 瀏覽全部 400+ MCP 伺服器和 Skills