Complete troubleshooting guide for Google Workspace MCP.
Solution:
- Primary: Set
GOOGLE_CLIENT_IDandGOOGLE_CLIENT_SECRETenv vars in your MCP config - Secondary: Download credentials from Google Cloud Console and save to
~/.config/google-workspace-mcp/credentials.json - Ensure the file has proper read permissions
Possible causes:
- Wrong credential type: Must be "Desktop app", not "Web application"
- Test user not added: Add your email in OAuth consent screen
Solution:
The authentication server uses an ephemeral port assigned by the OS, so no specific ports need to be available. Verify your credentials are the correct type and re-run:
npx @dguido/google-workspace-mcp authWhen running on a machine without a browser (SSH sessions, containers, WSL without browser integration), the auth flow provides a stdin fallback:
- Run the auth command — it prints the auth URL and a paste prompt
- Copy the auth URL and open it in your local browser
- Authenticate with Google — the browser redirects to
http://127.0.0.1:<port>/... - The redirect page won't load (the port is on the remote machine) — this is expected
- Copy the full URL from your browser's address bar (it contains
?code=...&state=...) - Paste it at the prompt on the remote machine
🔐 AUTHENTICATION REQUIRED
══════════════════════════════════════════
Opening your browser to authenticate...
Auth URL (copy if browser doesn't open):
https://accounts.google.com/o/oauth2/v2/auth?client_id=...
If running remotely: open the URL in your local browser.
The redirect page won't load — copy the URL from your address bar
and paste it below.
Paste redirect URL or auth code: <paste here>
The stdin prompt only appears when a TTY is detected (interactive terminal). In non-interactive environments (piped input, MCP server mode), only the HTTP callback path is available.
For Google OAuth apps in "Testing" status:
- Google automatically expires refresh tokens after 7 days
- You'll need to re-authenticate weekly until you publish your app
- Use
get_statuswithdiagnose: trueto check token age and get warnings before expiry
Solution:
# Clear old tokens and re-authenticate
rm ~/.config/google-workspace-mcp/tokens.json
npx @dguido/google-workspace-mcp authTo avoid weekly re-authentication:
-
Publish your OAuth app (recommended for personal use):
- Go to Google Cloud Console > APIs & Services > OAuth consent screen
- Click "PUBLISH APP"
- You don't need to complete Google's verification for personal use
- Published apps keep tokens valid indefinitely
-
Use Internal app type (Google Workspace only):
- Set User Type to "Internal" on OAuth consent screen
- Internal apps never expire tokens
For production/public apps:
- Complete OAuth verification process to remove user limits
- See Google's OAuth verification guide
If you updated the OAuth scopes but still get errors:
- Google caches app authorizations even after removing local tokens
- The app might be using old/limited scopes
Solution:
- Go to Google Account Permissions
- Find and remove access for "Google Drive MCP"
- Clear local tokens:
rm ~/.config/google-workspace-mcp/tokens.json - Re-authenticate to grant all required scopes
- Verify the consent screen shows ALL scopes including full Drive access
Error: Google Sheets API has not been used in project...
Solution:
- Go to Google Cloud Console
- Select your project
- Navigate to "APIs & Services" > "Library"
- Search and enable the missing API
- Wait 1-2 minutes for propagation
Check scopes in your credentials:
- Need drive.file or drive scope
- Need docs, sheets, slides scopes for respective services
- Need contacts scope for Contacts service
Solution:
- Re-create OAuth credentials with correct scopes
- Re-authenticate after updating credentials
Google API Quotas:
- Drive API: 12,000 requests per minute
- Docs/Sheets/Slides: 300 requests per minute
- People API: 90 requests per minute (per user)
Solution:
- Implement exponential backoff
- Batch operations where possible
- Check quota usage in Google Cloud Console
- Check logs: Server logs errors to stderr
- Verify setup: Run
npx @dguido/google-workspace-mcp help - Test auth: Run
npx @dguido/google-workspace-mcp auth - Report issues: GitHub Issues