Google Workspace CLI
21.4k stars
official open-source Has MCP Cross-platform macOS Beta
One CLI for all of Google Workspace. Read email, manage Drive files, schedule meetings, triage your inbox, and automate cross-service workflows — with a built-in MCP server for AI agents.
Google Workspace CLI has both a CLI and an MCP server. See when to use each
Part of the Google Workspace CLI tools for AI agents
What your agent can do
Every knowledge worker lives in Google Workspace. Gmail, Drive, Calendar, Docs, Sheets — it's the operating system for how companies actually run. But the web interface assumes a human sitting in a browser, clicking through tabs one operation at a time. Your AI agent doesn't have tabs. It has a terminal.Google Workspace CLI gives your agent direct access to every Workspace API through a single binary. Read unread emails, search Drive for last quarter's revenue spreadsheet, check tomorrow's calendar for conflicts, send a follow-up to a client — all from structured CLI commands that return clean JSON. No browser automation, no fragile scraping, no custom API wrappers.The architecture is what makes this tool special. GWS CLI dynamically pulls endpoint definitions from Google's Discovery Service at runtime. When Google ships a new API or updates an existing one, the CLI picks it up automatically. Your agent doesn't wait for CLI updates — it gets new capabilities the moment Google releases them.Helper commands prefixed with `+` handle common workflows that would otherwise require chaining multiple API calls. `+send` composes and sends email. `+triage` classifies your inbox. `+agenda` shows your day. `+standup-report` generates a summary of yesterday's activity across services. These are the operations your agent runs every morning before you've finished coffee.The built-in MCP server is the agent integration story. Run `gws mcp` and any MCP-compatible client — Claude Desktop, Gemini CLI, VS Code — connects directly to your Google Workspace through the standard Model Context Protocol. No custom integration code. Google even built a `--sanitize` flag that integrates with Cloud Model Armor to scan responses for prompt injection before they reach your agent.GWS CLI ships with 40+ pre-built agent skills and 50+ curated recipes for Gmail, Drive, Calendar, Docs, and Sheets workflows. These aren't toy examples — they're production patterns for inbox triage, document organization, meeting scheduling, and cross-service automation that your agent can execute immediately.
Limitations
Pre-1.0 software (v0.17.0) with breaking changes expected between releases — pin your version in production. Requires OAuth2 setup through a Google Cloud Project, which adds friction compared to simpler API-key tools. Some admin-level operations (user provisioning, domain management) need Workspace admin privileges. Multi-account support is still evolving. All output is JSON, which is great for agents but less readable for quick human checks.
Key Commands
gws gmail messages list List Gmail messages with query filters and label selectors
gws drive files list List and search Google Drive files across your organization
gws calendar events list View upcoming calendar events with time range filters
gws +send Helper command: compose and send an email from the terminal
gws +triage Helper command: triage your inbox with AI-assisted classification
gws mcp Start an MCP server over stdio for AI agent integration
GitHub Stats
repo googleworkspace/cli
stars 21.4k
language Rust
license Apache-2.0
last commit Mar 17, 2026
Alternatives
| tool | description |
|---|---|
| Google Workspace CLI | current tool |
| Google Cloud CLI (gcloud) | Google's CLI for cloud infrastructure (Compute Engine, Cloud Storage, BigQuery, Kubernetes). Manages cloud resources, not Workspace apps like Gmail or Drive. |
| GAM | Open-source Google Workspace admin tool focused on user and group management. Mature but narrower scope than GWS CLI, and no MCP server support. |
FAQ
- Is Google Workspace CLI free?
- Yes. GWS CLI is free and open-source under the Apache 2.0 license. It works with any Google Workspace account, including free Gmail accounts for personal use and paid Workspace subscriptions for business. The CLI itself costs nothing — you're accessing Google's existing APIs, which have generous free quotas. Gmail API provides 250 quota units per user per second, Drive API offers 20,000 queries per 100 seconds. For most agent workflows, you'll never hit these limits.
- Can AI agents use Google Workspace CLI?
- Yes, and it's purpose-built for this. GWS CLI includes a built-in MCP server — run `gws mcp` and any MCP-compatible AI client (Claude Desktop, Gemini CLI, VS Code) can directly operate your Google Workspace. The CLI ships with 40+ pre-built agent skills and 50+ recipes for common workflows like inbox triage, document search, and calendar management. All commands output structured JSON that agents parse natively. Google also integrated Cloud Model Armor via the `--sanitize` flag to protect against prompt injection in agent pipelines.
- What's the difference between GWS CLI and gcloud?
- Different tools for different Google products. `gcloud` is the Google Cloud CLI — it manages cloud infrastructure like Compute Engine, Cloud Storage, BigQuery, and Kubernetes. GWS CLI manages Google Workspace — Gmail, Drive, Calendar, Docs, Sheets, Chat. Think of it this way: gcloud is for your servers, GWS CLI is for your email and documents. They authenticate differently too: gcloud uses service accounts and project-scoped credentials, while GWS CLI uses OAuth2 with user-scoped Workspace permissions.
- Does Google Workspace CLI have MCP support?
- Yes, native and built-in. Run `gws mcp` to start an MCP server over stdio that exposes all Google Workspace APIs through the Model Context Protocol standard. Any MCP-compatible client connects directly — no proxy servers, no custom integration code. Google announced official MCP support across their services in March 2026, and GWS CLI was the first tool to ship with it built in. The MCP server supports the same authentication and permissions as the CLI itself.
Related tools in Business SaaS
Jira CLI open-source
brew install ankitpokhrel/jira-cli/jira-cli
category Business SaaS
Feature-rich interactive Jira command line. Create, search, and transition issues, manage sprints and epics, all without leaving the terminal.
5.3k
Shopify CLI official
brew tap shopify/shopify && brew install shopify-cli
category Business SaaS
Shopify's official command-line interface. Initialize, build, dev, and deploy Shopify apps, extensions, themes, and Hydrogen storefronts from your terminal.
622
Linear CLI open-source
brew install schpet/tap/linear
category Business SaaS
Manage Linear issues, branches, and PRs from the terminal. Git and jj aware, agent friendly, with built-in skills for AI coding workflows.
455
Box CLI official
Download .pkg installer from github.com/box/boxcli/releases
category Business SaaS
Box's official command-line tool. Upload, download, search, and manage enterprise content with bulk CSV operations, encrypted credential storage, and full API coverage from the terminal.
258
Last verified: Mar 18, 2026