[BUG] Google Workspace connector (Gmail/Drive) fails OAuth with "client_secret is missing" — GOOGLE_OAUTH_CLIENT_SECRET not injected into local server subprocess
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Description:
The locally-spawned google-workspace-mcp server (installed via uv, cached at %LOCALAPPDATA%\uv\cache\archive-v0\...\site-packages\) fails every OAuth token exchange with:
Root cause identified: In auth/google_auth.py, function load_client_secrets_from_env() reads OAuth credentials from environment variables GOOGLE_OAUTH_CLIENT_ID and GOOGLE_OAUTH_CLIENT_SECRET. Logs confirm GOOGLE_OAUTH_CLIENT_ID is being injected into the subprocess correctly (it appears in every generated auth URL), but GOOGLE_OAUTH_CLIENT_SECRET is not — the code silently falls back to an empty string, causing Google's token endpoint to reject the exchange.
Reproduction:
Reproduced across multiple fresh server processes (confirmed via distinct PIDs in ~/.google_workspace_mcp/logs/mcp_server_debug.log)
Reproduced across multiple accounts (user1@gmail.com, user2@gmail.com)
Persists after fully quitting and restarting Claude Desktop (both under a MultiInstance-for-Claude-Desktop wrapper app, if relevant)
GOOGLE_OAUTH_CLIENT_SECRET / GOOGLE_OAUTH_CLIENT_ID are confirmed NOT set as Windows User or Machine environment variables — so they must be injected directly by the Claude Desktop app at subprocess-spawn time, and that injection is dropping the secret.
Impact: Any local Google Workspace connector usage requiring OAuth (fresh or re-auth) is completely broken; the separate cloud-hosted Gmail/Drive connector works fine and is unaffected.
What Should Happen?
User should be able to connect google connector without starting throwing furniture through a window
Error Messages/Logs
Steps to Reproduce
What do you want from me still? I excpected AI.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.207 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
_No response_