Logo: Google Workspace Mcp

Google Workspace Mcp

Communautéit
shkodnik1917
google-workspace-mcp

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.

Iwwersiicht

Editeurshkodnik1917
Repositoryclaude-brainlab
Skill-Nummgoogle-workspace-mcp
Stären
35
Forks
5
Matgeliwwert Dateien
Nëmmen Instruktiounen
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    shkodnik1917 huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Google Workspace Mcp an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/shkodnik1917/claude-brainlab/tree/main/skills/google-workspace-mcp
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/shkodnik1917/claude-brainlab.git /tmp/claude-brainlab
mkdir -p .claude/skills
cp -r /tmp/claude-brainlab/skills/google-workspace-mcp .claude/skills/google-workspace-mcp
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Google Workspace Mcp an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Google Workspace Mcp automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Google Workspace Mcp net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

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:

bash
# 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)

bash
~/.config/google-workspace-mcp/reauth.sh

The script:

  1. Kills any stale workspace-mcp HTTP server on :8000
  2. Starts a fresh one (env vars baked in)
  3. Calls start_google_auth and prints + opens the auth URL in Chrome incognito (also copies to clipboard)
  4. Waits for ENTER in terminal after the user completes browser flow
  5. 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)

bash
# 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

bash
# 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:

bash
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 stdio

Then delete cached token (it has the now-too-broad scopes) and re-auth:

bash
rm ~/.config/google-workspace-mcp/credentials/zeyka666@gmail.com.json
~/.config/google-workspace-mcp/reauth.sh

Recipe 5 — Add more services (Sheets, Gmail, Calendar)

bash
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 stdio

Then re-auth — Google will request consent for the new scopes.

Known traps (don't repeat past mistakes)

  1. Use Web application OAuth client type, NOT Desktop. Desktop type returns HTTP 400 because Google's loopback policy doesn't match http://localhost:8000/oauth2callback against the Desktop client's bare http://localhost registered URI. The workspace-mcp README incorrectly suggests Desktop is fine.

  2. invalid_client in browser does not mean the client is broken. Always sanity-check with curl first:

    bash
    curl -sL -o /dev/null -w "HTTP %{http_code} → %{url_effective}\n" "<auth_url>"

    If curl gets HTTP 200 → ...signin/identifier..., the client is fine — it's a browser issue. Tell user to open in incognito.

  3. 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.

  4. State expires. Each start_google_auth call returns a one-shot URL valid for ~5 minutes. Don't reuse old URLs from chat history.

  5. 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

  1. Run quick state check (top of file). If credentials JSON missing → setup not done, point to Obsidian note.
  2. Check token expiry. If expiry in the past → Recipe 1 (re-auth).
  3. If MCP not in claude mcp list → reregister with Recipe 5 base command.
  4. If browser returns invalid_client during re-auth → curl-check the URL, then tell user to use incognito.
  5. If browser returns 400 → likely Desktop client type instead of Web; see Trap 1.
  6. 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, entry google-workspace)
  • GCP project: claude-mcp-workspace (number 375915317046), owner Zeyka666@gmail.com
  • Full setup notes: ~/brainlab/handbook/tools/google-workspace.md

Heefeg gestallte Froen

Wat mécht de KI-Skill Google Workspace Mcp?

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.

Firwat Google Workspace Mcp op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Google Workspace Mcp besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Google Workspace Mcp an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/shkodnik1917/claude-brainlab/tree/main/skills/google-workspace-mcp an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Google Workspace Mcp benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Google Workspace Mcp benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Google Workspace Mcp domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Google Workspace Mcp gratis?

Jo. shkodnik1917 huet de Skill ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇