google-workspace-mcp
Multi-account, token-efficient MCP for Gmail + Calendar + Drive + Docs + Sheets.
Built because the official Claude connector supports one account and returns full
message/file bodies by default.
Set it up by talking to Claude
Paste this repository's link into Claude Code and say you want to connect your email. Claude Code does the terminal steps, and anything that needs a web browser goes to Claude in Chrome. GUIDED-SETUP.md is the step-by-step version of that path, including the exact browser steps.
Why this exists
- Multi-account: OAuth multiple mailboxes (work + personal + co-founder). Every
tool takes an
account email; aliases are handled via Send-As identities.
- Token-efficient: Search/list returns compact shapes (
{id, from, subject, snippet, ...} for mail, {id, name, mime, modified, size, ...} for Drive).
Bodies and file content are opt-in.
- Keyring-backed: Refresh tokens live in the OS credential store — Keychain
on macOS, Credential Manager on Windows, Secret Service on Linux — not in
plaintext files. No tokens in the vault, no tokens in any repo.
- macOS, Windows and Linux: one installer per platform, same connector.
Tools (v2, 63 tools)
Account management (3)
gws_account_add — browser OAuth flow, adds a new authorized mailbox
gws_account_list — list authorized accounts + default
gws_account_remove — remove local credential (doesn't revoke Google-side)
Gmail (12)
gmail_search — search with Gmail operators. Compact response.
gmail_read — read one message or full thread. Bodies opt-in.
gmail_send — send mail, optional from_alias for Send-As identities
gmail_draft — create a draft
gmail_reply — reply (preserves thread + headers), optional reply_all
gmail_labels_list — list all labels
gmail_label_apply — batch add/remove labels
gmail_archive — batch archive (remove INBOX)
gmail_trash — batch move to trash
gmail_sendas_list — list Send-As identities on this mailbox
gmail_attachments_list — list a message's attachments (filename, mime type, size)
gmail_attachment_save — download one attachment to a local file, path returned for direct reading
Calendar (7)
cal_list_calendars — list all calendars
cal_list_events — list upcoming events (compact by default, verbose=True for full)
cal_create_event — create event, optional Google Meet link
cal_update_event — partial-update fields
cal_delete_event — delete
cal_freebusy — check busy windows for scheduling
cal_respond — accept/decline/tentative