Skip to main content
Glama

VE Google Workspace MCP (ve-gws)

ve-gws MCP server License: MIT Python 3.10+ Tests

Most Google Workspace MCPs let you read. This one lets you write โ€” a Python fork of taylorwilsdon/google_workspace_mcp with 28 additional authoring tools on top (deeper Slides, markdown-to-Docs, smart chips, Sheets data validation, recursive Drive copy, revisions). See Why VE-GWS (vs. upstream) below.

Part of Vibe Entrepreneurs โ€” a community for any vibe coders shipping real work with AI: solo indie builders, product-minded devs, agency folks, side-project makers. You don't need to use ve-gws to join. Come say hi: vibeentrepreneurs.com.

Companion repo: HuntsDesk/ve-kit โ€” Vibe Coding Framework & Persistent Memory for Claude Code (persistent task board, process gates, Docker autonomous worker). Install standalone or alongside.


Google Workspace MCP Server

License: MIT Python 3.10+ PyPI PyPI Downloads Website

Full natural language control over Google Calendar, Drive, Gmail, Docs, Sheets, Slides, Forms, Tasks, Contacts, and Chat through all MCP clients, AI assistants and developer tools. Includes a full featured CLI for use with tools like Claude Code and Codex!

The most feature-complete Google Workspace MCP server, with Remote OAuth2.1 multi-user support and 1-click Claude installation. With native OAuth 2.1, stateless mode and external auth server support, it's the only Workspace MCP you can host for your whole organization centrally & securely!

Support for all free Google accounts (Gmail, Docs, Drive etc) & Google Workspace plans (Starter, Standard, Plus, Enterprise, Non Profit) with expanded app options like Chat & Spaces. Interested in a private, managed cloud instance? That can be arranged.

Why VE-GWS (vs. upstream)

HuntsDesk/ve-gws is a fork of taylorwilsdon/google_workspace_mcp that adds 28 tools in the gaps upstream doesn't cover โ€” mostly around authoring workflows (building presentations, rendering formatted docs, managing structured sheets).

Area

Additions

Slides

Create shapes + text boxes ยท set slide backgrounds ยท reorder slides ยท duplicate slides ยท read/write speaker notes ยท style shapes + text + paragraphs ยท delete elements

Docs

Insert native markdown (rendered, not as a code block) ยท insert person + file smart chips ยท read existing smart chips ยท find-and-replace ยท apply_continuous_numbering (convert plain-text "1. 2. 3." into a real numbered list that continues across intervening prompts and sub-bullets โ€” idempotent)

Sheets

Data validation rules ยท named ranges ยท range protection ยท sheet tab management (add/rename/delete/reorder)

Drive

Recursive folder copy ยท list revision history ยท restore prior revisions

Some feature ideas ported from blakesplay/apollo, which was itself based on piotr-agier/google-drive-mcp. See the Available Tools tables below โ€” additions are tagged Extended or Complete.

Quality: 822 tests pass (803 upstream + 19 new). Upstream commits from Taylor's repo are merged in periodically โ€” see Pulling Upstream Changes.

ve-* family: Companion to HuntsDesk/ve-kit (Vibe Coding Framework & Persistent Memory for Claude Code โ€” task board, process gates, Docker autonomous worker). VE-GWS is the Google Workspace MCP piece of that toolchain โ€” install standalone or alongside. See the intro at the top of this README for the community invite.


See it in action:


Related MCP server: google-suite-mcp

Overview

Workspace MCP is the single most complete MCP server that integrates all major Google Workspace services with AI assistants. It supports both single-user operation and multi-user authentication via OAuth 2.1, making it a powerful backend for custom applications. Built with FastMCP for optimal performance, featuring advanced authentication handling, service caching, and streamlined development patterns. The entire toolset is available for CLI usage supporting both local and remote instances.

Simplified Setup: can use Google Desktop OAuth clients for local runs - no redirect URIs or port configuration needed!

Features

12 services  โ€”  Gmail ยท Drive ยท Calendar ยท Docs ยท Sheets ยท Slides ยท Forms ยท Chat ยท Apps Script ยท Tasks ยท Contacts ยท Search

๐Ÿ“ง Gmail โ€” Complete email management, end-to-end coverage ๐Ÿ“ Drive โ€” File operations with sharing, permissions, Office files, PDFs & images ๐Ÿ“… Calendar โ€” Full event management with advanced features ๐Ÿ“ Docs โ€” Deep, fine-grained editing, formatting & comments ๐Ÿ“Š Sheets โ€” Flexible cell management, formatting & conditional rules ๐Ÿ–ผ๏ธ Slides โ€” Presentation creation, updates & content manipulation ๐Ÿ“‹ Forms โ€” Creation, publish settings & response management ๐Ÿ’ฌ Chat โ€” Space management, messaging & reactions

โšก Apps Script โ€” Cross-application workflow automation  Projects ยท deployments ยท versions ยท execution ยท debugging

โœ… Tasks โ€” Task & list management with hierarchy ๐Ÿ‘ค Contacts โ€” People API with groups & batch operations ๐Ÿ” Custom Search โ€” Programmable Search Engine integration


๐Ÿ” Authentication & Security OAuth 2.0 & 2.1 ยท auto token refresh ยท multi-user bearer tokens ยท transport-aware callbacks ยท CORS proxy


Security & Compliance

For Security Teams

This server sends no data anywhere except Google's APIs, on behalf of the authenticated user, using your own OAuth client credentials. There is no telemetry, no usage reporting, no analytics, no license server, and no SaaS dependency. The entire data path is: your infrastructure โ†’ Google APIs.

  • Fully open source โ€” every line is auditable in this repo

  • Your OAuth client, your GCP project โ€” credentials never leave your environment

  • You control the scopes โ€” read-only, granular per-service permissions, or full access

  • You control the network โ€” deploy behind your reverse proxy, in your VPC, on your own terms

  • No third-party services โ€” no intermediary servers, no token relays, no hosted backends

  • Stateless mode โ€” zero disk writes for locked-down container environments

  • Sensitive path blocking โ€” .env, .ssh/, .aws/, and credential files are blocked regardless of configuration

Full dependency tree in pyproject.toml, pinned in uv.lock.

For Legal & Procurement

This project is MIT licensed โ€” not "open core," not "source available," not "free with a CLA." There is no dual licensing, no commercial tier gating features, and no contributor license agreement.

  • Use commercially without restriction โ€” build products, sell services, deploy internally

  • Fork, embed, redistribute โ€” MIT requires only attribution

  • No CLA โ€” contributions remain under MIT

  • No telemetry to disclose โ€” nothing to flag in a privacy review

  • No network effects โ€” the server never contacts any endpoint you didn't configure

  • Standard dependency licenses โ€” MIT, Apache 2.0, and BSD throughout the dependency chain; no copyleft, no AGPL

The license is 21 lines and says what it means.


Quick Start

Set credentials โ†’ pick a launch command โ†’ connect your client

๐Ÿ’ก New to Workspace MCP? Check out the Interactive Quick Start Guide โ†’ with step-by-step setup, screenshots, and troubleshooting tips!

Confidential Client Quick Start

# 1. Credentials
export GOOGLE_OAUTH_CLIENT_ID="..."
export GOOGLE_OAUTH_CLIENT_SECRET="..."

# 2. Launch โ€” pick a tier
uvx workspace-mcp --tool-tier core       # essential tools
uvx workspace-mcp --tool-tier extended   # core + management ops
uvx workspace-mcp --tool-tier complete   # everything

# Or cherry-pick services
uv run main.py --tools gmail drive calendar

Secretless / Public OAuth 2.1 (PKCE) Quick Start

# 1. Credentials
export MCP_ENABLE_OAUTH21=true
export GOOGLE_OAUTH_CLIENT_ID="..."
export WORKSPACE_MCP_PORT=8000
export GOOGLE_OAUTH_REDIRECT_URI="http://localhost:${WORKSPACE_MCP_PORT}/oauth2callback"
export OAUTHLIB_INSECURE_TRANSPORT=1
# Leave GOOGLE_OAUTH_CLIENT_SECRET unset for public PKCE clients
export FASTMCP_SERVER_AUTH_GOOGLE_JWT_SIGNING_KEY="$(openssl rand -hex 32)"

# 2. Launch โ€” OAuth 2.1 requires HTTP transport
uvx workspace-mcp --transport streamable-http --tool-tier core
uvx workspace-mcp --transport streamable-http --tool-tier extended
uvx workspace-mcp --transport streamable-http --tool-tier complete

# Or cherry-pick services
uv run main.py --transport streamable-http --tools gmail drive calendar

Credential setup โ†’ ยท All launch options โ†’ ยท Tier details โ†’

Variable

Purpose

๐Ÿ” Authentication

GOOGLE_OAUTH_CLIENT_ID

required

OAuth client ID from Google Cloud

GOOGLE_OAUTH_CLIENT_SECRET

OAuth client secret for confidential clients; optional for public OAuth 2.1 PKCE clients

OAUTHLIB_INSECURE_TRANSPORT

required*

Set to 1 for development โ€” allows http:// redirect

USER_GOOGLE_EMAIL

Default email for single-user auth

GOOGLE_CLIENT_SECRET_PATH

Custom path to client_secret.json

GOOGLE_MCP_CREDENTIALS_DIR

Credential directory โ€” default ~/.google_workspace_mcp/credentials

๐Ÿ–ฅ๏ธ Server

WORKSPACE_MCP_BASE_URI

Base server URI (no port) โ€” default http://localhost

WORKSPACE_MCP_PORT

Listening port โ€” default 8000

WORKSPACE_MCP_HOST

Bind host โ€” default 0.0.0.0

WORKSPACE_EXTERNAL_URL

External URL for reverse proxy setups

WORKSPACE_ATTACHMENT_DIR

Downloaded attachments dir โ€” default ~/.workspace-mcp/attachments/

WORKSPACE_MCP_URL

Remote MCP endpoint URL for CLI

ALLOWED_FILE_DIRS

Colon-separated allowlist for local file reads

๐Ÿ”‘ OAuth 2.1 & Multi-User

MCP_ENABLE_OAUTH21

true to enable OAuth 2.1 multi-user support

EXTERNAL_OAUTH21_PROVIDER

true for external OAuth flow with bearer tokens

WORKSPACE_MCP_STATELESS_MODE

true for stateless container-friendly operation

GOOGLE_OAUTH_REDIRECT_URI

Override OAuth callback URL โ€” default auto-constructed

OAUTH_CUSTOM_REDIRECT_URIS

Comma-separated additional redirect URIs

OAUTH_ALLOWED_ORIGINS

Comma-separated additional CORS origins

WORKSPACE_MCP_OAUTH_PROXY_STORAGE_BACKEND

memory, disk, or valkey โ€” see storage backends

FASTMCP_SERVER_AUTH_GOOGLE_JWT_SIGNING_KEY

Custom encryption key for OAuth proxy storage; required for public OAuth 2.1 clients when GOOGLE_OAUTH_CLIENT_SECRET is omitted

๐Ÿ”ง Service Account

GOOGLE_SERVICE_ACCOUNT_KEY_FILE

Path to service account JSON key file (domain-wide delegation)

GOOGLE_SERVICE_ACCOUNT_KEY_JSON

Inline service account JSON key (alternative to file)

๐Ÿ” Custom Search

GOOGLE_PSE_API_KEY

API key for Programmable Search Engine

GOOGLE_PSE_ENGINE_ID

Search Engine ID for PSE

*Required for development only. Claude Desktop stores credentials securely in the OS keychain โ€” set them once in the extension pane.


One-Click Claude Desktop Install

.dxt bundles server, deps & manifest โ€” download โ†’ double-click โ†’ done. No terminal, no JSON editing.

  1. Download the latest google_workspace_mcp.dxt from Releases

  2. Install โ€” double-click the file, Claude Desktop prompts to install

  3. Configure โ€” Settings โ†’ Extensions โ†’ Google Workspace MCP, paste your OAuth credentials

  4. Use it โ€” start a new Claude chat and call any Google Workspace tool


Prerequisites

Python 3.10+ ยท uv/uvx ยท Google Cloud Project with OAuth 2.0 credentials

Configuration

  1. Create Project โ€” Open Console โ†’ โ†’ Create new project

  2. Create OAuth Credentials โ€” APIs & Services โ†’ Credentials โ†’ Create Credentials โ†’ OAuth Client ID

    • Choose Desktop Application for a public PKCE client (no redirect URIs needed) or Web Application for a confidential client

    • Download and note your Client ID and, if issued, Client Secret

  3. Enable APIs โ€” APIs & Services โ†’ Library, then enable each service:

  4. Set Credentials โ€” see Environment Variable Reference above, or:

    export GOOGLE_OAUTH_CLIENT_ID="your-client-id"
    export GOOGLE_OAUTH_CLIENT_SECRET="your-secret"

    For public OAuth 2.1 PKCE clients, omit GOOGLE_OAUTH_CLIENT_SECRET and set FASTMCP_SERVER_AUTH_GOOGLE_JWT_SIGNING_KEY instead.

Full OAuth documentation โ†’ ยท Credential setup details โ†’

Google Custom Search Setup

1. Create Search Engine

programmablesearchengine.google.com
/controlpanel/create

โ†’ Configure sites or entire web
โ†’ Note your Engine ID (cx)

Open Control Panel โ†’

2. Get API Key

developers.google.com
/custom-search/v1/overview

โ†’ Create/select project
โ†’ Enable Custom Search API
โ†’ Create credentials (API Key)

Get API Key โ†’

3. Set Variables

export GOOGLE_PSE_API_KEY=\
  "your-api-key"
export GOOGLE_PSE_ENGINE_ID=\
  "your-engine-id"

Configure in environment

Complete Setup Process:

  1. Create Search Engine - Visit the Control Panel

    • Choose "Search the entire web" or specify sites

    • Copy the Search Engine ID (looks like: 017643444788157684527:6ivsjbpxpqw)

  2. Enable API & Get Key - Visit Google Developers Console

    • Enable "Custom Search API" in your project

    • Create credentials โ†’ API Key

    • Restrict key to Custom Search API (recommended)

  3. Configure Environment - Add to your shell or .env:

    export GOOGLE_PSE_API_KEY="AIzaSy..."
    export GOOGLE_PSE_ENGINE_ID="01764344478..."

โ‰ก Full Documentation โ†’

Start the Server

๐Ÿ“Œ Transport Mode Guidance: Use streamable HTTP mode (--transport streamable-http) for all modern MCP clients including Claude Code, VS Code MCP, and MCP Inspector. Stdio mode is only for clients with incomplete MCP specification support.

โ–ถ Legacy Mode

uv run main.py

โš ๏ธ Stdio mode (incomplete MCP clients only)

โ—† HTTP Mode (Recommended)

uv run main.py \
  --transport streamable-http

โœ… Full MCP spec compliance & OAuth 2.1

@ Single User

uv run main.py \
  --single-user

Simplified authentication โš ๏ธ Cannot be used with OAuth 2.1 mode

โ–ถ Selective Tool Loading

# Load specific services only
uv run main.py --tools gmail drive calendar
uv run main.py --tools sheets docs

# Combine with other flags
uv run main.py --single-user --tools gmail

๐Ÿ”’ Read-Only Mode

# Requests only read-only scopes & disables write tools
uv run main.py --read-only

# Combine with specific tools or tiers
uv run main.py --tools gmail drive --read-only
uv run main.py --tool-tier core --read-only

Read-only mode provides secure, restricted access by:

  • Requesting only *.readonly OAuth scopes (e.g., gmail.readonly, drive.readonly)

  • Automatically filtering out tools that require write permissions at startup

  • Allowing read operations: list, get, search, and export across all services

๐Ÿ” Granular Permissions

# Per-service permission levels
uv run main.py --permissions gmail:organize drive:readonly

# Combine permissions with tier filtering
uv run main.py --permissions gmail:send drive:full --tool-tier core

Granular permissions mode provides service-by-service scope control:

  • Format: service:level (one entry per service)

  • Gmail levels: readonly, organize, drafts, send, full (cumulative)

  • Tasks levels: readonly, manage, full (cumulative; manage allows create/update/move but denies delete and clear_completed)

  • Other services currently support: readonly, full

  • --permissions and --read-only are mutually exclusive

  • --permissions cannot be combined with --tools; enabled services are determined by the --permissions entries (optionally filtered by --tool-tier)

  • With --tool-tier, only tier-matched tools are enabled and only services that have tools in the selected tier are imported

โ˜… Tool Tiers

uv run main.py --tool-tier core      # โ— Essential tools only
uv run main.py --tool-tier extended  # โ— Core + additional
uv run main.py --tool-tier complete  # โ—‹ All available tools

โ—† Docker Deployment

docker build -t workspace-mcp .
docker run -p 8000:8000 -v $(pwd):/app \
  workspace-mcp --transport streamable-http

# With tool selection via environment variables
docker run -e TOOL_TIER=core workspace-mcp
docker run -e TOOLS="gmail drive calendar" workspace-mcp

Available Services: gmail โ€ข drive โ€ข calendar โ€ข docs โ€ข sheets โ€ข forms โ€ข tasks โ€ข contacts โ€ข chat โ€ข search

CLI

The workspace-cli command lists tools and calls them against a running server โ€” with encrypted, disk-backed OAuth token caching so you only authenticate once. On first run it opens a browser for Google consent; subsequent runs reuse the cached tokens automatically.

Tokens are stored encrypted at ~/.workspace-mcp/cli-tokens/ using a Fernet key auto-generated at ~/.workspace-mcp/.cli-encryption-key.

โ–ถ List Tools

uv run workspace-cli list
uv run workspace-cli --url https://custom.server/mcp list

# Or, if installed globally:
workspace-cli list
workspace-cli --url https://custom.server/mcp list

View all available tools

โ—† Call a Tool

uv run workspace-cli call search_gmail_messages \
  query="is:unread" max_results=5

Execute a tool with key=value arguments

Set URL for remote endpoints with --url or the WORKSPACE_MCP_URL environment variable.

The upstream FastMCP CLI is also bundled and provides additional commands for schema inspection, client installation, and editor discovery. Note that fastmcp uses in-memory token storage, so each invocation may re-trigger the OAuth flow.

fastmcp inspect fastmcp_server.py                        # print tools, resources, prompts
fastmcp install claude-code fastmcp_server.py             # one-command client setup
fastmcp install cursor fastmcp_server.py
fastmcp discover                                          # find servers configured in editors

See fastmcp --help or the FastMCP CLI docs for the full command reference.

Tool Tiers

The server organizes tools into three progressive tiers for simplified deployment. Choose a tier that matches your usage needs and API quota requirements.

Available Tiers

โ— Core (--tool-tier core) Essential tools for everyday tasks. Perfect for light usage with minimal API quotas. Includes search, read, create, and basic modify operations across all services.

โ— Extended (--tool-tier extended) Core functionality plus management tools. Adds labels, folders, batch operations, and advanced search. Ideal for regular usage with moderate API needs.

โ— Complete (--tool-tier complete) Full API access including comments, headers/footers, publishing settings, and administrative functions. For power users needing maximum functionality.

Important Notes

โ–ถ Start with core and upgrade as needed โ–ถ Tiers are cumulative โ€“ each includes all previous โ–ถ Mix and match with --tools for specific services โ–ถ Configuration in core/tool_tiers.yaml โ–ถ Authentication included in all tiers

Usage Examples

# Basic tier selection
uv run main.py --tool-tier core                            # Start with essential tools only
uv run main.py --tool-tier extended                        # Expand to include management features
uv run main.py --tool-tier complete                        # Enable all available functionality

# Selective service loading with tiers
uv run main.py --tools gmail drive --tool-tier core        # Core tools for specific services
uv run main.py --tools gmail --tool-tier extended          # Extended Gmail functionality only
uv run main.py --tools docs sheets --tool-tier complete    # Full access to Docs and Sheets

# Combine tier selection with granular permission levels
uv run main.py --permissions gmail:organize drive:full --tool-tier core

๐Ÿ“‹ Credential Configuration

๐Ÿš€ Environment Variables

export GOOGLE_OAUTH_CLIENT_ID=\
  "your-client-id"
export GOOGLE_OAUTH_CLIENT_SECRET=\
  "your-secret"

Best for production

๐Ÿ“ File-based

# Download & place in project root
client_secret.json

# Or specify custom path
export GOOGLE_CLIENT_SECRET_PATH=\
  /path/to/secret.json

Traditional method

โšก .env File

cp .env.oauth21 .env
# Edit .env with credentials

Best for development

Loading Priority

  1. Environment variables (export VAR=value)

  2. .env file in project root (warning - if you run via uvx rather than uv run from the repo directory, you are spawning a standalone process not associated with your clone of the repo and it will not find your .env file without specifying it directly)

  3. client_secret.json via GOOGLE_CLIENT_SECRET_PATH

  4. Default client_secret.json in project root

Why Environment Variables?

  • โœ… Docker/K8s ready - Native container support

  • โœ… Cloud platforms - Heroku, Railway, Vercel

  • โœ… CI/CD pipelines - GitHub Actions, Jenkins

  • โœ… No secrets in git - Keep credentials secure

  • โœ… Easy rotation - Update without code changes


๐Ÿงฐ Available Tools

Note: All tools support automatic authentication via @require_google_service() decorators with 30-minute service caching.

๐Ÿ“– Looking for detailed parameters? Visit the Complete Documentation โ†’ for comprehensive tool reference, examples, and API guides!

๐Ÿ“… Google Calendar calendar_tools.py

Tool

Tier

Description

list_calendars

Core

List accessible calendars

get_events

Core

Retrieve events with time range filtering

manage_event

Core

Create, update, or delete calendar events

create_calendar

Extended

Create a new secondary Google Calendar

query_freebusy

Extended

Query free/busy information for calendars

manage_out_of_office

Extended

Create, list, update, or delete Out of Office events

manage_focus_time

Extended

Create, list, update, or delete Focus Time events

๐Ÿ“ Google Drive drive_tools.py

Tool

Tier

Description

search_drive_files

Core

Search files with query syntax

get_drive_file_content

Core

Read file content (Office, PDF, image)

get_drive_file_download_url

Core

Download Drive files to local disk

create_drive_file

Core

Create files or fetch from URLs

create_drive_folder

Core

Create empty folders in Drive or shared drives

import_to_google_doc

Core

Import files (MD, DOCX, HTML, etc.) as Google Docs

get_drive_shareable_link

Core

Get shareable links for a file

list_drive_items

Extended

List folder contents

copy_drive_file

Extended

Copy existing files (templates) with optional renaming

update_drive_file

Extended

Update file metadata, move between folders

manage_drive_access

Extended

Grant, update, revoke permissions, and transfer ownership

set_drive_file_permissions

Extended

Set link sharing and file-level sharing settings

get_drive_file_permissions

Complete

Get detailed file permissions

check_drive_file_public_access

Complete

Check public sharing status

copy_drive_folder

Complete

Recursively copy a folder tree (folders + files) to a new location

get_drive_revisions

Complete

List a file's revision history (modified time, user, size)

restore_drive_revision

Complete

Restore a binary file to a prior revision (native Docs/Sheets/Slides not supported โ€” use Docs UI)

๐Ÿ“ง Gmail gmail_tools.py

Tool

Tier

Description

search_gmail_messages

Core

Search with Gmail operators

get_gmail_message_content

Core

Retrieve message content

get_gmail_messages_content_batch

Core

Batch retrieve message content

send_gmail_message

Core

Send emails

get_gmail_thread_content

Extended

Get full thread content

modify_gmail_message_labels

Extended

Modify message labels

list_gmail_labels

Extended

List available labels

list_gmail_filters

Extended

List Gmail filters

manage_gmail_label

Extended

Create/update/delete labels

manage_gmail_filter

Extended

Create or delete Gmail filters

draft_gmail_message

Extended

Create drafts

get_gmail_threads_content_batch

Complete

Batch retrieve thread content

batch_modify_gmail_message_labels

Complete

Batch modify labels

start_google_auth

Complete

Legacy OAuth 2.0 auth (disabled when OAuth 2.1 is enabled)

Both send_gmail_message and draft_gmail_message support attachments via two methods:

Option 1: File Path (local server only)

attachments=[{"path": "/path/to/report.pdf"}]

Reads file from disk, auto-detects MIME type. Optional filename override.

Option 2: Base64 Content (works everywhere)

attachments=[{
    "filename": "report.pdf",
    "content": "JVBERi0xLjQK...",  # base64-encoded
    "mime_type": "application/pdf"   # optional
}]

โš ๏ธ Centrally Hosted Servers: When the MCP server runs remotely (cloud, shared instance), it cannot access your local filesystem. Use Option 2 with base64-encoded content. Your MCP client must encode files before sending.

When downloading Gmail attachments (get_gmail_attachment_content) or Drive files (get_drive_file_download_url), files are saved to a persistent local directory rather than a temporary folder in the working directory.

Default location: ~/.workspace-mcp/attachments/

Files are saved with their original filename plus a short UUID suffix for uniqueness (e.g., invoice_a1b2c3d4.pdf). In stdio mode, the tool returns the absolute file path for direct filesystem access. In HTTP mode, it returns a download URL via the /attachments/{file_id} endpoint.

To customize the storage directory:

export WORKSPACE_ATTACHMENT_DIR="/path/to/custom/dir"

Saved files expire after 1 hour and are cleaned up automatically.

๐Ÿ“ Google Docs docs_tools.py

Tool

Tier

Description

get_doc_content

Core

Extract document text

create_doc

Core

Create new documents (set format_as_markdown=True to render markdown content natively)

modify_doc_text

Core

Insert, replace, and richly format text with tab/segment targeting, append-to-segment support, advanced typography, link management, and native markdown rendering (format_as_markdown=True)

search_docs

Extended

Find documents by name

find_and_replace_doc

Extended

Find and replace text

list_docs_in_folder

Extended

List docs in folder

insert_doc_elements

Extended

Add tables, lists, page breaks

update_paragraph_style

Extended

Apply advanced paragraph styling including headings, spacing, direction, pagination controls, shading, and bulleted/numbered/checkbox lists with nesting

get_doc_as_markdown

Extended

Export document as formatted Markdown with optional comments

insert_doc_markdown

Extended

Insert markdown content with native Docs formatting (headings, bold/italic, bullets, numbered lists); supports tab/segment targeting and end-of-segment append

insert_doc_link

Extended

Insert clickable linked text at a specified index (tab-aware)

list_doc_tabs

Extended

List all tabs (and nested child tabs) with tab IDs, titles, indices, and nesting depth

insert_doc_image

Complete

Insert images from Drive/URLs

update_doc_headers_footers

Complete

Create or update headers and footers with correct segment-aware writes

batch_update_doc

Complete

Execute atomic multi-step Docs API operations including named ranges, section breaks, document/section layout, header/footer creation, segment-aware inserts, images, tables, and rich formatting

inspect_doc_structure

Complete

Analyze document structure, including safe insertion points, tables, section breaks, headers/footers, and named ranges

export_doc_to_pdf

Extended

Export document to PDF

create_table_with_data

Complete

Create data tables

debug_table_structure

Complete

Debug table issues

list_document_comments

Complete

List all document comments

manage_document_comment

Complete

Create, reply to, or resolve comments

insert_doc_person_chip

Complete

Insert an @mention person smart chip by email

insert_doc_file_chip

Complete

Insert a Drive file smart chip from its URL

get_doc_smart_chips

Complete

Extract all person and rich-link smart chips from the document

๐Ÿ“Š Google Sheets sheets_tools.py

Tool

Tier

Description

read_sheet_values

Core

Read cell ranges

modify_sheet_values

Core

Write/update/clear cells

create_spreadsheet

Core

Create new spreadsheets

list_spreadsheets

Extended

List accessible spreadsheets

get_spreadsheet_info

Extended

Get spreadsheet metadata

format_sheet_range

Extended

Apply colors, number formats, text wrapping, alignment, bold/italic, font size

list_sheet_tables

Extended

List structured tables with IDs, names, ranges, and columns

create_sheet

Complete

Add sheets to existing files

append_table_rows

Complete

Append rows to a structured table, auto-extending the table range

list_spreadsheet_comments

Complete

List all spreadsheet comments

manage_spreadsheet_comment

Complete

Create, reply to, or resolve comments

manage_conditional_formatting

Complete

Add, update, or delete conditional formatting rules

add_sheet_data_validation

Complete

Add dropdowns, number bounds, date/text rules, or custom-formula validation to a range

add_sheet_named_range

Complete

Create a named range that can be referenced by formulas

protect_sheet_range

Complete

Protect a range with optional editor whitelist and warning-only mode

manage_sheet_tabs

Complete

Rename, delete, or duplicate sheet tabs (single action-based tool)

๐Ÿ–ผ๏ธ Google Slides slides_tools.py

Tool

Tier

Description

create_presentation

Core

Create new presentations

get_presentation

Core

Retrieve presentation details

batch_update_presentation

Extended

Apply multiple updates

get_page

Extended

Get specific slide information

get_page_thumbnail

Extended

Generate slide thumbnails

format_slides_text

Extended

Apply text formatting (bold/italic/underline/strikethrough/color/font/size) to a slide element

format_all_slides_text

Extended

Apply text formatting to EVERY text element on a slide, or across the whole presentation in one call

format_slides_paragraph

Extended

Apply paragraph alignment, line spacing, spacing above/below, and bullet presets

style_slides_shape

Extended

Style a shape's fill color, outline color/weight, and dash style

set_slides_background

Extended

Set the background color of a slide

create_slides_text_box

Extended

Create a positioned text box with initial text and optional formatting

create_slides_shape

Extended

Create a positioned shape (rectangle, ellipse, triangle, star, arrow, etc.)

get_slides_speaker_notes

Extended

Read speaker notes from a slide

update_slides_speaker_notes

Extended

Replace speaker notes on a slide

insert_slides_image

Extended

Insert an image onto a slide from a public URL

delete_slides_element

Extended

Delete a slide or any page element by object ID

replace_slides_text

Extended

Find and replace text across an entire presentation

duplicate_slide

Extended

Duplicate a slide (or any object) and return the new object ID

reorder_slides

Extended

Move one or more slides to a new position

list_presentation_comments

Complete

List all presentation comments

manage_presentation_comment

Complete

Create, reply to, or resolve comments

๐Ÿ“‹ Google Forms forms_tools.py

Tool

Tier

Description

create_form

Core

Create new forms

get_form

Core

Retrieve form details & URLs

set_publish_settings

Complete

Configure form settings

get_form_response

Complete

Get individual responses

list_form_responses

Extended

List all responses with pagination

batch_update_form

Complete

Apply batch updates (questions, settings)

โœ“ Google Tasks tasks_tools.py

Tool

Tier

Description

list_tasks

Core

List tasks with filtering

get_task

Core

Retrieve task details

manage_task

Core

Create, update, delete, or move tasks

list_task_lists

Complete

List task lists

get_task_list

Complete

Get task list details

manage_task_list

Complete

Create, update, delete task lists, or clear completed tasks

๐Ÿ‘ค Google Contacts contacts_tools.py

Tool

Tier

Description

search_contacts

Core

Search contacts by name, email, phone

get_contact

Core

Retrieve detailed contact info

list_contacts

Core

List contacts with pagination

manage_contact

Core

Create, update, or delete contacts

list_contact_groups

Extended

List contact groups/labels

get_contact_group

Extended

Get group details with members

manage_contacts_batch

Complete

Batch create, update, or delete contacts

manage_contact_group

Complete

Create, update, delete groups, or modify membership

๐Ÿ’ฌ Google Chat chat_tools.py

Tool

Tier

Description

list_spaces

Extended

List chat spaces/rooms

get_messages

Core

Retrieve space messages

send_message

Core

Send messages to spaces

search_messages

Core

Search across chat history

create_reaction

Core

Add emoji reaction to a message

download_chat_attachment

Extended

Download attachment from a chat message

Tool

Tier

Description

search_custom

Core

Perform web searches (supports site restrictions via sites parameter)

get_search_engine_info

Complete

Retrieve search engine metadata

โšก Google Apps Script apps_script_tools.py

Tool

Tier

Description

list_script_projects

Core

List accessible Apps Script projects

get_script_project

Core

Get complete project with all files

get_script_content

Core

Retrieve specific file content

create_script_project

Core

Create new standalone or bound project

update_script_content

Core

Update or create script files

run_script_function

Core

Execute function with parameters

list_deployments

Extended

List all project deployments

manage_deployment

Extended

Create, update, or delete script deployments

list_script_processes

Extended

View recent executions and status

Tool Tier Legend: โ— Core โ€” Essential tools for basic functionality ยท Minimal API usage ยท Getting started โ— Extended โ€” Core + additional features ยท Regular usage ยท Expanded capabilities โ— Complete โ€” All available tools including advanced features ยท Power users ยท Full API access


Connect to Claude Desktop

The server supports two transport modes:

Stdio Mode (Legacy - For Clients with Incomplete MCP Support)

โš ๏ธ Important: Stdio mode is a legacy fallback for clients that don't properly implement the MCP specification with OAuth 2.1 and streamable HTTP support. Claude Code and other modern MCP clients should use streamable HTTP mode (--transport streamable-http) for proper OAuth flow and multi-user support.

In general, you should use the one-click DXT installer package for Claude Desktop. If you are unable to for some reason, you can configure it manually via claude_desktop_config.json

Manual Claude Configuration (Alternative)

  1. Open Claude Desktop Settings โ†’ Developer โ†’ Edit Config

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

    • Windows: %APPDATA%\Claude\claude_desktop_config.json

  2. Add the server configuration:

{
  "mcpServers": {
    "google_workspace": {
      "command": "uvx",
      "args": ["workspace-mcp"],
      "env": {
        "GOOGLE_OAUTH_CLIENT_ID": "your-client-id",
        "GOOGLE_OAUTH_CLIENT_SECRET": "your-secret",
        "OAUTHLIB_INSECURE_TRANSPORT": "1"
      }
    }
  }
}

Connect to LM Studio

Add a new MCP server in LM Studio (Settings โ†’ MCP Servers) using the same JSON format:

{
  "mcpServers": {
    "google_workspace": {
      "command": "uvx",
      "args": ["workspace-mcp"],
      "env": {
        "GOOGLE_OAUTH_CLIENT_ID": "your-client-id",
        "GOOGLE_OAUTH_CLIENT_SECRET": "your-secret",
        "OAUTHLIB_INSECURE_TRANSPORT": "1",
      }
    }
  }
}

2. Advanced / Cross-Platform Installation

If youโ€™re developing, deploying to servers, or using another MCP-capable client, keep reading.

Instant CLI (uvx)

# Requires Python 3.10+ and uvx
# First, set credentials (see Credential Configuration above)
uvx workspace-mcp --tool-tier core  # or --tools gmail drive calendar

Note: Configure OAuth credentials before running. Supports environment variables, .env file, or client_secret.json.

Local Development Setup

# Install everything needed for linting, tests, and release tooling
uv sync --group dev

# Run the same linter that git hooks invoke automatically
uv run ruff check .

# Execute the full test suite (async fixtures require pytest-asyncio)
uv run pytest
  • uv sync --group test installs only the testing stack if you need a slimmer environment.

  • uv run main.py --transport streamable-http launches the server with your checked-out code for manual verification.

  • Ruff is part of the dev group because pre-push hooks call ruff check automaticallyโ€”run it locally before committing to avoid hook failures.

OAuth 2.1 Support (Multi-User Bearer Token Authentication)

The server includes OAuth 2.1 support for bearer token authentication, enabling multi-user session management. OAuth 2.1 automatically reuses your existing GOOGLE_OAUTH_CLIENT_ID and, for confidential clients, GOOGLE_OAUTH_CLIENT_SECRET credentials - no additional Google-side configuration needed. Public PKCE clients are also supported: if you omit GOOGLE_OAUTH_CLIENT_SECRET, set FASTMCP_SERVER_AUTH_GOOGLE_JWT_SIGNING_KEY explicitly.

When to use OAuth 2.1:

  • Multiple users accessing the same MCP server instance

  • Need for bearer token authentication instead of passing user emails

  • Building web applications or APIs on top of the MCP server

  • Production environments requiring secure session management

  • Browser-based clients requiring CORS support

โš ๏ธ Important: Mutually exclusive authentication modes

OAuth 2.1 mode (MCP_ENABLE_OAUTH21=true) cannot be used together with --single-user or service account mode:

  • Single-user mode: For legacy clients that pass user emails in tool calls

  • OAuth 2.1 mode: For modern multi-user scenarios with bearer token authentication

  • Service account mode: For headless/server-to-server use via domain-wide delegation

Choose one authentication method - combining incompatible modes will result in a startup error.

Enabling OAuth 2.1: To enable OAuth 2.1, set the MCP_ENABLE_OAUTH21 environment variable to true.

# OAuth 2.1 requires HTTP transport mode
export MCP_ENABLE_OAUTH21=true
uv run main.py --transport streamable-http

If MCP_ENABLE_OAUTH21 is not set to true, the server will use legacy authentication, which is suitable for clients that do not support OAuth 2.1.

FastMCP ships a native GoogleProvider that we now rely on directly. It solves the two tricky parts of using Google OAuth with MCP clients:

  1. Dynamic Client Registration: Google still doesn't support OAuth 2.1 DCR, but the FastMCP provider exposes the full DCR surface and forwards registrations to Google using your fixed credentials. MCP clients register as usual and the provider hands them your Google client ID and, when configured, client secret under the hood.

  2. CORS & Browser Compatibility: The provider includes an OAuth proxy that serves all discovery, authorization, and token endpoints with proper CORS headers. We no longer maintain custom /oauth2/* routesโ€”the provider handles the upstream exchanges securely and advertises the correct metadata to clients.

The result is a leaner server that still enables any OAuth 2.1 compliant client (including browser-based ones) to authenticate through Google without bespoke code.

Stateless Mode (Container-Friendly)

The server supports a stateless mode designed for containerized environments where file system writes should be avoided:

Enabling Stateless Mode:

# Stateless mode requires OAuth 2.1 to be enabled
export MCP_ENABLE_OAUTH21=true
export WORKSPACE_MCP_STATELESS_MODE=true
uv run main.py --transport streamable-http

Key Features:

  • No file system writes: Credentials are never written to disk

  • No debug logs: File-based logging is completely disabled

  • Memory-only sessions: All tokens stored in memory via OAuth 2.1 session store

  • Container-ready: Perfect for Docker, Kubernetes, and serverless deployments

  • Token per request: Each request must include a valid Bearer token

Requirements:

  • Must be used with MCP_ENABLE_OAUTH21=true

  • Incompatible with single-user mode

  • Clients must handle OAuth flow and send valid tokens with each request

This mode is ideal for:

  • Cloud deployments where persistent storage is unavailable

  • Multi-tenant environments requiring strict isolation

  • Containerized applications with read-only filesystems

  • Serverless functions and ephemeral compute environments

MCP Inspector: No additional configuration needed with desktop OAuth client.

Claude Code: No additional configuration needed with desktop OAuth client.

OAuth Proxy Storage Backends

The server supports pluggable storage backends for OAuth proxy state management via FastMCP 2.13.0+. Choose a backend based on your deployment needs.

Available Backends:

Backend

Best For

Persistence

Multi-Server

Memory

Development, testing

โŒ

โŒ

Disk

Single-server production

โœ…

โŒ

Valkey/Redis

Distributed production

โœ…

โœ…

Configuration:

# Memory storage (fast, no persistence)
export WORKSPACE_MCP_OAUTH_PROXY_STORAGE_BACKEND=memory

# Disk storage (persists across restarts)
export WORKSPACE_MCP_OAUTH_PROXY_STORAGE_BACKEND=disk
export WORKSPACE_MCP_OAUTH_PROXY_DISK_DIRECTORY=~/.fastmcp/oauth-proxy

# Valkey/Redis storage (distributed, multi-server)
export WORKSPACE_MCP_OAUTH_PROXY_STORAGE_BACKEND=valkey
export WORKSPACE_MCP_OAUTH_PROXY_VALKEY_HOST=redis.example.com
export WORKSPACE_MCP_OAUTH_PROXY_VALKEY_PORT=6379

Disk support requires workspace-mcp[disk] (or py-key-value-aio[disk]) when installing from source. The official Docker image includes the disk extra by default. Valkey support is optional. Install workspace-mcp[valkey] (or py-key-value-aio[valkey]) only if you enable the Valkey backend. Windows: building valkey-glide from source requires MSVC C++ build tools with C11 support. If you see aws-lc-sys C11 errors, set CFLAGS=/std:c11.

Variable

Default

Description

WORKSPACE_MCP_OAUTH_PROXY_VALKEY_HOST

localhost

Valkey/Redis host

WORKSPACE_MCP_OAUTH_PROXY_VALKEY_PORT

6379

Port (6380 auto-enables TLS)

WORKSPACE_MCP_OAUTH_PROXY_VALKEY_DB

0

Database number

WORKSPACE_MCP_OAUTH_PROXY_VALKEY_USE_TLS

auto

Enable TLS (auto if port 6380)

WORKSPACE_MCP_OAUTH_PROXY_VALKEY_USERNAME

-

Authentication username

WORKSPACE_MCP_OAUTH_PROXY_VALKEY_PASSWORD

-

Authentication password

WORKSPACE_MCP_OAUTH_PROXY_VALKEY_REQUEST_TIMEOUT_MS

5000

Request timeout for remote hosts

WORKSPACE_MCP_OAUTH_PROXY_VALKEY_CONNECTION_TIMEOUT_MS

10000

Connection timeout for remote hosts

Encryption: Disk and Valkey storage are encrypted with Fernet. The encryption key is derived from FASTMCP_SERVER_AUTH_GOOGLE_JWT_SIGNING_KEY if set, otherwise from GOOGLE_OAUTH_CLIENT_SECRET. Public OAuth 2.1 client setups without a client secret must set FASTMCP_SERVER_AUTH_GOOGLE_JWT_SIGNING_KEY.

External OAuth 2.1 Provider Mode

The server supports an external OAuth 2.1 provider mode for scenarios where authentication is handled by an external system. In this mode, the MCP server does not manage the OAuth flow itself but expects valid bearer tokens in the Authorization header of tool calls.

Enabling External OAuth 2.1 Provider Mode:

# External OAuth provider mode requires OAuth 2.1 to be enabled
export MCP_ENABLE_OAUTH21=true
export EXTERNAL_OAUTH21_PROVIDER=true
uv run main.py --transport streamable-http

How It Works:

  • Protocol-level auth enabled: All MCP requests (including initialize and tools/list) require a valid Bearer token, following the standard OAuth 2.1 flow. Unauthenticated requests receive a 401 with resource metadata pointing to Google's authorization server.

  • External OAuth flow: Your external system handles the OAuth flow and obtains Google access tokens (ya29.*)

  • Token validation: Server validates bearer tokens by calling Google's userinfo API

  • Multi-user support: Each request is authenticated independently based on its bearer token

  • Resource metadata discovery: The server serves /.well-known/oauth-protected-resource (RFC 9728) advertising Google as the authorization server and the required scopes

Key Features:

  • No local OAuth flow: Server does not provide /authorize, /token, or /register endpoints โ€” only resource metadata

  • Bearer token only: All authentication via Authorization: Bearer <token> headers

  • Stateless by design: Works seamlessly with WORKSPACE_MCP_STATELESS_MODE=true

  • External identity providers: Integrate with your existing authentication infrastructure

Requirements:

  • Must be used with MCP_ENABLE_OAUTH21=true

  • OAuth client ID still required for token validation; client secret is optional for public clients (GOOGLE_OAUTH_CLIENT_ID, optional GOOGLE_OAUTH_CLIENT_SECRET)

  • External system must obtain valid Google OAuth access tokens (ya29.*)

  • Each tool call request must include valid bearer token

Use Cases:

  • Integrating with existing authentication systems

  • Custom OAuth flows managed by your application

  • API gateways that handle authentication upstream

  • Multi-tenant SaaS applications with centralized auth

  • Mobile or web apps with their own OAuth implementation

Service Account Mode (Domain-Wide Delegation)

WARNING: This mode uses Google Workspace domain-wide delegation, which grants the service account the ability to impersonate any user in your domain for the configured scopes. This is powerful and dangerous โ€” do not use this unless you fully understand the security implications. A misconfigured service account with broad scopes can read, modify, and delete data across every user in your organization. Only use this in tightly controlled environments where you know exactly what you're doing.

Service account mode allows the server to authenticate using a Google Cloud service account with domain-wide delegation instead of interactive OAuth flows. The service account impersonates a single configured domain user for all API calls.

When to use service account mode:

  • Headless or unattended environments where no browser is available for OAuth consent

  • Server-to-server integrations that need to act on behalf of a specific domain user

  • CI/CD pipelines or automation scripts

  • Environments where you cannot or do not want to manage per-user OAuth tokens

Enabling Service Account Mode:

# Option 1: Key file on disk
export GOOGLE_SERVICE_ACCOUNT_KEY_FILE="/path/to/service-account-key.json"
export USER_GOOGLE_EMAIL="user@yourdomain.com"
uv run main.py

# Option 2: Inline JSON key (e.g., from a secret manager)
export GOOGLE_SERVICE_ACCOUNT_KEY_JSON='{"type":"service_account","project_id":"...","private_key":"...","client_email":"..."}'
export USER_GOOGLE_EMAIL="user@yourdomain.com"
uv run main.py

Prerequisites:

  1. A Google Cloud service account with a JSON key

  2. Domain-wide delegation enabled for the service account in your Google Workspace Admin Console (Security โ†’ API controls โ†’ Domain-wide delegation)

  3. The required OAuth scopes authorized for the service account's client ID in the Admin Console

  4. USER_GOOGLE_EMAIL set to the domain user the service account will impersonate

Incompatibilities:

  • Cannot be combined with --single-user mode

  • Cannot be combined with MCP_ENABLE_OAUTH21=true

  • Only one key source may be provided โ€” set either GOOGLE_SERVICE_ACCOUNT_KEY_FILE or GOOGLE_SERVICE_ACCOUNT_KEY_JSON, not both

Key Behaviors:

  • The OAuth callback server is not started (no interactive auth needed)

  • Credentials directory permission checks are skipped

  • All operations impersonate the configured USER_GOOGLE_EMAIL โ€” any email addresses supplied in tool calls (e.g., user_email parameters) are ignored. This differs from OAuth modes where each user authenticates separately.

  • The service account key is validated at startup (checks for required fields and correct type)

VS Code MCP Client Support

โœ… Recommended: VS Code MCP extension properly supports the full MCP specification. Always use HTTP transport mode for proper OAuth 2.1 authentication.

{
    "servers": {
        "google-workspace": {
            "url": "http://localhost:8000/mcp/",
            "type": "http"
        }
    }
}

Note: Make sure to start the server with --transport streamable-http when using VS Code MCP.

Claude Code MCP Client Support

โœ… Recommended: Claude Code is a modern MCP client that properly supports the full MCP specification. Always use HTTP transport mode with Claude Code for proper OAuth 2.1 authentication and multi-user support.

# Start the server in HTTP mode first
uv run main.py --transport streamable-http

# Then add to Claude Code
claude mcp add --transport http workspace-mcp http://localhost:8000/mcp

# Optional: install the bundled Claude skill for better Workspace tool routing
mkdir -p ~/.claude/skills
ln -s "$(pwd)/skills/managing-google-workspace" ~/.claude/skills/managing-google-workspace

Or copy skills/managing-google-workspace into ~/.claude/skills/managing-google-workspace if you prefer not to symlink it.

Reverse Proxy Setup

If you're running the MCP server behind a reverse proxy (nginx, Apache, Cloudflare, etc.), you have two configuration options:

Problem: When behind a reverse proxy, the server constructs OAuth URLs using internal ports (e.g., http://localhost:8000) but external clients need the public URL (e.g., https://your-domain.com).

Solution 1: Set WORKSPACE_EXTERNAL_URL for all OAuth endpoints:

# This configures all OAuth endpoints to use your external URL
export WORKSPACE_EXTERNAL_URL="https://your-domain.com"

Solution 2: Set GOOGLE_OAUTH_REDIRECT_URI for just the callback:

# This only overrides the OAuth callback URL
export GOOGLE_OAUTH_REDIRECT_URI="https://your-domain.com/oauth2callback"

You also have options for: | OAUTH_CUSTOM_REDIRECT_URIS (optional) | Comma-separated list of additional redirect URIs | | OAUTH_ALLOWED_ORIGINS (optional) | Comma-separated list of additional CORS origins |

Important:

  • Use WORKSPACE_EXTERNAL_URL when all OAuth endpoints should use the external URL (recommended for reverse proxy setups)

  • Use GOOGLE_OAUTH_REDIRECT_URI when you only need to override the callback URL

  • The redirect URI must exactly match what's configured in your Google Cloud Console

  • Your reverse proxy must forward OAuth-related requests (/oauth2callback, /oauth2/*, /.well-known/*) to the MCP server

# Configure credentials first (see Credential Configuration section)

# Start with specific tools only
uvx workspace-mcp --tools gmail drive calendar tasks

# Start with tool tiers (recommended for most users)
uvx workspace-mcp --tool-tier core      # Essential tools
uvx workspace-mcp --tool-tier extended  # Core + additional features
uvx workspace-mcp --tool-tier complete  # All tools

# Start in HTTP mode for debugging
uvx workspace-mcp --transport streamable-http

Requires Python 3.10+ and uvx. The package is available on PyPI.

Development Installation

For development or customization:

git clone https://github.com/taylorwilsdon/google_workspace_mcp.git
cd google_workspace_mcp
uv run main.py

Development Installation (For Contributors):

{
  "mcpServers": {
    "google_workspace": {
      "command": "uv",
      "args": [
        "run",
        "--directory",
        "/path/to/repo/google_workspace_mcp",
        "main.py"
      ],
      "env": {
        "GOOGLE_OAUTH_CLIENT_ID": "your-client-id",
        "GOOGLE_OAUTH_CLIENT_SECRET": "your-secret",
        "OAUTHLIB_INSECURE_TRANSPORT": "1"
      }
    }
  }
}

HTTP Mode (For debugging or web interfaces)

If you need to use HTTP mode with Claude Desktop:

{
  "mcpServers": {
    "google_workspace": {
      "command": "npx",
      "args": ["mcp-remote", "http://localhost:8000/mcp"]
    }
  }
}

Note: Make sure to start the server with --transport streamable-http when using HTTP mode.

First-Time Authentication

The server uses Google Desktop OAuth for simplified authentication:

  • No redirect URIs needed: Desktop OAuth clients handle authentication without complex callback URLs

  • Automatic flow: The server manages the entire OAuth process transparently

  • Transport-agnostic: Works seamlessly in both stdio and HTTP modes

When calling a tool:

  1. Server returns authorization URL

  2. Open URL in browser and authorize

  3. Google provides an authorization code

  4. Paste the code when prompted (or it's handled automatically)

  5. Server completes authentication and retries your request


๐Ÿ”„ Pulling Upstream Changes

VE-GWS tracks taylorwilsdon/google_workspace_mcp as an upstream remote so improvements from the original project can be merged in periodically.

# First time only โ€” add upstream (already configured in this repo's clones)
git remote add upstream https://github.com/taylorwilsdon/google_workspace_mcp.git

# Fetch upstream commits
git fetch upstream

# Merge upstream main into your current branch
git merge upstream/main

# Or rebase instead, if you prefer linear history
# git rebase upstream/main

# Push to your fork
git push origin main

Because VE-GWS adds 25 tools and modifies gslides/slides_tools.py, gdocs/docs_tools.py, gsheets/sheets_tools.py, gdrive/drive_tools.py, and core/tool_tiers.yaml, merges will occasionally produce conflicts in those files. Resolve by keeping both sides' changes and re-running the test suite (uv run pytest tests/) before pushing.


โ—† Development

Project Structure

google_workspace_mcp/
โ”œโ”€โ”€ auth/              # Authentication system with decorators
โ”œโ”€โ”€ core/              # MCP server and utilities
โ”œโ”€โ”€ g{service}/        # Service-specific tools
โ”œโ”€โ”€ main.py            # Server entry point
โ”œโ”€โ”€ client_secret.json # OAuth credentials (not committed)
โ””โ”€โ”€ pyproject.toml     # Dependencies

Adding New Tools

from auth.service_decorator import require_google_service

@require_google_service("drive", "drive_read")  # Service + scope group
async def your_new_tool(service, param1: str, param2: int = 10):
    """Tool description"""
    # service is automatically injected and cached
    result = service.files().list().execute()
    return result  # Return native Python objects

Architecture Highlights

  • Service Caching: 30-minute TTL reduces authentication overhead

  • Scope Management: Centralized in SCOPE_GROUPS for easy maintenance

  • Error Handling: Native exceptions instead of manual error construction

  • Multi-Service Support: @require_multiple_services() for complex tools

Credential Store System

The server includes an abstract credential store API and a default backend for managing Google OAuth credentials with support for multiple storage backends:

Features:

  • Abstract Interface: CredentialStore base class defines standard operations (get, store, delete, list users)

  • Local File Storage: LocalDirectoryCredentialStore implementation stores credentials as JSON files

  • Configurable Storage: Environment variable GOOGLE_MCP_CREDENTIALS_DIR sets storage location

  • Multi-User Support: Store and manage credentials for multiple Google accounts

  • Automatic Directory Creation: Storage directory is created automatically if it doesn't exist

Configuration:

# Optional: Set custom credentials directory
export GOOGLE_MCP_CREDENTIALS_DIR="/path/to/credentials"

# Default locations (if GOOGLE_MCP_CREDENTIALS_DIR not set):
# - ~/.google_workspace_mcp/credentials (if home directory accessible)
# - ./.credentials (fallback)

Usage Example:

from auth.credential_store import get_credential_store

# Get the global credential store instance
store = get_credential_store()

# Store credentials for a user
store.store_credential("user@example.com", credentials)

# Retrieve credentials
creds = store.get_credential("user@example.com")

# List all users with stored credentials
users = store.list_users()

The credential store automatically handles credential serialization, expiry parsing, and provides error handling for storage operations.


โŠ  Security

  • Prompt Injection: This MCP server has the capability to retrieve your email, calendar events and drive files. Those emails, events and files could potentially contain prompt injections - i.e. hidden white text that tells it to forward your emails to a different address. You should exercise caution and in general, only connect trusted data to an LLM!

  • Credentials: Never commit .env, client_secret.json or the .credentials/ directory to source control!

  • OAuth Callback: Uses http://localhost:8000/oauth2callback for development (requires OAUTHLIB_INSECURE_TRANSPORT=1)

  • Transport-Aware Callbacks: Stdio mode starts a minimal HTTP server only for OAuth, ensuring callbacks work in all modes

  • Production: Use HTTPS & OAuth 2.1 and configure accordingly

  • Scope Minimization: Tools request only necessary permissions

  • Local File Access Control: Tools that read local files (e.g., attachments, file:// uploads) are restricted to the user's home directory by default. Override this with the ALLOWED_FILE_DIRS environment variable:

    # Colon-separated list of directories (semicolon on Windows) from which local file reads are permitted
    export ALLOWED_FILE_DIRS="/home/user/documents:/data/shared"

    Regardless of the allowlist, access to sensitive paths (.env, .ssh/, .aws/, /etc/shadow, credential files, etc.) is always blocked.



โ‰ก License

MIT License - see LICENSE file for details.


Validations: MCP Badge

Available Tools

149 tools
add_sheet_data_validationA

Apply a data-validation rule to a range (dropdowns, bounds, formulas).

Side effects: replaces any existing validation on the range. For conditional formatting (color rules) use manage_conditional_formatting. For protecting cells from edits use protect_sheet_range. Requires the spreadsheets OAuth scope.

Inputs: user_google_email (required), spreadsheet_id (required), range_name (required), validation_type (required), +5 more. Returns: result

add_sheet_named_rangeA

Define a named range that formulas and scripts can reference by name.

Creates a persistent alias for a range โ€” e.g., =SUM(TaxRate) instead of =SUM(Config!B2:B2). Named ranges show up in the Data > Named ranges sidebar and in formula autocomplete. Makes formulas more readable and lets you move the underlying cells without breaking references. To use the named range, write it bare in a formula (=TaxRate) โ€” no quotes, no sheet prefix.

Requires OAuth scope: https://www.googleapis.com/auth/spreadsheets (write).

Inputs: user_google_email (required), spreadsheet_id (required), name (required), range_name (required). Returns: result

append_table_rowsA

Append rows to a structured Sheets table, auto-extending its range.

Side effects: mutates the table โ€” new rows are added after the last existing row and the table range grows to include them. Values are typed automatically: bool โ†’ boolean, numeric โ†’ number, strings starting with "=" โ†’ formula, otherwise string. For plain range writes use modify_sheet_values. Requires the spreadsheets OAuth scope.

Inputs: user_google_email (required), spreadsheet_id (required), table_id (required), values (required). Returns: result

apply_continuous_numberingA

Convert plain-text "N. " step prefixes in a Google Doc (or specific tab) into a real numbered list whose numbering continues across intervening prompt paragraphs and sub-bullet lists. Idempotent โ€” safe to re-run on documents already processed.

Inputs: user_google_email (required), document_id (required), tab_id, strip_plain_text. Returns: result

batch_modify_gmail_message_labelsA

Add or remove labels on many Gmail messages in one API call.

Side effects: mutates label sets on every message in message_ids. Uses the Gmail batchModify endpoint (up to 1000 IDs per call โ€” Gmail's limit, not enforced here). For single messages use modify_gmail_message_labels. Requires the gmail.modify OAuth scope.

Inputs: user_google_email (required), message_ids (required), add_label_ids, remove_label_ids. Returns: result

batch_update_docA

Executes multiple low-level document operations in a single atomic batch update.

For normal header/footer text, prefer update_doc_headers_footers. Only use create_header_footer here for advanced section-break layouts.

RECOMMENDED WORKFLOW FOR BUILDING DOCUMENTS:

To avoid index calculation errors, build documents in phases:

PHASE 1 - INSERT ALL CONTENT (use end_of_segment=true, no index math): Append text, section breaks, and page breaks sequentially. Each operation appends to the end of the body. No index needed. Example batch: [ {"type": "insert_text", "end_of_segment": true, "text": "Report Title\n"}, {"type": "insert_text", "end_of_segment": true, "text": "\nExecutive Summary\n"}, {"type": "insert_text", "end_of_segment": true, "text": "Revenue grew 15%.\n"}, {"type": "insert_section_break", "end_of_segment": true, "section_type": "NEXT_PAGE"}, {"type": "insert_text", "end_of_segment": true, "text": "Detailed Analysis\n"} ]

PHASE 2 - CREATE HEADERS/FOOTERS (if needed): For normal header/footer text, use update_doc_headers_footers (it auto-creates if missing and writes the content for you). Only include create_header_footer operations in a batch when you are intentionally managing advanced section-break-specific layouts.

Inputs: user_google_email (required), document_id (required), operations (required). Returns: result

batch_update_formA

Apply a batch of Forms API edit requests in one atomic call.

Primary way to modify a form after creation โ€” add/update/delete questions, reorder items, update info, toggle quiz mode, etc. All requests apply atomically: partial failure rolls the whole batch back. Use get_form first to discover existing itemIds/questionIds. For publish settings use set_publish_settings. Requires the forms OAuth scope.

Inputs: user_google_email (required), form_id (required), requests (required). Returns: result

batch_update_presentationA

Apply a batch of Slides API edit requests in one atomic call.

This is the low-level escape hatch for anything not covered by the high-level helpers (create_slides_shape, create_slides_text_box, format_slides_text, duplicate_slide, reorder_slides, etc.). All requests in a single call apply atomically โ€” partial failure rolls back the whole batch. Requires the presentations OAuth scope.

Inputs: user_google_email (required), presentation_id (required), requests (required). Returns: result

check_drive_file_public_accessA

Search by filename and report whether the file is publicly linked.

Quick helper for Google Docs embedding โ€” a file must have "Anyone with the link" access before insert_doc_image can render it. If multiple files match the name, checks the first. For a specific file use get_drive_file_permissions. Requires the drive.readonly OAuth scope.

Inputs: user_google_email (required), file_name (required). Returns: result

copy_drive_fileA

Duplicate a Drive file (including Google Docs/Sheets/Slides).

Side effects: creates a new owned-by-caller file; formatting and content are preserved. For folders use copy_drive_folder (deep copy). For Google Docs specifically this is the standard "duplicate from template" pattern โ€” copy, then edit via batch_update_doc. Requires the drive.file OAuth scope.

Inputs: user_google_email (required), file_id (required), new_name, parent_folder_id. Returns: result

copy_drive_folderA

Recursively copy a Drive folder (and all its contents) to a new location.

Walks the source folder tree, creating the same structure under the destination and copying every file. Sequential to avoid rate-limit errors.

Inputs: user_google_email (required), source_folder_id (required), destination_parent_id, new_folder_name. Returns: result

create_calendarA

Create a new secondary calendar owned by the user.

Side effects: creates a new calendar and adds it to the user's calendar list. To add events use manage_event with the returned calendar_id. To share the calendar with others, use the Calendar web UI or ACL APIs (not exposed by this tool). Requires the full calendar OAuth scope.

Inputs: user_google_email (required), summary (required), description, timezone. Returns: result

create_docA

Creates a new Google Doc and optionally inserts initial content.

After creation, the document body starts at index 1. A new empty doc has total length 2 (one section break at index 0, one newline at index 1).

To build a rich document after creation, use batch_update_doc with insert_text operations using end_of_segment=true to append content sequentially without calculating indices. Then call inspect_doc_structure to get exact positions before applying formatting in a separate batch call.

Inputs: user_google_email (required), title (required), content, format_as_markdown. Returns: result

create_drive_fileA

Upload a file to Drive from content, a URL, or a local path.

Side effects: creates a new Drive file. To convert source files (Markdown, DOCX, etc.) into native Google Docs use import_to_google_doc instead. For a brand-new empty Google Doc/Sheet/Slide use create_doc/create_spreadsheet/create_presentation. Requires the drive.file OAuth scope.

Inputs: user_google_email (required), file_name (required), content, folder_id, +2 more. Returns: result

create_drive_folderA

Create a new folder in Drive (or inside a shared drive).

Side effects: creates a folder owned by the authenticated user (or by the shared drive when parent_folder_id lives in one). To upload files into the new folder use create_drive_file with folder_id set to the returned ID. Requires the drive.file OAuth scope.

Inputs: user_google_email (required), folder_name (required), parent_folder_id. Returns: result

create_formA

Create a new Google Form with title and optional description.

Side effects: creates a new empty form owned by the user. To add questions/items afterward use batch_update_form with createItem requests; inspect the form with get_form. Requires the forms OAuth scope.

Inputs: user_google_email (required), title (required), description, document_title. Returns: result

create_presentationA

Create a new empty Google Slides presentation.

Side effects: creates a new Slides file owned by the user in My Drive root. The new deck contains one default blank slide. To add more slides use batch_update_presentation with createSlide; to duplicate an existing deck use copy_drive_file. Requires the presentations OAuth scope.

Inputs: user_google_email (required), title. Returns: result

create_reactionA

Add an emoji reaction to a Chat message.

Side effects: creates a reaction visible to everyone in the space. Custom Workspace emoji are not supported here (Unicode only). For posting a new message use send_message. Requires the chat_write OAuth scope.

Inputs: user_google_email (required), message_id (required), emoji_unicode (required). Returns: result

create_script_projectA

Create a new (standalone or container-bound) Apps Script project.

Side effects: creates a new Apps Script project in Drive. Pass a parent_id of a Sheet/Doc/Form/Slides file ID to create a bound script; omit for a standalone script. To add files afterwards use update_script_content. Requires the script.projects OAuth scope.

Inputs: user_google_email (required), title (required), parent_id. Returns: result

create_sheetA

Add a new tab (sheet) to an existing spreadsheet.

Side effects: appends a new tab at the end. To rename/reorder/delete tabs use manage_sheet_tabs. For a brand-new spreadsheet use create_spreadsheet. Requires the spreadsheets OAuth scope.

Inputs: user_google_email (required), spreadsheet_id (required), sheet_name (required). Returns: result

create_slides_shapeA

Create a new shape element (rectangle, ellipse, arrow, etc.) on a Google Slide.

Use this to build layouts programmatically โ€” callouts, diagrams, backgrounds. For a TEXT-focused box, use create_slides_text_box (simpler + auto-sized for text). For styling an EXISTING shape (outline, shadow, filled color), use style_slides_shape. To add text inside a shape after creation, use batch_update_presentation with insertText.

Requires OAuth scope: https://www.googleapis.com/auth/presentations (write). Creates exactly one shape per call. Returns the new shape's object ID so you can reference it in follow-up calls (inserting text, setting fill, etc.).

Inputs: user_google_email (required), presentation_id (required), page_object_id (required), shape_type (required), +5 more. Returns: result

create_slides_text_boxA

Add a text box to a slide with initial content and position.

Use this for text content; use create_slides_shape for geometric shapes (rectangles, callouts, arrows). To edit text inside an existing element use batch_update_presentation with insertText / deleteText. All positions are in EMU (English Metric Units): 914400 EMU = 1 inch, 12700 EMU = 1 point. Requires the presentations OAuth scope.

Inputs: user_google_email (required), presentation_id (required), page_object_id (required), text (required), +7 more. Returns: result

create_spreadsheetA

Create a brand-new empty Google Spreadsheet in My Drive.

Side effects: creates a new file owned by the authenticated user in My Drive root. To add tabs to an existing spreadsheet use create_sheet. To upload an existing .xlsx use create_drive_file or import_to_google_doc (for content) instead. Requires the spreadsheets OAuth scope.

Inputs: user_google_email (required), title (required), sheet_names. Returns: result

create_table_with_dataA

Creates a table and populates it with data in one reliable operation.

CRITICAL: YOU MUST CALL inspect_doc_structure FIRST TO GET THE INDEX!

MANDATORY WORKFLOW - DO THESE STEPS IN ORDER:

Step 1: ALWAYS call inspect_doc_structure first Step 2: Use the 'total_length' value from inspect_doc_structure as your index Step 3: Format data as 2D list: [["col1", "col2"], ["row1col1", "row1col2"]] Step 4: Call this function with the correct index and data

EXAMPLE DATA FORMAT: table_data = [ ["Header1", "Header2", "Header3"], # Row 0 - headers ["Data1", "Data2", "Data3"], # Row 1 - first data row ["Data4", "Data5", "Data6"] # Row 2 - second data row ]

CRITICAL INDEX REQUIREMENTS:

  • NEVER use index values like 1, 2, 10 without calling inspect_doc_structure first

  • ALWAYS get index from inspect_doc_structure 'total_length' field

  • Index must be a valid insertion point in the document

DATA FORMAT REQUIREMENTS:

  • Must be 2D list of strings only

  • Each inner list = one table row

  • All rows MUST have same number of columns

  • Use empty strings "" for empty cells, never None

  • Use debug_table_structure after creation to verify results

Inputs: user_google_email (required), document_id (required), table_data (required), index (required), +2 more. Returns: result

create_versionA

Create a new immutable version snapshot of an Apps Script project.

Side effects: freezes the current code into a new versionNumber. Versions cannot be edited or deleted. A deployment can then be pinned to this version via manage_deployment. To list versions use list_versions. Requires the full script.projects OAuth scope.

Inputs: user_google_email (required), script_id (required), description. Returns: result

debug_docs_runtime_infoB

Return runtime/source information for diagnosing stale MCP server instances.

This is a temporary diagnostic tool intended to verify which code checkout the running MCP server has loaded.

Inputs: user_google_email (required). Returns: result

debug_table_structureA

ESSENTIAL DEBUGGING TOOL - Use this whenever tables don't work as expected.

USE THIS IMMEDIATELY WHEN:

  • Table population put data in wrong cells

  • You get "table not found" errors

  • Data appears concatenated in first cell

  • Need to understand existing table structure

  • Planning to use populate_existing_table

WHAT THIS SHOWS YOU:

  • Exact table dimensions (rows ร— columns)

  • Each cell's position coordinates (row,col)

  • Current content in each cell

  • Insertion indices for each cell

  • Table boundaries and ranges

HOW TO READ THE OUTPUT:

  • "dimensions": "2x3" = 2 rows, 3 columns

  • "position": "(0,0)" = first row, first column

  • "current_content": What's actually in each cell right now

  • "insertion_index": Where new text would be inserted in that cell

WORKFLOW INTEGRATION:

  1. After creating table โ†’ Use this to verify structure

  2. Before populating โ†’ Use this to plan your data format

  3. After population fails โ†’ Use this to see what went wrong

  4. When debugging โ†’ Compare your data array to actual table structure

Inputs: user_google_email (required), document_id (required), table_index. Returns: result

delete_doc_tabA

Delete a tab (and its entire sub-document) from a Google Doc.

Side effects: PERMANENTLY removes the tab and all its content โ€” UI-undo via Edit > Undo still works if the caller has the Doc open, but there is no API undo. To just rename a tab use update_doc_tab. Requires the documents OAuth scope.

Inputs: user_google_email (required), document_id (required), tab_id (required). Returns: result

delete_script_projectA

Permanently delete an Apps Script project (Drive-backed).

Side effects: PERMANENTLY deletes the script project via the Drive API (Apps Script projects are stored as Drive files). No undo via API โ€” Drive Trash may still allow restore for up to 30 days via the web UI. For disabling without deletion, remove deployments via manage_deployment instead. Requires the drive full OAuth scope.

Inputs: user_google_email (required), script_id (required). Returns: result

delete_slides_elementA

Delete any object from a Google Slides presentation by its object ID.

Works on any deletable object: an entire slide, a shape, a text box, an image, a table, a chart, a video, a line, etc. Passing a slide's object ID removes the whole slide (and everything on it). Passing a page element's object ID removes only that element. Deletion is permanent via API โ€” use the Slides UI's undo if you need to recover.

Requires OAuth scope: https://www.googleapis.com/auth/presentations (write). Not idempotent: re-calling with the same ID after success returns an error because the object no longer exists.

Inputs: user_google_email (required), presentation_id (required), object_id (required). Returns: result

download_chat_attachmentA

Download a Chat message attachment to disk or expose via URL.

Side effects: writes a file to the configured attachment storage (stdio mode) or publishes a 1-hour download URL (HTTP mode). In stateless mode, returns a base64 preview. Use get_messages to discover the message ID and per-message attachment indices. Requires the chat_read OAuth scope.

Inputs: user_google_email (required), message_id (required), attachment_index. Returns: result

draft_gmail_messageA

Creates a draft email in the user's Gmail account. Supports both new drafts and reply drafts with optional attachments. Supports Gmail's "Send As" feature to draft from configured alias addresses.

Inputs: user_google_email (required), subject (required), body (required), body_format, +11 more. Returns: result

duplicate_slideA

Duplicate a slide (or any single page element) within a presentation.

Creates an exact copy โ€” same layout, content, text, styling, speaker notes (for slides). The duplicate is inserted immediately after the source in slide order. Returns the new object's ID so you can modify the copy independently. To move the duplicate to a different position, chain with reorder_slides. To copy a slide into a DIFFERENT presentation, use the Drive copy + batch-update pattern (not this tool).

Requires OAuth scope: https://www.googleapis.com/auth/presentations (write). Each call duplicates one object; to duplicate many, call in a loop.

Inputs: user_google_email (required), presentation_id (required), page_object_id (required). Returns: result

export_doc_to_pdfA

Export a Google Doc as PDF and save the PDF back into Drive.

Side effects: creates a new PDF file in Drive (separate file from the Doc โ€” the Doc itself is untouched). To download bytes without saving use get_drive_file_download_url with export_format="pdf". To convert the source to DOCX or other formats use get_drive_file_download_url. Requires both docs (read) and drive.file OAuth scopes.

Inputs: user_google_email (required), document_id (required), pdf_filename, folder_id. Returns: result

find_and_replace_docA

Finds and replaces text throughout a Google Doc. No index calculation required.

This is the safest way to update specific text in a document because it does not require knowing any indices. Use this tool when you need to:

  • Replace placeholder text (e.g., {{TITLE}}) with real content

  • Update specific words or phrases throughout the document

  • Make targeted text changes without risk of index errors

For building documents from scratch, consider inserting text with unique placeholders via batch_update_doc, then using this tool to replace them.

Inputs: user_google_email (required), document_id (required), find_text (required), replace_text (required), +2 more. Returns: result

format_all_slides_textA

Bulk-apply character formatting to every text element on a slide or deck.

Walks the presentation, collects every page element containing text, and issues one updateTextStyle per element in a single batchUpdate. For a specific element use format_slides_text. For paragraph-level rules (alignment, spacing) use format_slides_paragraph. Requires the presentations OAuth scope.

Inputs: user_google_email (required), presentation_id (required), page_object_id, bold, +6 more. Returns: result

format_sheet_rangeA

Applies formatting to a range: colors, number formats, text wrapping, alignment, and text styling.

Colors accept hex strings (#RRGGBB). Number formats follow Sheets types (e.g., NUMBER, CURRENCY, DATE, PERCENT). If no sheet name is provided, the first sheet is used.

Inputs: user_google_email (required), spreadsheet_id (required), range_name (required), background_color, +9 more. Returns: result

format_slides_paragraphA

Apply paragraph-level formatting (alignment, spacing, bullets) to text inside a shape, text box, or table cell on a Google Slide.

Use this for paragraph concerns โ€” alignment, line spacing, space above/below, bullet lists. For character-level styling (bold, font size, color), use format_slides_text instead. For styling the shape itself (fill, outline, shadow), use style_slides_shape.

Requires OAuth scope: https://www.googleapis.com/auth/presentations (write). Idempotent: re-running with the same values is safe. No rate limits beyond Google Slides API defaults (~300 req/min per user).

Inputs: user_google_email (required), presentation_id (required), page_element_id (required), alignment, +6 more. Returns: result

format_slides_textA

Apply character-level formatting to text inside a slide element.

Use this for inline styling (bold, italic, font, color); use format_slides_paragraph for alignment/spacing/bullets, and style_slides_shape for the shape outline/fill/shadow. For bulk re-style across every text element use format_all_slides_text. Requires the presentations OAuth scope.

Inputs: user_google_email (required), presentation_id (required), page_element_id (required), bold, +8 more. Returns: result

generate_trigger_codeA

Generates Apps Script code for creating triggers.

The Apps Script API cannot create triggers directly - they must be created from within Apps Script itself. This tool generates the code you need.

Inputs: trigger_type (required), function_name (required), schedule. Returns: result

get_contactA

Fetch a single contact with all details (emails, phones, orgs, addresses).

Use this when you already have a contact ID from list_contacts or search_contacts and need the full record (including notes, addresses, multiple emails/phones). For creating/updating use manage_contact. Requires the contacts.readonly OAuth scope.

Inputs: user_google_email (required), contact_id (required). Returns: result

get_contact_groupA

Fetch a contact group's details and list of member contact IDs.

Use get_contact on each returned member ID to fetch full member records. For managing group membership (add/remove contacts) use manage_contact_group. Requires the contacts.readonly OAuth scope.

Inputs: user_google_email (required), group_id (required), max_members. Returns: result

get_doc_as_markdownA

Reads a Google Doc and returns it as clean Markdown with optional comment context.

Unlike get_doc_content which returns plain text, this tool preserves document formatting as Markdown: headings, bold/italic/strikethrough, links, code spans, ordered/unordered lists with nesting, and tables.

When comments are included (the default), each comment's anchor text โ€” the specific text the comment was attached to โ€” is preserved, giving full context for the discussion.

Inputs: user_google_email (required), document_id (required), include_comments, comment_mode, +2 more. Returns: result

get_doc_contentA

Retrieve Doc body text (native Google Docs or Drive-stored .docx).

For native Google Docs uses the Docs API and walks tabs (including nested child tabs). For non-native Drive files (.docx, etc.) falls back to the Drive download + text extraction path. For markdown output use get_doc_as_markdown; for structural inspection (style, headings, objects) use inspect_doc_structure. Requires both drive.readonly and docs.readonly OAuth scopes.

Inputs: user_google_email (required), document_id (required), suggestions_view_mode. Returns: result

get_doc_smart_chipsA

Extract every smart chip in a Google Doc โ€” person mentions and rich links.

Walks the document body, finds all person and richLink inline elements, and returns their type, character range, and key properties. Useful for auditing @mentions (who is referenced where), validating links to external resources, or building a chip inventory before batch-editing. Does NOT include inline hyperlinks that never upgraded to chips (use a direct text scan for those).

Requires OAuth scope: https://www.googleapis.com/auth/documents.readonly (or broader). Read-only โ€” safe to call repeatedly.

Scope note: This inspects the main document body only. Chips inside headers, footers, footnotes, or secondary tabs are not returned. Only chips that have been rendered/saved by the Docs client appear here โ€” chips inserted programmatically via insert_doc_person_chip or insert_doc_file_chip won't show up in this result until a user opens the doc in the Docs UI and Docs upgrades the raw linked text into a chip.

Inputs: user_google_email (required), document_id (required). Returns: result

get_drive_file_contentA

Download a Drive file and return its text (auto-extracting per type).

Use this when you need file text; for a URL to the raw bytes use get_drive_file_download_url, for metadata use get_file_metadata (in hosted clients) or list fields. Handles shared drives. Extraction: Google Docs/Sheets/Slides export to text/CSV; Office .docx/.xlsx/.pptx unzipped and parsed; PDFs extracted with pypdf (scanned PDFs fall back to a download hint); images returned as base64 for multimodal clients; other files decoded as UTF-8 or flagged binary. Requires the drive.readonly OAuth scope.

Inputs: user_google_email (required), file_id (required). Returns: result

get_drive_file_download_urlA

Save a Drive file to disk (or expose a temporary URL).

Side effects: writes a file to the configured attachment storage (stdio mode) or publishes a download URL valid for 1 hour (HTTP mode). For file text content use get_drive_file_content instead; use this when you specifically need the binary file or an export. Google-native files are exported โ€” Docs โ†’ PDF or DOCX; Sheets โ†’ XLSX, PDF, or CSV; Slides โ†’ PDF or PPTX. Other files download as-is. Requires the drive.readonly OAuth scope.

Inputs: user_google_email (required), file_id (required), export_format. Returns: result

get_drive_file_permissionsA

Inspect a Drive file's sharing permissions and public-link status.

Use this to audit who can access a file before sharing externally. To change sharing use set_drive_file_permissions or manage_drive_access. For a quick public-vs-private check by filename use check_drive_file_public_access. Requires the drive.readonly OAuth scope.

Inputs: user_google_email (required), file_id (required). Returns: result

get_drive_revisionsA

List the revision history for a Drive file, newest first.

Returns each revision's ID, modification timestamp, last-modifying user (display name + email), size in bytes (when available), MIME type, and whether it's pinned via keepForever. Use this to discover revision IDs before calling restore_drive_revision, or to audit who changed what.

Requires OAuth scope: https://www.googleapis.com/auth/drive.readonly (or broader). Read-only.

Limitation: Google-native files (Docs, Sheets, Slides) expose revisions in the API list but their binary content is not retrievable โ€” only non-native files (PDF, DOCX, images, etc.) support content restore. By default, Drive retains up to 100 revisions or 30 days, whichever comes first, unless a revision is pinned (keepForever: true).

Inputs: user_google_email (required), file_id (required), page_size. Returns: result

get_eventsA

Fetch events from a calendar โ€” one by ID, or a filtered range.

Two modes: (1) pass event_id to retrieve a single event (range/query params ignored); (2) omit event_id to list events in a time window, optionally filtered by keyword. For free/busy scanning across many calendars use query_freebusy instead. For creating/updating events use manage_event. Requires the calendar.readonly OAuth scope.

Inputs: user_google_email (required), calendar_id, event_id, time_min, +5 more. Returns: result

get_formA

Fetch a Google Form's metadata and full item list (questions, sections, grids, media items) by its form ID.

Use this before editing a form with batch_update_form โ€” the returned item indices and itemId/questionId values are the handles you pass into update/delete requests. For response data (submitted answers), use list_form_responses or get_form_response instead.

Requires OAuth scope: https://www.googleapis.com/auth/forms.body or forms.body.readonly (read-only).

Inputs: user_google_email (required), form_id (required). Returns: result

get_form_responseA

Fetch a single submitted response to a Google Form, including all answers keyed by question ID.

Use this when you already know the specific responseId (e.g., from a prior list_form_responses call or from a webhook/trigger). For bulk listing of all responses on a form, use list_form_responses. To look up which questionId maps to which question prompt, call get_form and read the item list.

Requires OAuth scope: https://www.googleapis.com/auth/forms.responses.readonly.

Inputs: user_google_email (required), form_id (required), response_id (required). Returns: result

get_gmail_attachment_contentA

Download a Gmail attachment to disk (or expose via download URL).

Side effects: writes a file to the configured attachment storage (stdio mode) or publishes a temporary download URL valid for 1 hour (HTTP mode). In stateless mode, no file is written and a base64 preview is returned instead. Attachment IDs are ephemeral โ€” always re-fetch the parent message (get_gmail_message_content) just before calling this. Requires the gmail.readonly OAuth scope.

Inputs: message_id (required), attachment_id (required), user_google_email (required). Returns: result

get_gmail_message_contentA

Retrieve one Gmail message's headers and body by ID.

Use this for a single message; for multiple IDs prefer get_gmail_messages_content_batch to avoid round trips. For an entire conversation use get_gmail_thread_content. Attachment bytes are not returned here โ€” use get_gmail_attachment_content. Requires the gmail.readonly OAuth scope.

Inputs: message_id (required), user_google_email (required), body_format. Returns: result

get_gmail_messages_content_batchA

Fetch many Gmail messages in one batch, chunked internally.

Prefer this over calling get_gmail_message_content in a loop โ€” uses the Gmail batch API (25 per request, auto-chunked) and falls back to sequential fetches if the batch call fails. Use format="metadata" when you only need headers for triage (cheaper + faster). Requires the gmail.readonly OAuth scope.

Inputs: message_ids (required), user_google_email (required), format, body_format. Returns: result

get_gmail_thread_contentA

Retrieve every message in one Gmail conversation thread.

Use this when you need the whole back-and-forth (replies, forwards, quoted history) โ€” for a single standalone message use get_gmail_message_content. For many threads at once use get_gmail_threads_content_batch. Requires the gmail.readonly OAuth scope.

Inputs: thread_id (required), user_google_email (required), body_format. Returns: result

get_gmail_threads_content_batchA

Fetch many Gmail threads in one batch, chunked internally.

Prefer this over calling get_gmail_thread_content in a loop โ€” uses the Gmail batch API (25 per request, auto-chunked) and falls back to sequential fetches if the batch call fails. Requires the gmail.readonly OAuth scope.

Inputs: thread_ids (required), user_google_email (required), body_format. Returns: result

get_messagesA

List messages in a Google Chat space with sender names resolved.

Use this to read a room/DM's recent messages. For text search across spaces use search_messages. For sending messages use send_message. For attachment downloads use download_chat_attachment. Senders are resolved to display names via the People API (both chat.read and contacts.readonly OAuth scopes required).

Inputs: user_google_email (required), space_id (required), page_size, order_by, +1 more. Returns: result

get_pageA

Fetch one slide's element list, types, and layout.

Use this when you need a single slide's details after get_presentation has given you the list of slide objectIds. For a thumbnail image use get_page_thumbnail. For the speaker notes text use get_slides_speaker_notes. Requires the presentations.readonly OAuth scope.

Inputs: user_google_email (required), presentation_id (required), page_object_id (required). Returns: result

get_page_thumbnailA

Generate a PNG thumbnail URL for one slide.

Useful for visual previews. Returns a Google-hosted URL (not the image bytes). The URL is short-lived โ€” fetch and cache quickly. For slide element details use get_page. Requires the presentations.readonly OAuth scope.

Inputs: user_google_email (required), presentation_id (required), page_object_id (required), thumbnail_size. Returns: result

get_presentationA

Retrieve a presentation's structure and extract text per slide.

Returns slide objectIds needed by other tools (get_page, format_slides_text, format_slides_paragraph, insert_slides_image, etc.). For a single-slide deep dive use get_page. For a rendered thumbnail image use get_page_thumbnail. Requires the presentations.readonly OAuth scope.

Inputs: user_google_email (required), presentation_id (required). Returns: result

get_script_contentA

Retrieve the full source of one file in an Apps Script project.

Use this after get_script_project has surfaced the file names. For project-wide overview use get_script_project. Requires the script.projects readonly OAuth scope.

Inputs: user_google_email (required), script_id (required), file_name (required). Returns: result

get_script_metricsA

Fetch execution analytics (users, runs, failures) for a script.

Returns time-series metrics over the last 7 days (DAILY) or 8 weeks (WEEKLY). Useful for adoption audits and error monitoring. For per-execution details use list_script_processes. Requires the script.metrics readonly OAuth scope.

Inputs: user_google_email (required), script_id (required), metrics_granularity. Returns: result

get_script_projectA

Retrieve an Apps Script project's metadata and all file contents.

Dumps every file in the project (gs/html/json) with a 200-char source preview. For the full content of one file use get_script_content. For writing use update_script_content. Requires the script.projects readonly OAuth scope.

Inputs: user_google_email (required), script_id (required). Returns: result

get_search_engine_infoB

Retrieves metadata about a Programmable Search Engine.

Inputs: user_google_email (required). Returns: result

get_slides_speaker_notesA

Read the speaker notes text from a single slide.

Returns the plain-text contents of the slide's speaker-notes pane (the area shown to the presenter in Presenter View, hidden from the audience). Useful for auditing/exporting notes, reviewing coverage per slide, or piping into transcripts. To modify notes, use update_slides_speaker_notes.

Requires OAuth scope: https://www.googleapis.com/auth/presentations.readonly (or broader). Read-only โ€” safe to call repeatedly.

Inputs: user_google_email (required), presentation_id (required), page_object_id, slide_index. Returns: result

get_spreadsheet_infoA

Inspect a spreadsheet's metadata (title, locale, tabs, sizes).

Use this to discover sheet (tab) names and sheetIds before calling read_sheet_values, manage_sheet_tabs, or protect_sheet_range. Also surfaces conditional format counts per tab. Does not read cell values โ€” use read_sheet_values for that. Requires the spreadsheets.readonly OAuth scope.

Inputs: user_google_email (required), spreadsheet_id (required). Returns: result

get_taskA

Fetch a single Google Tasks task by ID.

Returns full details including parent task ID (for subtasks), position, notes, due date, and web view link. For the full list of tasks in a list use list_tasks. For mutations use manage_task. Requires the tasks.readonly OAuth scope.

Inputs: user_google_email (required), task_list_id (required), task_id (required). Returns: result

get_task_listA

Fetch metadata for a single Google Tasks task list.

Returns list-level info only (title, last updated); for the list's tasks use list_tasks. Requires the tasks.readonly OAuth scope.

Inputs: user_google_email (required), task_list_id (required). Returns: result

get_versionA

Fetch metadata for a specific immutable version of a Google Apps Script project.

A "version" in Apps Script is a snapshot of script code taken at a point in time โ€” versions are referenced by deployments and cannot be edited after creation. Use this to inspect the description/create-time of one known version. For the full list of versions on a project, use list_versions. To create a new version from the current code, use create_version. To inspect deployments that point to versions, use list_deployments.

Requires OAuth scope: https://www.googleapis.com/auth/script.projects.readonly (read-only) or the broader script.projects scope.

Inputs: user_google_email (required), script_id (required), version_number (required). Returns: result

import_to_google_docA

Convert a source file into a native Google Doc on upload.

Drive performs the conversion server-side, preserving headings, lists, inline formatting, tables, etc. Use this (not create_drive_file) when you want a real Google Doc editable in the web UI. For adding content to an existing Doc use insert_doc_markdown or insert_doc_elements. Requires the drive.file OAuth scope.

Inputs: user_google_email (required), file_name (required), content, file_path, +3 more. Returns: result

insert_doc_elementsA

Insert a table, list, or page break into a Google Doc.

For plain text or inline markdown use modify_doc_text (with format_as_markdown=True for rich output). For images use insert_doc_image. For Drive-file chips use insert_doc_file_chip. Note: index 0 is automatically bumped to 1 (to skip the opening section break). Requires the documents OAuth scope.

Inputs: user_google_email (required), document_id (required), element_type (required), index (required), +4 more. Returns: result

insert_doc_file_chipA

Insert a Drive-file smart chip at an index in a Google Doc.

Side effect note: chip rendering happens client-side โ€” the API stores a linked URL, and Google Docs upgrades it to a chip with filename/ icon/preview on the next render. For a person @mention use insert_doc_person_chip; for a plain hyperlink use insert_doc_link. Requires the documents OAuth scope.

Inputs: user_google_email (required), document_id (required), file_url (required), display_text, +2 more. Returns: result

insert_doc_imageA

Insert an image into a Google Doc from Drive or an HTTPS URL.

When image_source is a Drive file ID, its sharing MUST allow "Anyone with the link" โ€” check with check_drive_file_public_access first. HTTPS URLs must serve image bytes directly (no redirects, login walls, or signed URLs). PNG/JPEG/GIF supported. Index 0 is auto-bumped to 1. Requires both docs and drive.readonly OAuth scopes.

Inputs: user_google_email (required), document_id (required), image_source (required), index (required), +2 more. Returns: result

insert_doc_markdownA

Insert markdown-formatted content into a Google Doc with native styling.

Converts markdown to Docs API batch requests so output renders with real Docs styles (headings, bold, lists), not raw markdown. For plain text insertion use modify_doc_text; for find-and-replace patterns use find_and_replace_doc. Supports # H1..### H3, **bold**, *italic*, - bullets, 1. numbered, and - [ ] checkbox (plus - [x]). Requires the documents OAuth scope.

Inputs: user_google_email (required), document_id (required), markdown (required), index, +3 more. Returns: result

insert_doc_person_chipA

Insert an @mention-style person chip at a specific position in a document.

Writes the person's email as linked text (href = mailto:<email>). When Google Docs renders the document, that linked-email pattern is auto-converted into a rich person chip โ€” a small inline pill showing the person's name, avatar, and hover card. The chip is a "smart chip" and shows up in get_doc_smart_chips as type person.

Requires OAuth scope: https://www.googleapis.com/auth/documents (write). For a Drive-file chip instead, use insert_doc_file_chip. For a plain hyperlink, use insert_doc_link.

Note: The chip only renders correctly once a collaborator or the owner opens the doc in the Google Docs UI โ€” Docs does the text-to-chip conversion client-side on render. The API always stores the raw linked email. Person resolution uses the email only; if the email doesn't match a Google account visible to the viewer, it falls back to plain linked text.

Inputs: user_google_email (required), document_id (required), email (required), index, +1 more. Returns: result

insert_doc_tabA

Create a new tab in a multi-tab Google Doc.

Side effects: creates a new empty tab (a sub-document) in the target Doc. Google Docs tabs (introduced Oct 2024) let one Doc hold multiple sub-documents. To list existing tabs + IDs use list_doc_tabs; to rename use update_doc_tab; to delete use delete_doc_tab. Requires the documents OAuth scope.

Inputs: user_google_email (required), document_id (required), title (required), index (required), +1 more. Returns: result

insert_slides_imageA

Insert an image onto a slide from a publicly accessible URL.

Google Slides fetches the image from the URL at insert time and embeds a reference in the presentation. The URL must be publicly accessible (or accessible to Google's servers) at the moment of the call โ€” private Drive URLs, signed URLs, and localhost URLs will fail. Supported formats: PNG, JPEG, GIF (Slides does not embed SVG).

Requires OAuth scope: https://www.googleapis.com/auth/presentations (write). Returns the new image's object ID so you can reference it later (reposition, resize, delete, etc.). Image size limit: 50 MB, 25 megapixels.

Inputs: user_google_email (required), presentation_id (required), page_object_id (required), image_url (required), +4 more. Returns: result

inspect_doc_structureA

Essential tool for finding safe insertion points and understanding document structure.

USE THIS FOR:

  • Finding the correct index for table insertion

  • Understanding document layout before making changes

  • Locating existing tables and their positions

  • Getting document statistics and complexity info

  • Inspecting structure of specific tabs

CRITICAL FOR TABLE OPERATIONS: ALWAYS call this BEFORE creating tables to get a safe insertion index.

WHAT THE OUTPUT SHOWS:

  • total_elements: Number of document elements

  • total_length: Maximum safe index for insertion

  • tables: Number of existing tables

  • table_details: Position and dimensions of each table

  • headers / footers: Real segment IDs and previews for header/footer editing

  • tabs: List of available tabs in the document (if no tab_id specified)

WORKFLOW FOR TABLE INSERTION: Step 1: Call this function Step 2: Note the "total_length" value Step 3: Use an index < total_length for table insertion Step 4: Create your table

FORMATTING WORKFLOW: After inserting all text via batch_update_doc with end_of_segment=true, call this tool with detailed=true to get exact start_index and end_index for every paragraph. Use those indices directly in format_text and update_paragraph_style operations in a second batch_update_doc call.

HEADER/FOOTER WORKFLOW: For ordinary header/footer text, use update_doc_headers_footers. If you need low-level segment editing, call this tool first and use the real segment_id values returned under headers/footers. Do not invent IDs.

The detailed output includes elements[].start_index and elements[].end_index with text_preview for each paragraph, making it easy to identify which ranges to format.

Inputs: user_google_email (required), document_id (required), detailed, tab_id. Returns: result

list_calendarsA

List every calendar the user owns or has access to.

Use this to discover calendar IDs before calling get_events, manage_event, or create_calendar โ€” calendar IDs (not names) are what those tools require. The user's main calendar is always addressable as "primary". Requires the calendar.readonly OAuth scope.

Inputs: user_google_email (required). Returns: result

list_contact_groupsA

List contact groups (labels) visible to the user.

Contact groups are the "labels" you see in Google Contacts sidebar (e.g. "Family", "Starred"). Use this to discover group IDs for get_contact_group or manage_contact_group. Requires the contacts.readonly OAuth scope.

Inputs: user_google_email (required), page_size, page_token. Returns: result

list_contactsA

List the authenticated user's personal Google contacts.

Returns contacts from "people/me" connections. For contact groups use list_contact_groups. For a fuzzy name/email search use search_contacts. For batch mutations use manage_contacts_batch. Requires the contacts.readonly OAuth scope.

Inputs: user_google_email (required), page_size, page_token, sort_order. Returns: result

list_deploymentsA

List all deployments (versioned snapshots) of an Apps Script project.

Deployments are how Apps Script exposes a script as a web app, API executable, add-on, or library. For managing deployments use manage_deployment; for code versions use list_versions. Requires the script.deployments.readonly OAuth scope.

Inputs: user_google_email (required), script_id (required). Returns: result

list_docs_in_folderA

List all Google Docs (native application/vnd.google-apps.document) that live directly inside a given Drive folder.

Use this when you want to enumerate Docs inside a known folder (e.g., a team drive subfolder). For name-based search across the whole Drive, use search_docs. For non-Doc files (Sheets, Slides, PDFs, etc.) in the folder, use list_drive_items or search_drive_files.

Only direct children are returned โ€” subfolders are NOT recursed. Shared drives are supported via supportsAllDrives=True + includeItemsFromAllDrives=True. Trashed docs are excluded.

Requires OAuth scope: https://www.googleapis.com/auth/drive.readonly (or broader drive scope).

Inputs: user_google_email (required), folder_id, page_size. Returns: result

list_doc_tabsA

List all tabs in a Google Doc, including nested child tabs, as a flat tree.

Google Docs tabs (launched Oct 2024) let a single document contain multiple sub-documents organized hierarchically. Most doc-editing tools need a tab_id to target a specific tab โ€” call this first to discover IDs, titles, and the tab hierarchy. Returned tabs preserve document order; indentation in the output indicates nesting depth (child tabs shown under their parent).

Requires OAuth scope: https://www.googleapis.com/auth/documents.readonly (or broader). Read-only.

Inputs: user_google_email (required), document_id (required). Returns: result

list_document_commentsC

List all comments from a Google Document.

Inputs: user_google_email (required), document_id (required). Returns: result

list_drive_itemsA

List files in one Drive folder (children of folder_id).

Use this to browse by folder; for content-based search use search_drive_files. Scoped to a folder's direct children. If drive_id is set, folder_id is interpreted inside that shared drive. Requires the drive.readonly OAuth scope.

Inputs: user_google_email (required), folder_id, page_size, page_token, +6 more. Returns: result

list_form_responsesA

List submitted responses for a Google Form with basic metadata (response IDs, timestamps, answer counts). Paginated.

Use this to discover response IDs and submission times, then call get_form_response with a specific responseId to pull the full answer payload. For the form's structure (questions, options), use get_form.

Requires OAuth scope: https://www.googleapis.com/auth/forms.responses.readonly.

Inputs: user_google_email (required), form_id (required), page_size, page_token. Returns: result

list_gmail_filtersA

List every server-side Gmail filter configured on the mailbox.

Filters auto-apply actions (label, forward, archive) to incoming mail matching their criteria. Use this to audit or discover filter IDs before calling manage_gmail_filter for delete. Requires the gmail.settings.basic OAuth scope.

Inputs: user_google_email (required). Returns: result

list_gmail_labelsA

List every label in the user's mailbox, split system vs user.

Use this to discover label IDs before calling modify_gmail_message_labels / batch_modify_gmail_message_labels / manage_gmail_filter โ€” label IDs (not names) are what those tools require. Requires the gmail.readonly OAuth scope.

Inputs: user_google_email (required). Returns: result

list_presentation_commentsB

List all comments from a Google Presentation.

Inputs: user_google_email (required), presentation_id (required). Returns: result

list_script_processesA

List recent Apps Script executions (across all scripts or one).

Useful for debugging failed runs or auditing triggered executions. Reports function name, status, start time, and duration per process. Requires the script.processes.readonly OAuth scope.

Inputs: user_google_email (required), page_size, script_id. Returns: result

list_script_projectsA

Find Apps Script projects by scanning the user's Drive.

Uses Drive API search (mimeType='application/vnd.google-apps.script') because the Apps Script API has no list endpoint of its own. For content of a specific script use get_script_project or get_script_content. Requires the drive.readonly OAuth scope.

Inputs: user_google_email (required), page_size, page_token. Returns: result

list_sheet_tablesA

List all structured tables (native Sheets tables) in a spreadsheet.

A "table" here is the newer native Sheets Table feature, not any bounded range. Use this to discover table_id before calling append_table_rows. Requires the spreadsheets.readonly OAuth scope.

Inputs: user_google_email (required), spreadsheet_id (required). Returns: result

list_spacesA

List Google Chat spaces (rooms and direct messages) the authenticated user is a member of.

Use this to discover the space_id (in spaces/<id> format) needed for get_messages, send_message, and related Chat tools. The user only sees spaces they have joined โ€” this will not surface public spaces in the workspace they haven't joined.

Requires OAuth scope: https://www.googleapis.com/auth/chat.spaces.readonly (read-only).

Inputs: user_google_email (required), page_size, space_type. Returns: result

list_spreadsheet_commentsB

List all comments from a Google Spreadsheet.

Inputs: user_google_email (required), spreadsheet_id (required). Returns: result

list_spreadsheetsA

List accessible Google Sheets spreadsheets (most-recently-modified first).

Use this as a discovery step when the user only has a spreadsheet name โ€” the returned ID feeds get_spreadsheet_info, read_sheet_values, etc. For a broader Drive search by name use search_drive_files with file_type="sheet". Requires the drive.readonly OAuth scope.

Inputs: user_google_email (required), max_results. Returns: result

list_task_listsA

List the user's Google Tasks task lists.

Use this to discover task_list_id before calling list_tasks, get_task, or manage_task. Every user has a default list ("My Tasks"). For modifying task lists themselves use manage_task_list. Requires the tasks.readonly OAuth scope.

Inputs: user_google_email (required), max_results, page_token. Returns: result

list_tasksA

List tasks in one task list, with rich filters and auto-pagination.

Auto-paginates internally to fill up to max_results. For one specific task use get_task. For write operations use manage_task. Completed tasks from the web UI / mobile apps are "hidden" by default โ€” to see them set both show_completed=True AND show_hidden=True. Requires the tasks.readonly OAuth scope.

Inputs: user_google_email (required), task_list_id (required), max_results, page_token, +9 more. Returns: result

list_versionsA

List all versions (immutable snapshots) of an Apps Script project.

Versions are the snapshots that deployments reference. Created automatically when you deploy, or manually via create_version. For deployments use list_deployments. Requires the script.projects readonly OAuth scope.

Inputs: user_google_email (required), script_id (required). Returns: result

manage_conditional_formattingA

Manages conditional formatting rules on a Google Sheet. Supports adding, updating, and deleting conditional formatting rules via a single tool.

Inputs: user_google_email (required), spreadsheet_id (required), action (required), range_name, +7 more. Returns: result

manage_contactB

Create, update, or delete a contact. Consolidated tool replacing create_contact, update_contact, and delete_contact.

Inputs: user_google_email (required), action (required), contact_id, given_name, +13 more. Returns: result

manage_contact_groupA

Create, update, delete, or modify members of a contact group.

Side effects: create/update/delete mutates the group itself; modify_members shifts contact membership without deleting contacts (unless action="delete" with delete_contacts=True). For reading use list_contact_groups / get_contact_group. Requires the contacts OAuth scope.

Inputs: user_google_email (required), action (required), group_id, name, +3 more. Returns: result

manage_contacts_batchA

Batch create, update, or delete contacts. Consolidated tool replacing batch_create_contacts, batch_update_contacts, and batch_delete_contacts.

Inputs: user_google_email (required), action (required), contacts, updates, +2 more. Returns: result

manage_deploymentA

Create, update, or delete an Apps Script deployment.

Side effects: create first generates a new version then deploys it (two API calls atomically); delete is destructive. To list existing deployments use list_deployments. For executing code via the API use run_script_function. Requires the script.deployments OAuth scope.

Inputs: user_google_email (required), action (required), script_id (required), deployment_id, +2 more. Returns: result

manage_document_commentA

Manage comments on a Google Document.

Actions:

  • create: Create a new document-level comment. Requires comment_content. Note: The Drive API cannot anchor comments to specific text; only the Google Docs UI can do that.

  • reply: Reply to a comment. Requires comment_id and comment_content.

  • resolve: Resolve a comment. Requires comment_id.

Inputs: user_google_email (required), document_id (required), action (required), comment_content, +1 more. Returns: result

manage_drive_accessA

Grant, batch-grant, update, revoke, or transfer ownership on a Drive item.

Side effects: all actions mutate permissions; transfer_owner permanently changes the file's owner. Notification emails are sent per send_notification. For read-only inspection use get_drive_file_permissions. Requires the drive.file OAuth scope (or higher for cross-domain transfers).

Inputs: user_google_email (required), file_id (required), action (required), share_with, +10 more. Returns: result

manage_eventA

Create, update, delete, or RSVP to a calendar event.

Side effects: mutates calendar state on the account. Delete is destructive. Attendee email notifications follow send_updates. For read-only fetches use get_events; for focus-time blocks use manage_focus_time. Requires the calendar.events OAuth scope.

Inputs: user_google_email (required), action (required), summary, start_time, +21 more. Returns: result

manage_focus_timeA

Create, list, update, or delete Focus Time events.

Focus Time is a special event type that auto-declines conflicting invitations and (by default) sets Google Chat to Do Not Disturb for the duration. Lives on the primary calendar only. For regular events use manage_event; for OOO use manage_out_of_office. Side effects: mutating actions may auto-decline existing/incoming invites and flip chat presence. Requires the calendar.events OAuth scope.

Inputs: user_google_email (required), action (required), start_time, end_time, +12 more. Returns: result

manage_gmail_filterA

Create or delete a server-side Gmail filter.

Side effects: creates a persistent auto-action rule or permanently deletes one. Filter updates are not supported by the Gmail API โ€” delete and recreate instead. Use list_gmail_filters first to inspect existing filters. Requires the gmail.settings.basic OAuth scope.

Inputs: user_google_email (required), action (required), criteria, filter_action, +1 more. Returns: result

manage_gmail_labelA

Create, update, or delete a Gmail label.

Side effects: creates/mutates/deletes a label on the account โ€” delete is destructive and unrecoverable. To only apply or remove labels from messages (not manage the labels themselves) use modify_gmail_message_labels instead. Requires the gmail.labels OAuth scope.

Inputs: user_google_email (required), action (required), name, label_id, +2 more. Returns: result

manage_out_of_officeA

Create, list, update, or delete Out of Office events.

OOO events are a special event type that auto-declines conflicting invitations and sets Workspace presence to "Out of office". They live on the primary calendar only. For normal events use manage_event; for focus-time blocks use manage_focus_time. Side effects: mutating actions may auto-decline existing/incoming invites based on auto_decline_mode. Requires the calendar.events OAuth scope.

Inputs: user_google_email (required), action (required), start_time, end_time, +10 more. Returns: result

manage_presentation_commentA

Manage comments on a Google Presentation.

Actions:

  • create: Create a new comment. Requires comment_content. Note: The Drive API cannot anchor comments to arbitrary text; Slides comments are element-scoped via the API.

  • reply: Reply to a comment. Requires comment_id and comment_content.

  • resolve: Resolve a comment. Requires comment_id.

Inputs: user_google_email (required), presentation_id (required), action (required), comment_content, +1 more. Returns: result

manage_sheet_tabsA

Rename, delete, or duplicate a sheet tab inside a spreadsheet.

Single entrypoint for the three most common tab lifecycle operations. To CREATE a new tab from scratch, use create_sheet (separate tool). To reorder tabs, use batch_update with updateSheetProperties.index. Deletion is permanent โ€” the undo is only available through the Sheets UI, not via the API.

Requires OAuth scope: https://www.googleapis.com/auth/spreadsheets (write).

Inputs: user_google_email (required), spreadsheet_id (required), action (required), sheet_id, +2 more. Returns: result

manage_spreadsheet_commentA

Manage comments on a Google Spreadsheet.

Actions:

  • create: Create a new comment. Requires comment_content. Note: The Drive API cannot anchor comments to arbitrary text; Sheets comments are cell-scoped via the API.

  • reply: Reply to a comment. Requires comment_id and comment_content.

  • resolve: Resolve a comment. Requires comment_id.

Inputs: user_google_email (required), spreadsheet_id (required), action (required), comment_content, +1 more. Returns: result

manage_taskA

Create, update, delete, or move a task inside a task list.

Side effects: mutates Google Tasks state. "move" can reparent a task (make it a subtask) and/or relocate it to a different list. Complete a task by calling action="update" with status="completed". For list-level operations use manage_task_list. Requires the tasks OAuth scope.

Inputs: user_google_email (required), action (required), task_list_id (required), task_id, +7 more. Returns: result

manage_task_listA

Create, rename, delete a task list, or clear its completed tasks.

Side effects: delete is destructive โ€” removes the list AND all its tasks. clear_completed hides completed tasks from default views (they remain retrievable via list_tasks with show_hidden=True). For tasks inside a list use manage_task. Requires the tasks OAuth scope.

Inputs: user_google_email (required), action (required), task_list_id, title. Returns: result

modify_doc_textA

Modifies text in a Google Doc - can insert/replace text and/or apply formatting in a single operation.

TIP: To append text to the end of the document without calculating indices, set end_of_segment=true. This avoids index calculation errors.

MARKDOWN MODE: Set format_as_markdown=True to parse text as markdown and insert it with native Docs formatting (headings, bold, italic, bullets, numbered lists). Works for both plain insertion and range replacement. When enabled, explicit formatting parameters (bold, italic, font_size, etc.) must NOT be set โ€” markdown brings its own formatting.

For ordinary header/footer text, prefer update_doc_headers_footers. Only pass segment_id when you already have a real header/footer/footnote segment ID from inspect_doc_structure output. Do not guess IDs such as "kix.header" or "kix.footer".

Inputs: user_google_email (required), document_id (required), start_index (required), end_index, +18 more. Returns: result

modify_gmail_message_labelsA

Add or remove labels on one Gmail message.

Side effects: mutates the message's label set. Common recipes: remove "INBOX" to archive, add "TRASH" to delete (soft), add "STARRED" to star. For many messages at once use batch_modify_gmail_message_labels. To create/delete the labels themselves use manage_gmail_label. Requires the gmail.modify OAuth scope.

Inputs: user_google_email (required), message_id (required), add_label_ids, remove_label_ids. Returns: result

modify_sheet_valuesA

Write, overwrite, or clear values in an A1 range.

Side effects: overwrites existing cells in the exact range. To append new rows to a table use append_table_rows instead. For formatting use format_sheet_range. Requires the spreadsheets OAuth scope.

Inputs: user_google_email (required), spreadsheet_id (required), range_name (required), values, +2 more. Returns: result

protect_sheet_rangeA

Protect a range in a spreadsheet so unauthorized users cannot edit it.

Adds a Sheets "Protected range" entry (Data > Protect sheets and ranges) restricting who can modify the cells. Two enforcement modes: strict (non-editors are blocked) or warning-only (a confirmation dialog appears, but edits are allowed). Use strict for financial data, formula cells, or anything where an accidental overwrite would corrupt downstream calcs.

Requires OAuth scope: https://www.googleapis.com/auth/spreadsheets (write). Protection does NOT prevent the owner or anyone with file-level "Editor" permission on the Drive file from bypassing via the Sheets UI โ€” it only gates in-cell edits. For hard access control, use Drive sharing.

Inputs: user_google_email (required), spreadsheet_id (required), range_name (required), description, +2 more. Returns: result

query_freebusyA

Query busy-time windows across one or more calendars.

Use this to find scheduling conflicts or free slots before creating an event โ€” it returns only busy periods, not event details. For event details use get_events. This is the efficient way to compare availability across multiple people/rooms. Requires the calendar.readonly OAuth scope.

Inputs: user_google_email (required), time_min (required), time_max (required), calendar_ids, +2 more. Returns: result

read_sheet_valuesA

Read cell values from an A1 range (optionally with formulas/notes).

Output is capped at 50 rows for readability โ€” widen the range or paginate manually for more. For writing use modify_sheet_values. For appending to a table use append_table_rows. Requires the spreadsheets.readonly OAuth scope.

Inputs: user_google_email (required), spreadsheet_id (required), range_name, include_hyperlinks, +2 more. Returns: result

reorder_slidesA

Move one or more slides to a new position in the deck.

Reorders slides by inserting them at insertion_index in the slide list. When multiple slide IDs are passed, they are placed consecutively at the target position, preserving the order given in slide_object_ids. This tool only reorders slides โ€” it does not reorder page elements inside a slide. For that, use batch_update_presentation with updatePageElementZOrder.

Requires OAuth scope: https://www.googleapis.com/auth/presentations (write). Google Slides API enforces that all listed IDs must currently belong to the presentation; mixing element IDs with slide IDs is an error.

Inputs: user_google_email (required), presentation_id (required), slide_object_ids (required), insertion_index (required). Returns: result

replace_slides_textA

Find-and-replace a literal string across every text element in the deck.

Scans all slides, text boxes, shapes, table cells, and speaker notes. Replaces every occurrence of find_text with replace_text in a single batch operation. Plain substring match โ€” no regex, wildcards, or whole-word matching. To do scoped replacement within a single element, edit the text range directly via format_slides_text or modify_doc_text equivalents.

Requires OAuth scope: https://www.googleapis.com/auth/presentations (write). Idempotent: re-running after all matches are replaced is a no-op (returns 0 occurrences).

Inputs: user_google_email (required), presentation_id (required), find_text (required), replace_text (required), +1 more. Returns: result

resize_sheet_dimensionsC

Manages sheet-level dimension properties: resize columns/rows, auto-resize to fit content, freeze rows/columns, hide/unhide rows/columns, and insert/delete rows/columns.

Inputs: user_google_email (required), spreadsheet_id (required), sheet_name, column_sizes, +15 more. Returns: result

restore_drive_revisionA

Restore a Drive file's content to a previous revision.

Downloads the raw bytes of the specified revision and re-uploads them as the file's current content. This creates a NEW revision identical to the old one (it does not rewind the revision history โ€” older revisions remain accessible). Original file ID, name, and sharing permissions are preserved.

Requires OAuth scope: https://www.googleapis.com/auth/drive (write). Large files (>100 MB) may take several seconds due to download+upload cycle.

Limitation: Google-native files (Docs, Sheets, Slides โ€” MIME type application/vnd.google-apps.*) do NOT expose raw revision content via the Drive API. Attempting to restore a native file returns an explanatory error. For those, open the file in Google Docs/Sheets/Slides and use the built-in "Version history" UI (File > Version history > See version history). Binary-content files (PDFs, DOCX, XLSX, images, ZIP, etc.) are fully supported.

Inputs: user_google_email (required), file_id (required), revision_id (required). Returns: result

run_script_functionA

Execute a function inside an Apps Script project.

Requires the project to have an API-executable deployment configured (Deploy > New deployment > Library/API executable). dev_mode=True runs the latest saved code without needing a fresh deployment โ€” available only to the script's OWN Google account. For managing deployments themselves use manage_deployment. Requires the script.projects OAuth scope plus any scopes the target function needs.

Inputs: user_google_email (required), script_id (required), function_name (required), parameters, +1 more. Returns: result

search_contactsA

Search contacts by substring across names, emails, phones.

Uses the People API searchContacts endpoint (max 30 results). For paginated full enumeration use list_contacts. For a known contact ID use get_contact. A cache warm-up call is issued on first use since the search index is user-specific and lazily populated. Requires the contacts.readonly OAuth scope.

Inputs: user_google_email (required), query (required), page_size. Returns: result

search_customC

Performs a search using Google Custom Search JSON API.

Inputs: user_google_email (required), q (required), num, start, +9 more. Returns: result

search_docsA

Search for Google Docs by filename substring across the user's entire Drive (including shared drives and items shared with them).

Use this for name-only lookups โ€” it runs a Drive files.list query with name contains '<query>' and a mimeType filter pinned to native Google Docs. It does NOT search document content; for full-text search use search_drive_files with a fullText query, or an external search index. For listing docs in a specific folder, use list_docs_in_folder.

Requires OAuth scope: https://www.googleapis.com/auth/drive.readonly (or broader drive scope). trashed=false is always applied โ€” trashed docs are excluded.

Inputs: user_google_email (required), query (required), page_size. Returns: result

search_drive_filesA

Search Drive (including shared drives) for files and folders.

Free-text queries are auto-wrapped in fullText contains '...'; structured Drive queries pass through as-is. For listing a single folder by parent use list_drive_items. For file content use get_drive_file_content. Requires the drive.readonly OAuth scope.

Inputs: user_google_email (required), query (required), page_size, page_token, +6 more. Returns: result

search_gmail_messagesA

Search Gmail messages and return their IDs plus clickable web links.

Use this to locate messages by subject/sender/date before calling get_gmail_message_content (single) or get_gmail_messages_content_batch (many). This tool returns IDs only, not bodies โ€” fetch bodies in a second step. Requires the gmail.readonly OAuth scope.

Inputs: query (required), user_google_email (required), page_size, page_token. Returns: result

search_messagesA

Search Chat messages across one or many spaces by text and/or time.

The Chat API does not support server-side full-text search, so this tool fetches messages per space (with optional createTime filter applied server-side) and does a case-insensitive substring match on message text client-side. For a single space list without filtering use get_messages. Requires both chat.read and contacts.readonly OAuth scopes (senders are resolved to names via People API).

Inputs: user_google_email (required), query, space_id, page_size, +2 more. Returns: result

send_gmail_messageA

Sends an email using the user's Gmail account. Supports both new emails and replies with optional attachments. Supports Gmail's "Send As" feature to send from configured alias addresses.

Inputs: user_google_email (required), to (required), subject (required), body (required), +9 more. Returns: result

send_messageA

Post a text message to a Google Chat space (optionally threaded).

Side effects: creates a new visible message in the space. For adding an emoji reaction to an existing message use create_reaction. For listing what's in a space use get_messages. Requires the chat.messages.create (chat_write) OAuth scope.

Inputs: user_google_email (required), space_id (required), message_text (required), thread_key, +1 more. Returns: result

set_drive_file_permissionsA

Toggle link-sharing and common file-level sharing controls.

Side effects: mutates sharing policy. Use this for high-level toggles ("anyone with the link", editor share rights, viewer copy-prevention). For per-user/group permission changes use manage_drive_access. At least one of the three flags must be set. Requires the drive.file OAuth scope.

Inputs: user_google_email (required), file_id (required), link_sharing, writers_can_share, +1 more. Returns: result

set_publish_settingsA

Update a Google Form's publishing and auth requirements.

Side effects: mutates publish settings โ€” changes how the form is discoverable (template) and who can submit (auth required). Does NOT change which items are on the form; for that use batch_update_form. Requires the forms OAuth scope.

Inputs: user_google_email (required), form_id (required), publish_as_template, require_authentication. Returns: result

set_slides_backgroundA

Set the background fill color of a single slide (the page itself).

Changes the slide's own background โ€” distinct from styling a shape placed on the slide. For per-shape fill, use style_slides_shape. To change background for multiple slides, call this tool once per slide.

Requires OAuth scope: https://www.googleapis.com/auth/presentations (write). Overrides any inherited master/layout background with a solid color.

Inputs: user_google_email (required), presentation_id (required), page_object_id (required), color (required), +1 more. Returns: result

start_google_authA

Manually initiate Google OAuth authentication flow.

NOTE: This is a legacy OAuth 2.0 tool and is disabled when OAuth 2.1 is enabled. The authentication system automatically handles credential checks and prompts for authentication when needed. Only use this tool if:

  1. You need to re-authenticate with different credentials

  2. You want to proactively authenticate before using other tools

  3. The automatic authentication flow failed and you need to retry

In most cases, simply try calling the Google Workspace tool you need - it will automatically handle authentication if required.

Inputs: service_name (required), user_google_email. Returns: result

style_slides_shapeA

Style an existing shape's fill and outline on a Google Slide.

Use this to change the look of a shape that already exists โ€” background fill color/opacity, outline color, outline thickness, dash pattern. For paragraph-level text formatting inside the shape (alignment, bullets), use format_slides_paragraph. For character styling of text (bold, font size), use format_slides_text. To create the shape in the first place, use create_slides_shape.

Requires OAuth scope: https://www.googleapis.com/auth/presentations (write). Only fields passed in will be updated โ€” omitted args are left unchanged.

Inputs: user_google_email (required), presentation_id (required), page_element_id (required), fill_color, +4 more. Returns: result

update_doc_headers_footersA

Safely creates or updates header/footer text in a Google Doc.

This is the default tool for header/footer content. Do NOT use batch_update_doc with create_header_footer just to set header/footer text; that low-level operation is only for advanced section-break workflows and can fail when the default header/footer already exists.

This tool handles both creation and update in one call:

  • If the header/footer does not exist, it is automatically created first.

  • If the header/footer already exists, its content is replaced.

You do NOT need to create a header/footer separately before calling this tool. Simply call it with the desired content and it will work whether the header/footer exists or not.

Inputs: user_google_email (required), document_id (required), section_type (required), content (required), +1 more. Returns: result

update_doc_tabA

Rename an existing tab in a Google Doc.

Changes the tab's display title only โ€” does not move or delete its content. For creating tabs use insert_doc_tab; for deleting use delete_doc_tab. Requires the documents OAuth scope.

Inputs: user_google_email (required), document_id (required), tab_id (required), title (required). Returns: result

update_drive_fileA

Update a Drive file's metadata, folder parents, and flags.

Side effects: mutates the file (rename, move via add/remove_parents, trash/untrash, star). Does NOT upload new content โ€” for content use a native-app tool or create_drive_file. trashed=True is reversible with trashed=False until the file is permanently deleted. Requires the drive.file OAuth scope.

Inputs: user_google_email (required), file_id (required), name, description, +8 more. Returns: result

update_paragraph_styleB

Apply paragraph-level formatting, heading styles, and/or list formatting to a range in a Google Doc.

This tool can apply named heading styles (H1-H6) for semantic document structure, create bulleted or numbered lists with nested indentation, and customize paragraph properties like alignment, spacing, and indentation. All operations can be applied in a single call.

Inputs: user_google_email (required), document_id (required), start_index (required), end_index (required), +21 more. Returns: result

update_script_contentA

Write files into an Apps Script project (replacing the full set).

Side effect: this is a full replace of the project's files โ€” any file NOT included in files is deleted. Always fetch via get_script_project first, modify the set, and pass the complete list back. Requires the script.projects OAuth scope.

Inputs: user_google_email (required), script_id (required), files (required). Returns: result

update_slides_speaker_notesA

Replace the speaker notes on a slide (deletes existing, inserts new).

Fully overwrites the slide's speaker-notes pane โ€” this is NOT an append. Existing notes are deleted first, then the new text is inserted. Pass an empty string to clear notes without adding any. To read current notes before overwriting, use get_slides_speaker_notes.

Requires OAuth scope: https://www.googleapis.com/auth/presentations (write).

Inputs: user_google_email (required), presentation_id (required), page_object_id (required), notes (required). Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelogโ€ฆ

    TDQS

    A3.9/5.0

    Scored across 149 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose, with detailed descriptions that cross-reference other tools to guide correct selection. Overlapping tools (e.g., modify_doc_text vs. insert_doc_markdown) are differentiated by use case and behavior, minimizing ambiguity.

    Naming Consistency4/5

    Most tools follow a consistent verb_noun pattern (e.g., create_doc, list_spaces, manage_event). A few outliers like debug_docs_runtime_info and start_google_auth break the pattern, but overall the naming is predictable and readable.

    Tool Count3/5

    The 149 tools cover a wide range of Google Workspace services, which justifies a larger set. However, this exceeds the typical well-scoped range (3-15 tools), making the server heavy but still organized enough to navigate.

    Completeness5/5

    The tool set offers comprehensive CRUD and lifecycle coverage for each service (Docs, Sheets, Slides, Drive, Gmail, Calendar, Tasks, Contacts, Forms, Chat, Apps Script, etc.). Only niche features like advanced animations are missing, and most common workflows are fully supported.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers