The Rule
NEVER use Anthropic’s mcp__claude_ai_Gmail proxy for Rian. Tokens expire silently, can’t be refreshed from CLI, and caused March 23 outage. Use Google Workspace CLI (gws) exclusively.
Why: Anthropic proxy tokens expire without warning. GWS CLI uses refresh_tokens that auto-renew. Independence from any third-party proxy.
How to apply: Every Rian email task starts with gws gmail ... commands. If gws auth status shows none, run gws auth login -s gmail,calendar.
Tool: Google Workspace CLI (gws)
- Binary:
/usr/local/bin/gws(installed globally March 23, 2026) - Version: 0.18.1+
- Config dir:
~/.config/gws/ - Client secret:
~/.config/gws/client_secret.json - Credentials:
~/.config/gws/credentials.json(saved after firstgws auth login) - Source:
npm install -g @googleworkspace/cli(github.com/googleworkspace/cli)
OAuth Credentials
- Client ID: Stored in SSM at
/quik-nation/clerk/GOOGLE_OAUTH_CLIENT_ID - Client Secret: Stored in SSM at
/quik-nation/clerk/GOOGLE_OAUTH_CLIENT_SECRET - Project:
135846763036(Quik Nation GCP) - Type: Desktop Application (installed)
- Scopes needed:
gmail.modify,gmail.send,calendar.events
Gmail Accounts Managed
- mojaray2k@gmail.com — Personal (job search, bills, personal)
- info@quikinfluence.com — Business (QuikInfluence inquiries)
Auth Flow
gws auth login -s gmail,calendar→ opens browser- User selects Google account → grants consent
- GWS saves refresh_token to
~/.config/gws/credentials.json - Token auto-refreshes on every subsequent call — no re-auth needed
- Only re-auth if user revokes or credentials file deleted
History
- March 20, 2026: Rian created. 23,471 emails cleaned, 200+ job replies sent. Used Anthropic proxy (was working).
- March 23, 2026: Anthropic proxy expired (
needs-auth). GWS CLI setup completed.client_secret.jsonplaced. Pending: firstgws auth loginbrowser flow.
For Clara Beta Email Feature
- Same pattern: user OAuth once → refresh_token stored encrypted per-tenant
- GWS API (or Google APIs directly) on backend
- $19/mo add-on
- Clara writes in user’s voice (code-switches by context)
- Refresh tokens never expire unless user revokes in Google Account settings