google-workspace-setup

google-workspace-setup is a command for coding agents from rajool/google-workspace-mcp. It costs 41 tokens per session (707 once invoked), scanned A, original, MIT.

A command that sets up a Google Workspace connector for multiple accounts. Google Workspace is the collection of services such as Gmail, Calendar, and Drive.

In plain words
What is it for?
Use it to prepare the connector, configure accounts, authorize them in a browser, and connect it to the current project.
Why use it?
It organizes prerequisite checks, OAuth authorization, account configuration, and project wiring in one setup process.

Command

Part of the google-workspace-mcp plugin — 1 command shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/rajool/google-workspace-mcp/google-workspace-setup
Clone the repo
git clone --depth 1 https://github.com/rajool/google-workspace-mcp

Or install google-workspace-mcp, the plugin that ships this one along with the rest of its 1 command.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for google-workspace-setup

README.md
[![agentmods](https://agentmods.dev/badge/commands/rajool/google-workspace-mcp/google-workspace-setup.svg)](https://agentmods.dev/commands/rajool/google-workspace-mcp/google-workspace-setup)
Your own site
<a href="https://agentmods.dev/commands/rajool/google-workspace-mcp/google-workspace-setup"><img src="https://agentmods.dev/badge/commands/rajool/google-workspace-mcp/google-workspace-setup.svg" alt="Measured on agentmods" height="20"></a>
Per session 41 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 707 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00041 $0.00707
Opus 5 $0.00020 $0.00353
Sonnet 5 $0.00008 $0.00141
Haiku 4.5 $0.00004 $0.00071

Measured 4d ago against content hash a524a773f005, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

google-workspace-setup scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/google-workspace-setup.md · 68 lines

How it starts

The opening of the file, as written. The whole thing — 68 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Google Workspace MCP — setup

Guide the user through standing up the multi-account Google Workspace MCP server. Be concise; do the mechanical steps yourself. Never ask the user to paste secrets into chat — only to place files or click Allow.

1. Prerequisites

  • uv --version — if missing, point to https://docs.astral.sh/uv/ and stop.
  • OAuth client secret at ~/.config/google-workspace-mcp/credentials.json (honor $GWM_HOME / $GWM_CREDENTIALS / $XDG_CONFIG_HOME). If missing, walk them through Google Cloud Console (own project; enable Gmail, Calendar, Drive APIs; OAuth consent screen External + add their accounts as test users; create an OAuth client → Desktop app; download and save to that path).
  • Server binary on PATH: google-workspace-mcp --help. If missing: uv tool install git+https://github.com/rajool/google-workspace-mcp (or uv tool install . from a local clone).

2. Define accounts

Pick a short slug per account. Either create ~/.config/google-workspace-mcp/accounts.json (see accounts.example.json in the repo) or plan to pass them inline via GWM_ACCOUNTS.

3. Authorize each account

The authorize CLI prints a Google consent URL and waits on a localhost redirect. The key rule: open the URL in a browser signed into the account being authorized.

For each account:

  1. Run in the background: google-workspace-authorize <slug> (account already in the registry), or google-workspace-authorize <slug> <email> "<Display Name>" to register a new one. It prints AUTH_URL: <url>.
  2. If the Claude in Chrome extension is connected, call list_connected_browsers, pick the browser whose name matches that account's email, select_browser it, navigate to the AUTH_URL, and click through the unverified-app warning → Continue → Select all → Continue. Otherwise hand the user the URL for the right browser/profile.
  3. The CLI writes ~/.config/google-workspace-mcp/tokens/<slug>.json.

Read the full file on GitHub · 68 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 68 lines · 41 tokens per session scan A a524a773f005

Subscribe to this mod's changes

google-workspace-setup is a command published in the GitHub repository rajool/google-workspace-mcp (2 stars, last pushed today), licensed MIT. It adds 41 tokens to every session and 707 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.