Google Workspace MCP
A multi-account, token-efficient MCP server for Google Workspace services including Gmail, Calendar, Drive, Docs, and Sheets. It enables secure management of multiple accounts with compact data retrieval and keychain-backed authentication for efficient workflow automation.
README
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.
Why this exists
- Multi-account: OAuth multiple mailboxes (work + personal + co-founder). Every
tool takes an
accountemail; 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. - Keychain-backed: Refresh tokens live in the macOS Keychain, not plaintext files. No tokens in the vault, no tokens in any repo.
Tools (v2, 61 tools)
Account management (3)
gws_account_add— browser OAuth flow, adds a new authorized mailboxgws_account_list— list authorized accounts + defaultgws_account_remove— remove local credential (doesn't revoke Google-side)
Gmail (10)
gmail_search— search with Gmail operators. Compact response.gmail_read— read one message or full thread. Bodies opt-in.gmail_send— send mail, optionalfrom_aliasfor Send-As identitiesgmail_draft— create a draftgmail_reply— reply (preserves thread + headers), optional reply_allgmail_labels_list— list all labelsgmail_label_apply— batch add/remove labelsgmail_archive— batch archive (remove INBOX)gmail_trash— batch move to trashgmail_sendas_list— list Send-As identities on this mailbox
Calendar (7)
cal_list_calendars— list all calendarscal_list_events— list upcoming events (compact by default,verbose=Truefor full)cal_create_event— create event, optional Google Meet linkcal_update_event— partial-update fieldscal_delete_event— deletecal_freebusy— check busy windows for schedulingcal_respond— accept/decline/tentative
Drive (18)
drive_search— free-text or raw Drive q-syntax. Metadata-only response.drive_read_file— metadata by default;include_content=Truefor bodydrive_list_folder— direct children of a folder ('root'for My Drive)drive_create_folder— create a folder under an optional parentdrive_upload— upload a local file, optionalconvert_to_googledrive_move— change parent folderdrive_rename— rename a file or folderdrive_share— grant reader/commenter/writer/etc. access by emaildrive_trash— soft delete (recoverable)drive_untrash— restore from Trashdrive_permission_list— list everyone with access to a filedrive_permission_update— change a grantee's roledrive_permission_delete— revoke a permissiondrive_shared_drives_list— list shared drives this account accessesdrive_comments_list— list comments on any Drive file (Doc/Sheet/Slide/upload)drive_comment_add— add a comment, optional anchordrive_comment_reply— reply to a commentdrive_comment_resolve— mark a comment resolved
Docs (9)
docs_create— new Doc, optional initial body and parent folderdocs_read— flat text by default;structured=Truefor full Docs API treedocs_append— append text to end of bodydocs_insert_at— insert text at a specific indexdocs_replace_text— find-and-replace, returns count replaceddocs_export— export to markdown / pdf / docx / rtf / plaindocs_suggestions_list— list pending tracked-change suggestionsdocs_suggestions_accept_all— accept all suggestions (rewrites Doc)docs_suggestions_reject_all— reject all suggestions (rewrites Doc)
Sheets (14)
sheets_create— new workbook, optional parent foldersheets_list_sheets— list tabs with row/col dimensionssheets_add_sheet— add a new tab to an existing workbooksheets_read_range— read A1 range.FORMULA/UNFORMATTED_VALUEoptions.sheets_write_range— overwrite a range.USER_ENTEREDparses formulas.sheets_append— append rows below existing datasheets_clear_range— clear values (formatting preserved)sheets_batch_read— multi-range read in one API callsheets_batch_write— multi-range write in one API callsheets_named_ranges_list— list named ranges in a workbooksheets_named_range_add— create a named rangesheets_named_range_delete— delete a named rangesheets_conditional_format_add— add a conditional formatting rulesheets_data_validation_add— set dropdown / number / email / URL validation
Install
See SETUP.md for the one-time GCP setup (~45 min for v1, ~5 min incremental to enable Drive/Docs/Sheets for v2).
After setup:
pip3 install --break-system-packages -r requirements.txt
Register with Claude Code
Add to your project's .mcp.json (or ~/.claude.json for global access):
"google-workspace": {
"type": "stdio",
"command": "python3",
"args": ["/path/to/google-workspace-mcp/server.py"]
}
Upgrading from v1 → v2
v2 adds Drive + Docs + Sheets scopes. Each authorized account must re-OAuth once so Google grants the new scopes. See SETUP.md step 6b.
Roadmap
- v3: Gmail filters, vacation responder, push notifications (Gmail Watch), Calendar ACL/delegation, Slides, Forms, Tasks
- v4: Batch requests across services, Drive revisions
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.