π Google MCP Auth Flow Summary
credentials.jsonβ App credentials (downloaded once from Google Cloud Console).token.jsonβ User-specific OAuth token (auto-created on first run).
βοΈ When & How It Happens
- At MCP startup:
The script loadscredentials.json(OAuth client info). - If no valid
token.json:- Browser-based OAuth flow starts.
- You log in and grant access.
- A new
token.jsonis saved locally.
- On later runs:
- The MCP reads the existing
token.json. - Automatically refreshes it if expired.
- No browser prompt needed.
- The MCP reads the existing
π« Git Hygiene
- β Never commit
token.jsonto Git. - π€ Each developer generates their own token.
- π₯οΈ For servers or CI β use a service account instead.