MCP ConfigsApr 8, 2026·3 min read

Google Workspace MCP — Gmail Drive Calendar for AI

Official Google CLI with built-in MCP server for all Workspace APIs. One command gives AI agents access to Gmail, Drive, Calendar, Docs, Sheets, and 10+ Google services.

MC
MCP Hub · Community
Quick Use

Use it first, then decide how deep to go

This block should tell both the user and the agent what to copy, install, and apply first.

# Install
npm install -g @googleworkspace/cli

# Auth setup (one-time)
gws auth setup
gws auth login

# Start MCP server for Claude Code
gws mcp -s drive,gmail,calendar
// claude_desktop_config.json
{
  "mcpServers": {
    "gws": {
      "command": "gws",
      "args": ["mcp", "-s", "drive,gmail,calendar"]
    }
  }
}

Now ask your AI agent:

"Search my Gmail for invoices from last week"
"Create a Google Doc summarizing today's meetings"
"Find all shared spreadsheets in the Marketing folder"

What is GWS?

GWS is Google's official CLI tool for all Google Workspace APIs. Built in Rust with a built-in MCP server mode, it dynamically reads Google's Discovery Service at runtime — meaning it automatically picks up new API endpoints when Google adds them. No SDK updates needed. 100+ pre-built agent skills, structured JSON output, and multi-auth support.

Answer-Ready: GWS is Google's official CLI for all Workspace APIs with built-in MCP server. Covers Gmail, Drive, Calendar, Docs, Sheets, Chat, and 10+ services. Dynamic API discovery, 100+ agent skills, Rust performance. 24k+ GitHub stars.

Best for: AI agents needing Google Workspace access. Works with: Claude Code, Claude Desktop, Codex CLI, Gemini CLI, Cursor. Setup time: Under 5 minutes.

Core Features

1. Dynamic API Surface

GWS reads Google's Discovery Service at runtime. When Google adds new APIs or endpoints, GWS picks them up automatically — zero manual updates.

2. Supported Services

Service Examples
Gmail Search, send, label, draft
Drive List, upload, download, share
Calendar Events, agenda, create, update
Docs Create, read, edit
Sheets Read, write, create
Chat Send messages, manage spaces
Admin User management, groups
Tasks Create, list, complete
Forms Create, read responses
Slides Create, edit presentations
People/Contacts Search, create contacts

3. Agent Skills (100+)

# Pre-built helper commands
gws gmail +send --to user@example.com --subject "Report" --body "See attached"
gws calendar +agenda --days 7
gws drive +search "quarterly report"

4. MCP Server Configuration

# Lightweight (~15-30 tools)
gws mcp -s drive,gmail

# Balanced (~30-60 tools)
gws mcp -s drive,gmail,calendar

# Comprehensive (~60-100 tools)
gws mcp -s drive,gmail,calendar,sheets,docs

# With helper shortcuts
gws mcp -s gmail,calendar -e

5. Multi-Auth

Method Use Case
OAuth Personal/user access
Service Account Server-to-server
Pre-obtained Token CI/CD pipelines

6. Security

  • Model Armor integration for prompt injection defense
  • Dry-run mode for testing
  • Scoped OAuth permissions

Installation Options

# npm (recommended)
npm install -g @googleworkspace/cli

# Homebrew
brew install googleworkspace-cli

# Cargo (from source)
cargo install --git https://github.com/googleworkspace/cli --locked

FAQ

Q: Is this an official Google product? A: Published by Google under the googleworkspace org. Note: labeled as not an officially supported Google product, but actively maintained by Google engineers.

Q: How many tools does the MCP server expose? A: Each service exposes 10-80 tools. Most MCP clients cap at 50-100 total, so keep the service list focused.

Q: Does it work with Gemini CLI? A: Yes, Gemini CLI has first-class support since both are Google products.

🙏

Source & Thanks

Created by Google Workspace. Licensed under Apache 2.0.

googleworkspace/cli — 24k+ stars

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets