Google Workspace MCP Server
Gmail, Calendar, Drive, Docs, Sheets, Tasks, Meet and Contacts across several Google accounts
Gmail, Drive, Calendar, Docs, Sheets and nine more Google Workspace services from one MCP server
By Taylor Wilsdon (individual) Python Local · stdio ProductivityCommunicationFiles and storage
91 popularity score ★ 3.5k ↓ 290k/mo
Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.
It needs GOOGLE_OAUTH_CLIENT_ID, GOOGLE_OAUTH_CLIENT_SECRET. Replace each <NAME> with your value.
claude mcp add google-workspace -e GOOGLE_OAUTH_CLIENT_ID=<GOOGLE_OAUTH_CLIENT_ID> -e GOOGLE_OAUTH_CLIENT_SECRET=<GOOGLE_OAUTH_CLIENT_SECRET> -- uvx workspace-mcp --tool-tier core{
"mcpServers": {
"google-workspace": {
"command": "uvx",
"args": [
"workspace-mcp",
"--tool-tier",
"core"
],
"env": {
"GOOGLE_OAUTH_CLIENT_ID": "<GOOGLE_OAUTH_CLIENT_ID>",
"GOOGLE_OAUTH_CLIENT_SECRET": "<GOOGLE_OAUTH_CLIENT_SECRET>"
}
}
}
}{
"mcpServers": {
"google-workspace": {
"command": "uvx",
"args": [
"workspace-mcp",
"--tool-tier",
"core"
],
"env": {
"GOOGLE_OAUTH_CLIENT_ID": "<GOOGLE_OAUTH_CLIENT_ID>",
"GOOGLE_OAUTH_CLIENT_SECRET": "<GOOGLE_OAUTH_CLIENT_SECRET>"
}
}
}
}{
"servers": {
"google-workspace": {
"type": "stdio",
"command": "uvx",
"args": [
"workspace-mcp",
"--tool-tier",
"core"
],
"env": {
"GOOGLE_OAUTH_CLIENT_ID": "<GOOGLE_OAUTH_CLIENT_ID>",
"GOOGLE_OAUTH_CLIENT_SECRET": "<GOOGLE_OAUTH_CLIENT_SECRET>"
}
}
}
}[mcp_servers.google-workspace]
command = "uvx"
args = ["workspace-mcp", "--tool-tier", "core"]
[mcp_servers.google-workspace.env]
GOOGLE_OAUTH_CLIENT_ID = "<GOOGLE_OAUTH_CLIENT_ID>"
GOOGLE_OAUTH_CLIENT_SECRET = "<GOOGLE_OAUTH_CLIENT_SECRET>"gemini mcp add --scope user -e GOOGLE_OAUTH_CLIENT_ID=<GOOGLE_OAUTH_CLIENT_ID> -e GOOGLE_OAUTH_CLIENT_SECRET=<GOOGLE_OAUTH_CLIENT_SECRET> google-workspace uvx -- workspace-mcp --tool-tier core| Set together: oauth client | |
|---|---|
GOOGLE_OAUTH_CLIENT_ID |
Required: OAuth client ID from your Google Cloud project; GOOGLE_CLIENT_SECRET_PATH to a client_secret.json can supply it instead. |
GOOGLE_OAUTH_CLIENT_SECRET secret |
Required: OAuth client secret; may come from the client_secret.json named by GOOGLE_CLIENT_SECRET_PATH instead. |
GOOGLE_CLIENT_SECRET_PATH |
Optional: Path to a client_secret.json holding the client ID and secret; the two variables above win when set. |
USER_GOOGLE_EMAIL |
Optional: Default Google account for single-user mode; ignored when OAuth 2.1 is on. |
MCP_ENABLE_OAUTH21 |
Optional: true turns on OAuth 2.1 multi-user sign-in; needs --transport streamable-http. |
WORKSPACE_MCP_PORT |
Optional: Port for the HTTP server (PORT, when set, takes precedence). |
WORKSPACE_MCP_HOST |
Optional: Bind address; HTTP mode without OAuth 2.1 binds 127.0.0.1 unless this is set. |
ALLOWED_FILE_DIRS |
Optional: Extra local folders tools may read, separated by the OS path separator; .ssh and .aws stay blocked. |
WORKSPACE_MCP_DISABLE_LOCAL_FILES |
Optional: true stops tools reading server-side files; Drive create, update and import tools then offer return_upload_url. |
WORKSPACE_MCP_ALLOWED_HOSTS |
Optional: Comma-separated hostnames (no ports) accepted in the Host header; unset accepts any host. |
WORKSPACE_MCP_STATELESS_MODE |
Optional: true keeps nothing on disk, for containers; also disables local file reads. |
WORKSPACE_MCP_MAX_CONTENT_CHARS |
Optional: Characters get_drive_file_content returns per call before it truncates and gives the next offset; 0 returns whole files. |
Google Workspace MCP Server (the workspace-mcp package on PyPI) gives an assistant tools for twelve Google services: Gmail, Drive, Calendar, Docs, Sheets, Slides, Forms, Tasks, Contacts, Chat, Apps Script and Programmable (Custom) Search. It can search and send mail and manage labels and filters. On Drive it finds, creates, copies and shares files, and it imports Markdown or Office files into Docs, Sheets or Slides. It also edits documents and spreadsheets, manages calendar events, and can write and run Apps Script projects.
core/tool_tiers.yaml names 119 tools, split into tiers that you pick with --tool-tier (core is the smallest). You can also choose services with --tools or drop single tools with --disabled-tools. To keep it to read scopes, use --read-only or per-service --permissions.
Long Drive files now come back in pages. get_drive_file_content returns up to 40,000 characters per call by default (WORKSPACE_MCP_MAX_CONTENT_CHARS changes that, 0 turns paging off), ends a cut page with the offset to ask for next, and takes full_content=true for the whole file at once. If the file's Drive version changes between pages, the tool stops and tells the caller to start over from offset 0 (gdrive/drive_tools.py). A value for the setting that is not a whole number of zero or more stops the server at startup (main.py).
It runs on your machine over stdio by default, or as a streamable HTTP server that several people can share, with OAuth 2.1 sign-in. There is also a stateless mode for containers, and service accounts with domain-wide delegation are supported. For hosted setups, WORKSPACE_MCP_ALLOWED_HOSTS turns on Host-header checks, and with WORKSPACE_MCP_DISABLE_LOCAL_FILES=true the Drive create, update and import tools can hand back an upload URL (return_upload_url) for the caller to PUT the file to. The repository also holds a workspace-cli tool for calling tools from a shell.
| Runtime | Python 3.10+ |
|---|---|
| Runs on | macOS, Windows, Linux |
| Google account or Google Workspace | FreePlus a Google Cloud project with an OAuth client and the APIs of the services you use enabled; Google Chat needs a Workspace account |
| Also |
|
Create an OAuth client in the Google Cloud Console and enable the Google APIs for the services you plan to use (the docs give enable links and one gcloud command). Put its ID and secret in GOOGLE_OAUTH_CLIENT_ID and GOOGLE_OAUTH_CLIENT_SECRET, or point GOOGLE_CLIENT_SECRET_PATH at a client_secret.json. The README says the client does not need Google's AI-agent setting; an organisation that wants agent traffic labelled should make a separate client with it, since that setting cannot be changed on an existing client after November 12, 2026. Google Chat also needs a one-time Chat app setup.
Suits someone who wants one server for most of Google Workspace and is willing to set up their own Google Cloud OAuth client. Tiers and --tools keep the tool list small for a single user on stdio, and the HTTP mode with OAuth 2.1, stateless storage and host checks fits a team running one shared instance. It is not published by Google. Because it can send mail, change sharing and run Apps Script, start with --read-only or a narrow --permissions set if you only need to read, and think about prompt injection in incoming mail and documents before turning on write tools.
22 only read, 23 change things, 9 can delete or overwrite. A ? marks an optional parameter.
search_gmail_messagesget_gmail_message_contentget_gmail_thread_contentget_gmail_attachment_contentsend_gmail_message changesdraft_gmail_message changesmodify_gmail_message_labels changesmanage_gmail_label deletesmanage_gmail_filter deletessearch_drive_fileslist_drive_itemsget_drive_file_contentuser_google_email: stringfile_id: stringoffset?: integerfull_content?: booleanget_drive_file_download_urlcreate_drive_file changesuser_google_email: stringfile_name: stringcontent?: stringfolder_id?: stringmime_type?: stringfileUrl?: stringbase64_content?: stringcontent_mime_type?: stringbase64_sha256?: stringreturn_upload_url?: booleancreate_drive_folder changesupdate_drive_file deletescopy_drive_file changesmanage_drive_access changescheck_drive_file_public_accessimport_to_google_doc changesuser_google_email: stringfile_name: stringcontent?: stringfile_path?: stringfile_url?: stringsource_format?: stringfolder_id?: stringbase64_content?: stringbase64_sha256?: stringreturn_upload_url?: booleanimport_to_google_sheets changesimport_to_google_slides changeslist_calendarsget_eventsmanage_event deletesquery_freebusymanage_out_of_office changesmanage_focus_time changesget_doc_contentcreate_doc changesmodify_doc_text changesfind_and_replace_doc changesget_doc_as_markdownexport_doc_to_pdf changesread_sheet_valuesmodify_sheet_values deletescreate_spreadsheet changesformat_sheet_range changescreate_presentation changesbatch_update_presentation changesrender_page_to_imagecreate_form changeslist_form_responseslist_tasksmanage_task deletessearch_contactsmanage_contact deletessend_message changessearch_messagessearch_custommanage_script_content deletesrun_script_function changesmanage_deployment deletesstart_google_auth