Google Workspace MCP Servers

Three separate MCP servers handle Google Workspace services. They share the same Google Cloud project but use independent OAuth tokens.

Google Cloud Project

Server: Gmail

Field Value
NPM package @gongrzhe/server-gmail-autoauth-mcp
OAuth keys ~/.gmail-mcp/gcp-oauth.keys.json
Tokens ~/.gmail-mcp/credentials.json
Env vars GMAIL_OAUTH_PATH, GMAIL_CREDENTIALS_PATH
Scopes gmail.modify, gmail.settings.basic

Tools available

Server: Google Drive (Docs, Sheets, Slides)

Field Value
NPM package @piotr-agier/google-drive-mcp
OAuth keys ~/.claude/credentials/google-drive-oauth.json
Tokens ~/.config/google-drive-mcp/tokens.json
Env vars GOOGLE_DRIVE_OAUTH_CREDENTIALS, GOOGLE_DRIVE_MCP_TOKEN_PATH
Scopes drive, drive.file, drive.readonly, presentations, documents, spreadsheets

Tools available

Note on updateGoogleDoc

This tool replaces ALL content and destroys formatting. For small text changes, there's no targeted replace. Either accept the limitation or avoid it for formatted docs.

Server: Google Calendar

Field Value
NPM package @cocal/google-calendar-mcp (v2.4.1)
OAuth keys ~/.claude/credentials/google-drive-oauth.json (shared with Drive)
Tokens ~/.config/google-calendar-mcp/tokens.json
Env var GOOGLE_OAUTH_CREDENTIALS
Scopes calendar

Tools available

Setup date

February 23, 2026

Credential File Locations

All paths are explicit via environment variables so they don't rely on defaults.

~/.claude/credentials/
├── google-drive-oauth.json      # OAuth client keys (used by Drive + Calendar)
├── gmail-credentials.json       # STALE - old project, not used by current gmail server
└── gdrive-token.pickle          # STALE - old token format, not used

~/.gmail-mcp/
├── gcp-oauth.keys.json          # OAuth client keys (used by Gmail)
└── credentials.json             # Gmail access/refresh tokens

~/.config/google-drive-mcp/
└── tokens.json                  # Drive access/refresh tokens

~/.config/google-calendar-mcp/
└── tokens.json                  # Calendar access/refresh tokens

OAuth Token Refresh

All three servers use refresh tokens that auto-renew. Access tokens expire ~1 hour but refresh tokens are long-lived. If a refresh token is revoked (e.g., from Google Account security settings), you'll need to re-authenticate:

  1. Delete the relevant tokens file
  2. Restart Claude Code
  3. The server will prompt for re-authentication via browser

Why Three Separate Servers?

There's no single unified Google Workspace MCP server that reliably handles all three services. Each package is maintained by a different author: - Gmail: @gongrzhe - Drive: @piotr-agier - Calendar: @cocal

This is the trade-off for having all three services available. The upside is each can be updated/fixed independently.