Skip to content

Google Cloud MCP stops authenticating during a long session

Source: Troubleshooting reference

Symptom. An official Google Cloud MCP connects successfully, then starts returning authentication errors after its initial access token expires.

Root cause. Older Codex/OpenCode launchers minted GOOGLE_MCP_TOKEN once at startup, and Claude’s old headersHelper minted it at connection time. Neither path refreshed the token while the same connection remained active.

Fix. The current registry emits df-google-mcp as a local stdio transport for all four harnesses. It uses Google’s ADC refresh interface before HTTP requests. Refresh the installed helpers and affected configuration:

Terminal window
bash ~/dotfiles/install/agent-tools.sh
df-google-mcp --check-runtime
bash ~/dotfiles/install/codex.sh sync-config
bash ~/dotfiles/install/claude.sh sync-mcp
bash ~/dotfiles/install/opencode.sh sync-config
bash ~/dotfiles/install/cursor.sh sync-mcp

Restart the affected harness connection so it starts the relay. Existing ADC continues to work; revoked credentials, disabled services, and missing IAM permissions still need their own fixes. See Google Cloud MCP credentials.