Logo di Google Workspace Mcp

Google Workspace Mcp

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

Panoramica

Pubblicato dashkodnik1917
Repositoryclaude-brainlab
Nome della skillgoogle-workspace-mcp
Stelle
35
Fork
5
File inclusi
Solo istruzioni
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • Tutto nelle istruzioni

    Tutto ciò che serve al modello è nelle istruzioni: nessun file aggiuntivo da sincronizzare.

  • Open source

    Pubblicata da shkodnik1917 su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Google Workspace Mcp in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/shkodnik1917/claude-brainlab/tree/main/skills/google-workspace-mcp
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

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
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Google Workspace Mcp in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Google Workspace Mcp non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Google Workspace Mcp non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

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

Domande frequenti

Cosa fa la skill IA 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.

Perché usare Google Workspace Mcp su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Google Workspace Mcp è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Google Workspace Mcp in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/shkodnik1917/claude-brainlab/tree/main/skills/google-workspace-mcp. TypingMind legge il file SKILL.md e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Google Workspace Mcp?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Google Workspace Mcp?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Google Workspace Mcp: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Google Workspace Mcp è gratuita?

Sì. È pubblicata su GitHub da shkodnik1917 con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇