google-workspace-mcp
Skill2 starsChanged 2 months agoMITView on GitHub
Maintain the personal Google Workspace MCP server.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- shkodnik1917/claude-brainlabtheir own version, first seen Nov 8, 2026
- Vepricov/claude-brainlabtheir own version, first seen Nov 1, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- shkodnik1917/claude-brainlab★ 35same name
- Vepricov/claude-brainlab★ 35same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 54
Add new scopes to the bundled skill's setup/setup.py SCOPES list — that file is the scope source of truth for both setup and the MCP …
- Very specific: line 59
Verify with --check: AUTHENTICATED (partial) listing missing scopes is EXPECTED until consent completes.
- Very specific: line 60
Do NOT --revoke first — the exchange overwrites the token, so a failed consent leaves the old token working.
- Very specific: line 88
Run setup/tests/verify_server.py with the .venv python (env -u PYTHONPATH).
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Google Workspace MCP (Personal)
The Hermes profile runs a Google Workspace MCP server (google-workspace) authenticated as you's personal Google account (you@gmail.com). Switched from the ExampleCo intern-hiring account on 2026-09-06; company token and client secret kept as .exampleco-backup files in hermes home, nothing revoked. This skill covers maintaining that integration: tool inventory, OAuth scopes, GCP API enablement, re-consent flow, and verification. Use it whenever the google_workspace MCP tools are extended, misbehave, or return scope/API errors.
When to Use
- Extending the google-workspace MCP server with new tools/services (add to server.py + setup.py SCOPES + verify script).
- Re-consent / scope upgrade flows, or debugging
403 insufficient authentication scopes/SERVICE_DISABLEDon google_workspace tools. - Enabling Google APIs in the GCP console for this project (example-gcp-project).
- Any session touching
mcp_servers\google_workspace\or the personal Google account token.
Key paths (canonical home — reference copy; live skill stays in the Hermes skills tree until Phase 2)
- Server:
C:\Users\YOU\.agents\mcps\google-workspace\server.py(MCPServer,mcp==2.1.1pinned) - Interpreter:
C:\Users\YOU\.agents\mcps\google-workspace\.venv\Scripts\python.exe— MUST stay self-sufficient (the MCP client spawns a filtered env, no PYTHONPATH) - Config per harness (all launch the canonical server; Hermes still points at its old copy until Phase 2): opencode
opencode.json, Codexconfig.toml, ZCodeconfig.json, Hermesconfig.yaml→mcp_servers.google-workspace - Auth:
GOOGLE_WORKSPACE_HOME→ state dir holdinggoogle_token.json+google_client_secret.json(legacyHERMES_HOMEstill honored as fallback); OAuth client "CK's Workspace" (GCP project example-gcp-project / 000000000000), redirecthttp://localhost:1 - Scope source of truth: canonical
setup/setup.pySCOPES list (also the auth tool:--auth-url/--auth-code/--check) - Tests: canonical
setup/tests/verify_server.py(quick) +test_server.py(full E2E) — run withHERMES_HOMEset to the state home
Service matrix (11 services, 73 tools + 4 prompts - v2.3 envelopes, see MIGRATION-v2.md)
| Service | API to enable (console) | Scope | Tools |
| sheets v4 | Sheets API | spreadsheets | metadata, read, update, append, create, conditional_formats |
| drive v3 | Drive API | drive | search, get, download, upload, create_folder, share, trash, permissions, copy, update |
| docs v1 | Docs API | documents | read, create, append, update |
| forms v1 | Forms API | forms.body, forms.responses.readonly | list, get, responses |
| gmail v1 | Gmail API | gmail.readonly, gmail.send, gmail.modify | search, get, thread_get, attachment_download, send |
| calendar v3 | Calendar API | calendar | list, get, create, delete, patch, freebusy |
| people v1 | People API | contacts.readonly | contacts, search, get |
| slides v1 | Slides API | presentations | get, create, update |
| tasks v1 | Tasks API | tasks | lists, list, get, create, update, delete |
| chat v1 | Chat API | chat.messages, chat.spaces.readonly, chat.memberships.readonly | spaces, messages, send, members |
| meet v2 | Meet API | meetings.space.created, meetings.space.readonly | create_space, get_space |
Console enable link pattern: https://console.cloud.google.com/apis/api/<api>.googleapis.com/overview?project=example-gcp-project — Calendar uses calendar-json.googleapis.com. Full inventory + enablement state: references/server-inventory.md (company-era filename, contents still valid).
Scope upgrade / re-consent flow (verified 2026-08-11)
- Add new scopes to the bundled skill's
setup/setup.pySCOPES list — that file is the scope source of truth for both setup and the MCP server's token. - Generate the URL with GOOGLE_WORKSPACE_HOME set (otherwise setup.py resolves a default home and the pending PKCE state lands in the wrong place):
env -u PYTHONPATH .venv/Scripts/python.exe <skill>/setup/setup.py --auth-url - User opens URL (uses
prompt=consent, forcing a full re-consent screen with all scopes), approves, pastes back thehttp://localhost:1/?code=...redirect URL. - Exchange:
--auth-code '<url>'— overwrites the token file and stores only the scopes actually granted. - Verify with
--check:AUTHENTICATED (partial)listing missing scopes is EXPECTED until consent completes; the missing list must match exactly the newly added scopes. - Do NOT
--revokefirst — the exchange overwrites the token, so a failed consent leaves the old token working. - New tools only appear in a NEW Hermes session (one server process per session).
Write safety: staged-write protocol (2026-08-11)
No google_* write tool touches Google directly. Each one STAGES: it snapshots the current state, runs deterministic checks, and returns operation_id + preview + checks WITHOUT applying. The agent reviews the preview, then applies via google_write_commit(operation_id) (single-use; revalidates live state first — e.g. refuses if the range/event/task changed since staging) or discards via google_write_cancel(operation_id). google_write_list_staged() shows pending ops. Read tools are never gated.
Hardening (2026-08-11): google_write_commit fails closed in cron (HERMES_CRON_SESSION set → blocked unless HERMES_ALLOW_CRON_WRITES=1); staged ops expire after 24h and cap at 20 concurrent; commits are logged to <HERMES_HOME>/logs/google-write-audit.jsonl by both the server and the google-write-guard plugin (audit-only, no prompts).
Testing: setup/tests/test_server.py is the full battery (71 tools + 4 prompts, live reads across services, E2E stage→commit→verify→cleanup per write tool with GW-TEST- artifacts, double-commit/cron/TTL/cap semantics, audit growth). setup/tests/verify_server.py is the quick 5-check battery. Run both after every server change.
MAINTENANCE RULE: when adding a write tool to server.py, (1) implement it with the _stage(...) pattern (apply_fn + checks + preview + optional revalidate), (2) add its name to AUDITED_TOOLS in the plugin, (3) add it to both test scripts' expected tool sets, (4) run test_server.py.
Pitfalls
- Emoji/special-char tab names (ExampleCo sheets): team tabs are emoji-prefixed, e.g.
🔄 ALL_COMBINED_MASTER,⛏️ Anne (US, UK, ES, AU). Safest: single-quote the tab name in A1 notation:'🔄 ALL_COMBINED_MASTER'!A1:N10. Verified 2026-08-13: an emoji-only name with no spaces (🔄 ALL_COMBINED_MASTER!A1:L2) ALSO parsed unquoted, so emoji alone is not the breaker — spaces/parentheses are (the miner tabs like⛏️ Anne (US, UK, ES, AU)need quotes). When any range parse fails, callgoogle_sheets_metadatafirst —sheets[].properties.titleis the authoritative tab-name list (also gives sheetIds, index, frozen rows, grid size) and reveals emoji/whitespace not visible in task docs. - Conditional formats are NOT exposed by the MCP tools: to verify sheet-side rules (e.g. playbook-promised duplicate highlighting) use the read-only probe
setup/tests/check_conditional_formats.py <SPREADSHEET_ID>(spreadsheets.get fieldssheets(properties(sheetId,title),conditionalFormats); prints per-tab rules, "no conditional formats" = gate absent). Run withenv -u PYTHONPATH+C:/...paths. - PYTHONPATH masking: git-bash exports PYTHONPATH → hermes-agent venv, which shadows the .venv. Always
env -u PYTHONPATHwhen running the .venv python for tests; a "wrong" package path in a traceback usually means this, not a missing install. - google-auth >= 2.55 client_id read-only:
creds.client_id = ...raisesAttributeError: property 'client_id' ... has no setter. The refresh branch of_get_creds()must REBUILD the Credentials from merged token+client info (Credentials.from_authorized_user_info({**info, "client_id": ...})), never mutate attributes. Token-expiry is the only trigger — a valid token hides this bug until the first refresh. - MSYS
~mangling:~/AppData/...passed as a python arg becomesC:\c\Users\.... UseC:/Users/...Windows-style paths. - API enablement propagation:
403 SERVICE_DISABLEDright after enabling an API in the console is normal — retry after ~5 minutes before touching the console again. - drive search query:
queryis a full Drive API query string (name contains 'X'); bare words →400 Invalid Value. - Pre-consent 403s: tasks/slides/chat/meet return
403 insufficient authentication scopesuntil the new scopes are consented — that is the designed failure mode, not a code bug. - MCPServer introspection:
mcp._tool_manager.list_tools()returns a LIST of tool objects (use.name), not a dict. - Invocation pattern:
env -u PYTHONPATH+ explicitC:/...paths are the reliable way to run this venv's python from git-bash.
Verification
Run setup/tests/verify_server.py with the .venv python (env -u PYTHONPATH). Expected: 73 tools + 4 prompts registered, calendar list + people contacts + tasks lists PASS live (all 19 scopes granted 2026-09-06). Extend the script when adding tools.
User preference
For Google Cloud console work, hand over clickable console enable links by default. CLI tools (e.g. gcloud) are allowed when the user asks — gcloud 583.0.0 was installed machine-wide on 2026-09-06 at you's request (supersedes the 2026-08-11 console-only note).
References
references/server-inventory.md— full tool inventory, API enablement status, token scope statesetup/tests/verify_server.py— re-runnable verification battery for the serversetup/tests/check_conditional_formats.py— read-only per-tab conditional-format probe (see Pitfalls)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

