google-workspace-mcp
Skill35 starsChanged 2 months agoMITView on GitHub
Reads and edits Google Docs and Drive files through the user-scope google-workspace MCP and repairs its authentication or connection. Use when the user asks to open or change a Google Doc, or when google-workspace tools report auth errors, missing tools or a failed connection.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- shkodnik1917/claude-brainlabword for word, first seen Nov 8, 2026
- cikeyz/google-workspace-mcptheir own version, first seen Sep 6, 2026
Other versions2 projects use a version of this.
Word for word · 1
- shkodnik1917/claude-brainlab★ 35100% same
Edited · 0
None found.
Wrote their own version · 1
- cikeyz/google-workspace-mcp★ 2same 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.
In this repository68 other files it gives its agents.
- rules/agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- academic-plottingSkill
- agent-identifierSkill
- architecture-designSkill
- astar-paper-reviewSkill
- bug-detectiveSkill
- call-notesSkill
- cavemanSkill
- citation-verificationSkill
- code-ingestSkill
- code-librarySkill
- code-review-excellenceSkill
- command-developmentSkill
- create-projectSkill
- daily-codingSkill
- defuddleSkill
- diagnoseSkill
- doc-coauthoringSkill
- experiment-runsSkill
- frontend-designSkill
- git-guardrails-claude-codeSkill
- git-workflowSkill
- grill-meSkill
- grill-with-docsSkill
- handoffSkill
- handoff-to-jarvisSkill
- hook-developmentSkill
- improve-codebase-architectureSkill
- json-canvasSkill
- kaggle-learnerSkill
- lab-knowledgeSkill
- latex-conference-template-organizerSkill
- mcp-integrationSkill
- ml-paper-writingSkill
- obsidian-basesSkill
- obsidian-cliSkill
- obsidian-experiment-logSkill
- obsidian-markdownSkill
- operon-obsidian-setupSkill
- paper-ingestSkill
- paper-searchSkill
- paper-to-socialSkill
- paper-venue-formattingSkill
- pdf-readerSkill
- planning-with-filesSkill
- plugin-structureSkill
- presentationSkill
- presenter-modeSkill
- prototypeSkill
- research-cycleSkill
- research-ideationSkill
- restore-sessionSkill
- results-analysisSkill
- results-reportSkill
- reverse-outline-flow-checkSkill
- review-responseSkill
- setup-pre-commitSkill
- skill-developmentSkill
- tddSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 4 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
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
- Distinctive: line 16
If something's off, first verify state:
- Very specific: line 136
If curl gets HTTP 200 → ...signin/identifier..., the client is fine — it's a browser issue.
- Distinctive: line 146
Run quick state check (top of file).
- Very specific: line 147
Check token expiry. If expiry in the past → Recipe 1 (re-auth).
- Very specific: line 148
If MCP not in claude mcp list → reregister with Recipe 5 base command.
- Very specific: line 149
If browser returns invalid_client during re-auth → curl-check the URL, then tell user to use incognito.
- Distinctive: line 150
If browser returns 400 → likely Desktop client type instead of Web.
- Distinctive: line 151
If browser returns "Access blocked: not a test user" → add user email in Audience tab of GCP Console.
≈ “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
User-scope MCP google-workspace (package workspace-mcp, taylorwilsdon) gives all Claude agents read+edit access to Google Docs and Drive. This skill is the operational playbook for it.
For full setup history and rationale, see ~/brainlab/handbook/tools/google-workspace.md.
Quick state check
If something's off, first verify state:
# Is MCP registered?
claude mcp list | grep google-workspace
# Do credentials exist?
ls -la ~/.config/google-workspace-mcp/client_secret.json
ls -la ~/.config/google-workspace-mcp/credentials/zeyka666@gmail.com.json
# Token scopes + freshness
python3 -c "
import json
c = json.load(open('/Users/andrey/.config/google-workspace-mcp/credentials/zeyka666@gmail.com.json'))
print('scopes:', len(c.get('scopes', [])))
print('expiry:', c.get('expiry'))
print('has refresh_token:', bool(c.get('refresh_token')))"Recipe 1 — Re-auth (most common task, every ~7 days while app is in Testing)
~/.config/google-workspace-mcp/reauth.shThe script:
- Kills any stale workspace-mcp HTTP server on :8000
- Starts a fresh one (env vars baked in)
- Calls
start_google_authand prints + opens the auth URL in Chrome incognito (also copies to clipboard) - Waits for ENTER in terminal after the user completes browser flow
- Cleans up
Critical: user MUST open the auth URL in an incognito/private window under the correct Google account (Zeyka666@gmail.com). A regular window often returns invalid_client due to multi-account session caching — verified empirically that the URL works via curl even when the user's browser says otherwise.
Recipe 2 — Re-auth manually (when the script isn't enough)
# 1. Stop any stale server
pkill -f "workspace-mcp.*streamable-http"; sleep 1
# 2. Start bootstrap server
GOOGLE_CLIENT_SECRET_PATH=/Users/andrey/.config/google-workspace-mcp/client_secret.json \
WORKSPACE_MCP_CREDENTIALS_DIR=/Users/andrey/.config/google-workspace-mcp/credentials \
USER_GOOGLE_EMAIL=Zeyka666@gmail.com \
WORKSPACE_MCP_PORT=8000 \
OAUTHLIB_INSECURE_TRANSPORT=1 \
nohup uvx --from workspace-mcp workspace-mcp --single-user --tools docs drive --transport streamable-http \
> /tmp/wmcp.log 2>&1 &
sleep 5 && curl -s http://localhost:8000/health
# 3. Get fresh auth URL
uvx --from workspace-mcp workspace-cli --url http://localhost:8000/mcp \
call start_google_auth service_name=docs user_google_email=Zeyka666@gmail.com
# 4. Hand the URL to user. They open it in INCOGNITO.
# 5. After "Authentication Successful" page → stop server:
pkill -f "workspace-mcp.*streamable-http"Recipe 3 — Verify it works end-to-end
# Start HTTP server (as in Recipe 2 step 2)
# Then read a known doc:
uvx --from workspace-mcp workspace-cli --url http://localhost:8000/mcp \
call get_doc_as_markdown \
document_id=<DOC_ID> \
user_google_email=Zeyka666@gmail.com
# Stop server.<DOC_ID> is the path segment from a Google Docs URL: docs.google.com/document/d/<DOC_ID>/edit.
Recipe 4 — Drop full drive scope (if Production publish blocks it)
Full drive is a Google-classified restricted scope. If user publishes the app to Production unverified and gets blocked, downgrade scopes:
claude mcp remove google-workspace --scope user
claude mcp add -s user google-workspace \
-e GOOGLE_CLIENT_SECRET_PATH=/Users/andrey/.config/google-workspace-mcp/client_secret.json \
-e WORKSPACE_MCP_CREDENTIALS_DIR=/Users/andrey/.config/google-workspace-mcp/credentials \
-e USER_GOOGLE_EMAIL=Zeyka666@gmail.com \
-e WORKSPACE_MCP_PORT=8000 \
-e OAUTHLIB_INSECURE_TRANSPORT=1 \
-- uvx --from workspace-mcp workspace-mcp --single-user \
--permissions docs:full drive:readonly --transport stdioThen delete cached token (it has the now-too-broad scopes) and re-auth:
rm ~/.config/google-workspace-mcp/credentials/zeyka666@gmail.com.json
~/.config/google-workspace-mcp/reauth.shRecipe 5 — Add more services (Sheets, Gmail, Calendar)
claude mcp remove google-workspace --scope user
claude mcp add -s user google-workspace \
-e GOOGLE_CLIENT_SECRET_PATH=/Users/andrey/.config/google-workspace-mcp/client_secret.json \
-e WORKSPACE_MCP_CREDENTIALS_DIR=/Users/andrey/.config/google-workspace-mcp/credentials \
-e USER_GOOGLE_EMAIL=Zeyka666@gmail.com \
-e WORKSPACE_MCP_PORT=8000 \
-e OAUTHLIB_INSECURE_TRANSPORT=1 \
-- uvx --from workspace-mcp workspace-mcp --single-user \
--tools docs drive sheets gmail calendar --transport stdioThen re-auth — Google will request consent for the new scopes.
Known traps (don't repeat past mistakes)
- Use Web application OAuth client type, NOT Desktop. Desktop type returns HTTP 400 because Google's loopback policy doesn't match
http://localhost:8000/oauth2callbackagainst the Desktop client's barehttp://localhostregistered URI. The workspace-mcp README incorrectly suggests Desktop is fine. invalid_clientin browser does not mean the client is broken. Always sanity-check withcurlfirst:
If curl getscurl -sL -o /dev/null -w "HTTP %{http_code} → %{url_effective}\n" "<auth_url>"HTTP 200 → ...signin/identifier..., the client is fine — it's a browser issue. Tell user to open in incognito.- Test users must be added in the new Google Auth Platform UI (Audience tab, not the old Credentials → OAuth consent screen). If "ineligible account" error on add, retry with lowercase or wait/refresh.
- State expires. Each
start_google_authcall returns a one-shot URL valid for ~5 minutes. Don't reuse old URLs from chat history. - Don't suggest "publish to Production" lightly. Drive (full) is a restricted scope — unverified Production may block the developer themselves. The 7-day Testing refresh limit is usually less friction than dealing with unverified Production restrictions or scope downgrades.
When user says "google docs not working" — triage order
- Run quick state check (top of file). If credentials JSON missing → setup not done, point to Obsidian note.
- Check token expiry. If
expiryin the past → Recipe 1 (re-auth). - If MCP not in
claude mcp list→ reregister with Recipe 5 base command. - If browser returns
invalid_clientduring re-auth → curl-check the URL, then tell user to use incognito. - If browser returns 400 → likely Desktop client type instead of Web; see Trap 1.
- If browser returns "Access blocked: not a test user" → add user email in Audience tab of GCP Console.
File map
~/.config/google-workspace-mcp/client_secret.json— OAuth client credentials (Web app)~/.config/google-workspace-mcp/credentials/zeyka666@gmail.com.json— refresh+access tokens~/.config/google-workspace-mcp/reauth.sh— one-shot re-auth helper~/.claude.json— MCP server registration (user scope, entrygoogle-workspace)- GCP project:
claude-mcp-workspace(number375915317046), ownerZeyka666@gmail.com - Full setup notes:
~/brainlab/handbook/tools/google-workspace.md
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.

