Google Workspace Authentication
Authenticate the Gmail and Google Calendar MCP servers via OAuth 2.0.
Prerequisites
- A Google Cloud Platform project with a Desktop-type OAuth 2.0 Client ID
- Download the OAuth JSON and place it in BOTH locations:
~/.gmail-mcp/gcp-oauth.keys.json~/.calendar-mcp/gcp-oauth.keys.json
- Enable these APIs in the GCP project:
- Gmail API
- Google Calendar API
- People API (for contact lookup)
Procedure
Verify OAuth keys exist:
ls ~/.gmail-mcp/gcp-oauth.keys.json ~/.calendar-mcp/gcp-oauth.keys.jsonCreate config directories if missing:
mkdir -p ~/.gmail-mcp ~/.calendar-mcpAuthenticate Gmail server (opens browser for OAuth consent):
node ${CLAUDE_PLUGIN_ROOT}/servers/gmail/index.js authAuthenticate Calendar server:
node ${CLAUDE_PLUGIN_ROOT}/servers/calendar/index.js authVerify credentials were created:
ls ~/.gmail-mcp/credentials.json ~/.calendar-mcp/credentials.jsonTest connectivity by running
/mcpto reconnect both servers.Report success/failure to user.
Troubleshooting
- Port 3000 conflict:
lsof -ti:3000 | xargs kill -9then retry - Browser doesn't open: Copy the auth URL from terminal output manually
- People API error: Ensure People API is enabled in GCP console
- Token expired: Re-run this authentication flow. Tokens auto-refresh during normal use but may expire after prolonged inactivity.