# 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. ## Install Merge the JSON below into your `.mcp.json`: ## Quick Use ```bash # 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 ``` ```json // 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+) ```bash # 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 ```bash # 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 ```bash # 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](https://github.com/googleworkspace). Licensed under Apache 2.0. > > [googleworkspace/cli](https://github.com/googleworkspace/cli) — 24k+ stars ## Quick Start ```bash npm install -g @googleworkspace/cli gws auth setup && gws auth login gws mcp -s drive,gmail,calendar ``` One command gives AI agents access to the entire Google Workspace API. ## What is GWS? GWS is Google's official Workspace CLI with a built-in MCP server. Covers 10+ services including Gmail, Drive, Calendar, Docs, and Sheets — with dynamic API discovery and Rust-based performance. **In one sentence**: Google's official Workspace CLI + MCP server covering the full Gmail/Drive/Calendar/Docs/Sheets APIs — dynamic discovery with no updates needed, 100+ agent skills — 24k+ stars. **For**: AI agent users needing Google Workspace access. ## Core Features ### 1. Dynamic API Reads Google Discovery Service at runtime — new APIs are automatically available. ### 2. 10+ Services Gmail, Drive, Calendar, Docs, Sheets, Chat, Admin, and more. ### 3. 100+ Agent Skills Preset shortcut commands like `gws gmail +send` and `gws calendar +agenda`. ### 4. MCP Server Pick services on demand to control the tool count. ## FAQ **Q: Is it an official product?** A: Yes — published under the Google Workspace org and maintained by Google engineers. **Q: Any limits on tool count?** A: 10-80 tools per service — pick as needed. ## Source & Thanks > [googleworkspace/cli](https://github.com/googleworkspace/cli) — 24k+ stars, Apache 2.0 --- Source: https://tokrepo.com/en/workflows/google-workspace-mcp-gmail-drive-calendar-ai-557765e3 Author: MCP Hub