Google Workspace MCP

io.github.Servosity由 GitHub 帳號 Servosity 發布v0.1.5更新於 Nov 5, 2026

Cross-client Google Workspace admin: 2SV gaps, license waste, sharing drift, safe offboarding.

概覽

AI 產生的概覽

供多租戶 Google Workspace 管理使用的本機 MCP 伺服器與命令列工具,讓助理跨客戶租戶稽核兩步驗證缺口、授權浪費、共用設定漂移與離職處理。

可以做什麼
  • 跨所有已註冊租戶執行報表:兩步驗證缺口、閒置授權、離職人員、整體態勢、共用設定漂移、高風險 OAuth 應用程式與登入警示
  • 檢視與管理使用者、群組、組織單位、網域與別名,例行寫入可先以試執行預覽
  • 執行憑證與安全操作,例如備份驗證碼、兩步驗證設定、權杖撤銷、強制登出與管理員角色指派
  • 預覽並執行離職處理流程,以及授權、轉移、經銷商與裝置相關操作
  • 將單一租戶同步到本機 SQLite 鏡像,並以搜尋、分析與原始 SQL 工具查詢
適用情境
適合管理多個 Google Workspace 組織的託管服務商或管理員,希望助理直接回答跨客戶問題,例如誰未啟用兩步驗證、哪裡浪費了授權、哪些離職帳號尚未清理乾淨,而不必逐一登入管理控制台。
執行需求
以本機程序在使用者電腦上執行(僅桌面端),可透過 .mcpb 套件或專案安裝腳本安裝,後者同時提供用來註冊租戶的 google-workspace-cli。每個客戶需要一個啟用全網域委派的 Google Cloud 服務帳戶,並開啟 Admin SDK、Enterprise License Manager(可選 Cloud Identity 或 Reseller)API。選用環境變數包括供單一組織使用的 GOOGLE_WORKSPACE_TOKEN、GOOGLE_WORKSPACE_TENANT、GOOGLE_WORKSPACE_MCP_READ_ONLY、GOOGLE_WORKSPACE_NO_LOCAL_DATA,以及 HTTP 傳輸用的 GOOGLE_WORKSPACE_MCP_HTTP_TOKEN。
安裝前請注意
具全網域委派的服務帳戶金鑰可廣泛存取客戶資料;預設的唯讀範圍設定仍可撤銷權杖、強制登出、讀取備份驗證碼、關閉兩步驗證與變更授權。離職寫入需要完整範圍設定,而該設定也允許刪除使用者與授予超級管理員。破壞性與計費操作(offboard --yes、刪除使用者與群組、授權與訂閱變更、裝置抹除)以及資料外送指令(watch 註冊、webhook 投遞)應保留人工確認。除非停用,否則會在本機保留 Workspace 資料的 SQLite 鏡像。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Google Workspace MCP,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Google Workspace + AI - for Claude, the ChatGPT desktop app, GitHub Copilot, Gemini CLI, and any agent that speaks MCP

Unofficial. Community-built Claude Code Skill and MCP server for the Google Workspace API. Not affiliated with, endorsed by, or sponsored by Google LLC.

[Google Workspace demo - animated preview]

▶ Watch the 30-second demo - demo data is simulated; every command shown exists in the real CLI.

Cross-client Google Workspace admin: 2SV gaps, license waste, sharing drift, safe offboarding. Works with the AI you already use - Claude Desktop, Codex, Claude Code, Claude Cowork, and GitHub Copilot, no code required - plus the ChatGPT desktop app and Gemini CLI. Free, open source, runs on your laptop. Built for MSP owners.

Works with your agent

The agents MSP owners use most (self-serve, works today):

Your AI agentHow to install the Google Workspace skill
Claude DesktopRun installer, then Settings > Extensions to register google-workspace-mcp (no JSON editing).
Codex CLIPaste the install prompt below.
Claude CodePaste the install prompt below.
Claude CoworkPaste the install prompt below.
GitHub Copilot (VS Code)Run installer, add google-workspace-mcp to mcp.json under the servers key, then pick Agent mode.

Also for ChatGPT and the Microsoft and Google stacks

Big install base, but an honest heads-up: Gemini CLI runs the local binary you just installed, while Microsoft 365 Copilot and the Gemini app need a remote server, which msp-skills does not support yet.

AgentWhat it takes
ChatGPT (desktop app)Run installer, then add google-workspace-mcp in Settings > MCP servers as a local (STDIO) server. ChatGPT on the web is not supported yet.
Microsoft 365 Copilot / Copilot StudioNot supported by msp-skills yet: it needs a remote server. A hosted gateway is the better pick; check that your AI app is on the gateway's setup list.
Google GeminiGemini CLI is local - same as Claude Code. See mcp-install.md. The Gemini app needs a remote server and is not supported by msp-skills yet.

Skill-native agents (also covered): Hermes and OpenClaw read this skill's SKILL.md directly and speak MCP - see their install sections below. Also works with Cursor, Windsurf, Cline, Continue.dev, and Zed via MCP. Full per-tool wire-up: docs/which-agent.md.

Run more than one agent? Install across all 51+ supported agents in one command: npx skills add Servosity/msp-skills@latest (requires Node.js, then run the per-skill installer for the CLI/MCP binaries). See docs/which-agent.md.

Install in 60 seconds

Fastest for Claude Desktop - one-click .mcpb

Download Google Workspace MCP (.mcpb) - then open Claude Desktop > Settings > Extensions and select the file. One click, no JSON, no shell. Client tenants are registered with the CLI (tenants add is CLI-only), so install it too (Path B below). (Browse every Google Workspace release on the releases page.)

Prefer the Claude Code plugin? Add the marketplace once, then install - works immediately, no directory listing required:

/plugin marketplace add Servosity/msp-skills/plugin install google-workspace@msp-skills

Path A - paste one prompt into your AI agent (recommended)

Copy this into Claude Code, Codex CLI, or Claude Cowork:

Install the Google Workspace Skill and MCP server from Servosity/msp-skills in this agent workspace. If this workspace uses a POSIX shell (macOS, Linux, WSL, or Bash), run bash <(curl -fsSL https://raw.githubusercontent.com/Servosity/msp-skills/main/skills/google-workspace/install.sh). If it uses Windows PowerShell, run iwr -useb https://raw.githubusercontent.com/Servosity/msp-skills/main/skills/google-workspace/install.ps1 | iex. Then authenticate per the README and run google-workspace-cli --help to explore.

The same prompt works in any agent that can run shell.

Path B - run the installer yourself

Windows (PowerShell):

powershell
iwr -useb https://raw.githubusercontent.com/Servosity/msp-skills/main/skills/google-workspace/install.ps1 | iex

macOS / Linux:

bash
bash <(curl -fsSL https://raw.githubusercontent.com/Servosity/msp-skills/main/skills/google-workspace/install.sh)

The installer drops both google-workspace-cli (the CLI) and google-workspace-mcp (the MCP server) into your user bin path. Claude Code, Codex, and Cowork discover the Skill via SKILL.md in this directory.

Verify:

bash
google-workspace-cli --version

Upgrade to the latest version

The installer always fetches the current release - re-run it to upgrade:

macOS / Linux:

bash
bash <(curl -fsSL https://raw.githubusercontent.com/Servosity/msp-skills/main/skills/google-workspace/install.sh)

Windows (PowerShell):

powershell
iwr -useb https://raw.githubusercontent.com/Servosity/msp-skills/main/skills/google-workspace/install.ps1 | iex

Claude Desktop .mcpb users: download the latest .mcpb (top of this section) and re-select it in Settings > Extensions. Claude Code plugin users: /plugin update google-workspace@msp-skills.

Add to Claude Desktop, the ChatGPT desktop app, GitHub Copilot, Gemini CLI, or another MCP client

After the installer runs, see mcp-install.md and docs/which-agent.md for the per-agent wire-up - one section per agent, including the GitHub Copilot servers key and the ChatGPT desktop app. Claude Desktop's Settings > Extensions panel is the simplest path; the MCP config block (for users who prefer editing JSON) is documented in mcp-install.md.

Install for Hermes

From the Hermes CLI:

bash
hermes skills install servosity/msp-skills/skills/google-workspace --force

Inside a Hermes chat session:

/skills install servosity/msp-skills/skills/google-workspace --force

Hermes speaks MCP natively, so it can also use the google-workspace-mcp server directly - same install path, same env vars.

Install for OpenClaw

Tell your OpenClaw agent (copy this):

Install the google-workspace skill from https://github.com/servosity/msp-skills/tree/main/skills/google-workspace. The skill defines how its required CLI (google-workspace-cli) can be installed via the openclaw: frontmatter block.

OpenClaw isn't generally available yet; the frontmatter wiring is pre-shipped and will activate the moment OpenClaw launches.

Authenticate

Each client is a tenant: a Google Cloud service account with domain-wide delegation that impersonates that client's super admin. Set one up per client:

  1. In a Google Cloud project, enable the Admin SDK API and the Enterprise License Manager API (plus the Cloud Identity API if you will use the policy profile, and the Google Workspace Reseller API for your reseller domain), create a service account, and download its JSON key. (Google Cloud organizations created since May 2024 block key creation by default; an org admin has to allow it for that project.)

  2. Register the client. The key is copied into the CLI's config directory with owner-only permissions (mode 0600 on macOS and Linux; on Windows the file inherits the config folder's permissions), so delete the downloaded original afterwards:

    bash
    google-workspace-cli tenants add acme --domain example.com --admin [email protected] --key ./acme-sa.json
  3. Paste the printed Client ID and scopes into the client's Admin console > Security > Access and data control > API controls > Domain-wide delegation (google-workspace-cli tenants scopes acme prints them again).

  4. Confirm Google issues a token for every scope you delegated:

    bash
    google-workspace-cli tenants test acme

The default read scope profile covers every report. Profiles combine with commas, and only full includes read: use --scopes full for offboarding writes (it also authorizes every user write, including deleting users and granting super admin), --scopes read,policy (or full,policy) to add the current 2SV, Drive sharing, and Gmail forwarding policy to posture, and register your own reseller domain with --reseller --scopes reseller (it is excluded from --all-tenants). --scopes policy on its own replaces read and leaves the reports nothing to read. Pick a client per command with --tenant <name> (or GOOGLE_WORKSPACE_TENANT), or fan out with --all-tenants.

Managing a single organization? Set GOOGLE_WORKSPACE_TOKEN to an OAuth access token that carries the Admin SDK scopes instead of registering tenants; the reports then run against that one organization. Once tenants are registered the token is no longer used: a command run without --tenant (when more than one tenant is registered) refuses instead of acting on the token's organization.

google-workspace-cli tenants test --all-tenants is the real credential check: it mints a token per scope for every registered client, reads each client's customer record and domains, and exits non-zero when any delegation is missing. It cannot tell you whether the License Manager or Cloud Identity APIs are enabled (the first report that needs them will), and with no tenants registered it has nothing to check. doctor probes one real read endpoint with the selected tenant's token (--tenant <name>, or the only registered tenant) or the single-org token and reports a rejected or wrong-host credential as ERROR, but it exits 0 unless you pass --fail-on error.

What this skill does

Question your MSP keeps askingCommand
Which accounts across all my clients lack 2-Step Verification, admins first?google-workspace-cli mfa-gaps --all-tenants
Which Google Workspace licenses sit on suspended, never-signed-in, or idle accounts?google-workspace-cli stale-licenses --all-tenants
Did our suspended leavers keep a license, groups, an admin role, OAuth tokens, or an unfinished Drive transfer?google-workspace-cli leavers --all-tenants
One row per client for the QBR: 2SV coverage, admins without 2SV, stale licenses, Drive, Calendar and app-sharing setting changesgoogle-workspace-cli posture --all-tenants
Who changed Drive or Calendar settings, and how many files went external or public (with sample names) this week?google-workspace-cli sharing-drift --all-tenants --since 7d
Which third-party apps hold full mail, full Drive, or admin access to client data?google-workspace-cli oauth-apps --all-tenants --min-risk high
Any suspicious sign-ins, hijacked accounts, or 2SV turned off this week?google-workspace-cli login-alerts --all-tenants --since 7d
What would offboarding this leaver do, step by step, before anything changes?google-workspace-cli offboard "[email protected]" --successor "[email protected]" --ou "/Departed"
Is every client's domain-wide delegation still authorized?google-workspace-cli tenants test --all-tenants

Full command reference: guide.md. For the AI-agent operating contract (--agent, --dry-run, when to confirm before mutating), see AGENTS.md.

What makes this different

Most Google Workspace MCP servers, such as taylorwilsdon/google_workspace_mcp, work inside one organization's Gmail, Drive, and Docs. GAM, the tool most MSPs use for Workspace administration, keeps one config section per client and can loop a command over every section into one CSV, but you write the loop, the query, and any join across users, licenses, admin roles, and audit logs yourself, for each question.

This skill keeps a registry of client tenants, each with its own service account and least-privilege scope profile, and fans one question out across all of them in parallel. mfa-gaps, stale-licenses, leavers, posture, sharing-drift, oauth-apps, and login-alerts already do those joins per client and return one ranked table; a client it could not read is listed in fetch_failures, never silently dropped. For deeper single-client work, sync pulls one tenant into a local SQLite mirror (kept separate per tenant) for search, analytics, and the MCP server's sql tool.

The pain this closes

On r/msp's "Google Workspace Management" thread (June 2026), the original poster asked for "a CIPP equivalent for the GW side." An MSP managing about 10 Workspace tenants out of roughly 250 clients called it "a manual process for the most part," and the most common answer was multi-tenant GAM: "you just GAM select company to switch companies." Microsoft gives MSPs GDAP and CIPP; Google gives them a separate Admin console per client. So the questions an owner asks across the whole book - who lacks 2SV, where licenses are wasted, which leavers were never fully cleaned up - become a loop of logins, exports, and spreadsheet joins. Leavers cost real money: Google bills a suspended account the same as an active one.

This skill closes that gap:

  • google-workspace-cli mfa-gaps --all-tenants - every account without 2SV across every client, unenrolled admins first.
  • google-workspace-cli stale-licenses --all-tenants - Workspace and paid Education edition seats on suspended, never-signed-in, or idle accounts, ready to reclaim (--products replaces the default Google-Apps,101031, so list them too: --products Google-Apps,101031,Google-Vault).
  • google-workspace-cli leavers --all-tenants - suspended accounts still holding a license, groups, an admin role, OAuth tokens, or an unfinished Drive transfer.
  • google-workspace-cli offboard "[email protected]" --successor "[email protected]" - the offboarding runbook, previewed with live reads before anything changes, with suspend last because backup-code cleanup fails on a suspended account.
  • google-workspace-cli posture --all-tenants - one row per client for the QBR.

See pain-point.md for the longer narrative.

Frequently asked questions

Does this work with ChatGPT?

Yes, in the ChatGPT desktop app. It runs MCP servers locally (STDIO), the way google-workspace-mcp runs, and shares MCP configuration with Codex (OpenAI): add google-workspace-mcp under Settings > MCP servers as a STDIO server, or add it once to Codex's ~/.codex/config.toml. ChatGPT on the web is not supported by msp-skills yet: it needs a remote server. If your team works there, a hosted gateway is the better pick; check that your AI app is on the gateway's setup list. Setup steps: mcp-install.md.

Does this work with Codex, Cursor, Windsurf, Cline, Copilot, or Gemini?

Yes - all of them speak MCP. Cross-tool install commands are in the matrix above and the deep-dive in docs/which-agent.md.

Do I need to know how to code?

No. The recommended install is to paste one sentence into Claude Code or Codex - your agent reads SKILL.md and does the install. The fallback is a one-line installer per OS (bash or PowerShell). Neither path requires writing code. You register each client once with google-workspace-cli tenants add (see Authenticate above).

Is my Google Workspace data safe?

Your data stays on your machine. The CLI and MCP server are local binaries. The SQLite mirror sits in a directory under your user account. The AI agent only sees what the CLI returns - typically a query result, not raw bulk data. Each client's service-account key is copied into the CLI's config directory with owner-only permissions (mode 0600 on macOS and Linux; on Windows the file inherits the config folder's permissions) and used only to mint short-lived tokens from Google; keys are never bundled into this repo or transmitted anywhere by MSP Skills.

Do I need to be a Google partner or reseller?

No. Each client tenant is just a service account that the client's own super admin authorizes for domain-wide delegation. Reseller status only matters for the Reseller API commands (reseller-customers, subscriptions), which run against your own reseller domain registered with --reseller --scopes reseller.

Can an agent change my clients' Google Workspace, or only read?

Only what you authorize per client. The default read scope profile covers every report, but Google has no read-only scope for OAuth tokens and app passwords, and none for license assignments, so that profile can still revoke tokens, sign users out, read backup codes, turn off 2SV, and change licenses. Keep those commands human-in-the-loop (see the safety model below). Offboarding writes need --scopes full, and offboard only previews unless you type --yes yourself, which an MCP client cannot pass.

Will this hit Google's API quotas?

The cross-client commands query Google live, so they count against the Admin SDK quota of the Google Cloud project that owns each client's service account. --concurrency caps how many clients run in parallel, --max-scan-pages caps paging, and a client whose calls fail or hit the cap is listed in fetch_failures instead of silently dropped.

Does it replace the Google Admin console?

No. The Admin console stays the place for deep single-client work and for settings the API does not expose. This skill adds the cross-client view the console does not have and lets your AI agent drive it in plain English.

What does it cost?

Free. Apache-2.0 licensed. You pay only for whichever AI agent you use (Claude, ChatGPT, Codex, etc.), and that's billed by your AI provider, not by us.

Safety model

TierExamplesRecommended agent policy
Readmfa-gaps, stale-licenses, leavers, posture, sharing-drift, oauth-apps, login-alerts, tenants list, users list, sync, offboard "<email>" without --yes (a preview)Allow
Write (routine)users insert/patch, users aliases insert, groups insert/patch, members insert, orgunits insert/patch, users undelete, domains insert, tenants add and tenants test (local config only; a tenant whose key resolves to another organization is quarantined and its local mirror moved aside)Preview with --dry-run, then a reviewed write
Credential / securityverification-codes list (returns a user's live backup codes), verification-codes generate/invalidate, two-step-verification (turns 2SV off), tokens delete, asps delete, users sign-out, users make-admin, users patch/update with --password, role-assignments insert, roles insert/patch/update/deleteHuman-in-the-loop only
Data egressactivities watch, users watch, users aliases watch (Google pushes a client's audit events or user changes to the --address URL you give it; they work under the default read profile), resellernotify register, and any report run with --deliver webhook:<url>Human-in-the-loop only
Destructive / billingoffboard --yes, users delete, groups delete, domains delete, transfers insert, license-assignments insert/update/patch/delete, subscriptions insert/change-plan/change-seats/change-renewal-settings/start-paid-service/activate/suspend/delete, reseller-customers insert, mobiledevices action (device wipe), chromeosdevices action, customer devices-chromeos issue-command/batch-change-statusHuman-in-the-loop only, explicit confirmation

The strongest control is the scope profile you authorize in each client's Admin console - the CLI can only do what that client's domain-wide delegation permits. Full details, including how to lock it down, are in governance.md.

Status

Beta. Validated against the Google Workspace API surface and being validated with MSPs running it live against their own production tenant in our weekly Build Sessions. RSVP at compoundingteams.com/build-sessions.


Standards. Conforms to the open Agent Skills spec (Anthropic, Dec 2025; 40+ agents). MCP-compatible - works with any MCP-capable agent including Hermes. OpenClaw-ready (frontmatter pre-wired, awaiting OpenClaw launch).

Maintained by Servosity. Apache-2.0 licensed. Built with CLI Printing Press. Last updated: 2026-10-13.

來源:skills/google-workspace/README.md,提交 6b7797e

工具

0
SourceWeft 曾在隔離沙箱中以無憑證方式啟動該軟體包一次,以列出其工具,但未能完成:該軟體包類型無法在沙箱中執行。

版本歷史

6
  1. v0.1.5最新Nov 5, 2026
  2. v0.1.4Nov 5, 2026
  3. v0.1.3Oct 23, 2026
  4. v0.1.2Oct 22, 2026
  5. v0.1.1Oct 16, 2026
  6. v0.1.0Oct 15, 2026

評分

已滿足適用檢查項的 40%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。