# 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 ## 快速使用 ```bash npm install -g @googleworkspace/cli gws auth setup && gws auth login gws mcp -s drive,gmail,calendar ``` 一条命令让 AI Agent 访问全部 Google Workspace API。 ## 什么是 GWS? GWS 是 Google 官方的 Workspace CLI 工具,内置 MCP 服务器。覆盖 Gmail、Drive、Calendar、Docs、Sheets 等 10+ 服务,动态 API 发现,Rust 高性能。 **一句话总结**:Google 官方 Workspace CLI + MCP 服务器,覆盖 Gmail/Drive/Calendar/Docs/Sheets 等全部 API,动态发现免更新,100+ Agent 技能,24k+ stars。 **适合人群**:需要 Google Workspace 访问的 AI Agent 用户。 ## 核心功能 ### 1. 动态 API 运行时读取 Google Discovery Service,新 API 自动可用。 ### 2. 10+ 服务 Gmail、Drive、Calendar、Docs、Sheets、Chat、Admin 等。 ### 3. 100+ Agent 技能 预置快捷命令,如 `gws gmail +send`、`gws calendar +agenda`。 ### 4. MCP 服务器 按需选择服务,控制工具数量。 ## 常见问题 **Q: 官方产品?** A: Google Workspace org 发布,Google 工程师维护。 **Q: 工具数量限制?** A: 每服务 10-80 个工具,建议按需选择。 ## 来源与致谢 > [googleworkspace/cli](https://github.com/googleworkspace/cli) — 24k+ stars, Apache 2.0 --- Source: https://tokrepo.com/en/workflows/557765e3-1497-4f9d-ad89-23f9460c6d75 Author: MCP Hub