Google just shipped a command-line tool that lets any AI agent read your Gmail, create calendar events, search Drive, and write to Sheets \u2014 with two lines of setup. No custom API code. No OAuth spaghetti. Just plug in and go.
The tool is called gws (Google Workspace CLI), released to GitHub on March 5, 2026. It's open-source, Apache-2.0 licensed, and installs in seconds:
npm install -g @googleworkspace/cliBuried in the README is the line that matters most: "One CLI for all of Google Workspace \u2014 built for humans and AI agents." That's not marketing. That's architecture.
What Actually Ships
The gws CLI wraps every Google Workspace API \u2014 Drive, Gmail, Calendar, Docs, Sheets, Chat, Admin \u2014 behind a single unified command surface. Every response is structured JSON. Every paginated list auto-scrolls. Every error is machine-readable.
But the real unlock is the built-in MCP server.
Run gws mcp -s drive,gmail,calendar and you get a live Model Context Protocol server over stdio. Any MCP-compatible client \u2014 Claude Desktop, Gemini CLI, VS Code \u2014 can now query your inbox, create events, or search Drive files through a standardized protocol call. No custom integration layer. No daemon to manage. No firewall exceptions to beg IT for.
The stdio transport is clever: because it talks over standard input/output, there's no port to expose, no persistent service to babysit. An agent starts the MCP server when it needs it, does its work, and closes the connection. Enterprise-friendly by default.
100+ Agent Skills, Prompt Injection Defense
The repository ships with over 100 pre-built Agent Skills \u2014 SKILL.md files covering common Workspace workflows. AI engineers can drop these directly into agent environments:
npx skills add github:googleworkspace/cliThere's also a Gemini CLI extension that lets the local Gemini agent inherit gws credentials natively:
gemini extensions install https://github.com/googleworkspace/cliThe security angle is worth noting. Feeding raw API data to an LLM is a prompt injection waiting to happen \u2014 a maliciously crafted email subject line could hijack your agent. gws addresses this with a --sanitize flag that pipes responses through Google Cloud Model Armor before they reach the model. It scans for injection payloads in Workspace data before the LLM ever sees it. Not perfect, but it's the right instinct baked in by default.
Why This Is a Bigger Deal Than It Looks
Google Workspace has 3 billion users. Until now, getting an AI agent to interact with Workspace meant either accepting the limitations of Gemini's built-in assistant or writing your own OAuth flows, pagination handlers, and JSON parsers \u2014 hundreds of lines of boilerplate per service.
gws eliminates that entirely. One install, one auth setup, and your agent has structured access to the world's most widely used productivity suite.
The dynamic API discovery architecture is particularly sharp: gws doesn't compile a static command list. It fetches Google's Discovery Documents at runtime, caches them for 24 hours, and builds its command tree dynamically. That means when Google adds a new Workspace API endpoint, gws supports it automatically. No CLI update required.
The project became one of the fastest-starred developer tools of the week after launch. That's not surprising. This is exactly the kind of infrastructure tool the agentic AI moment needs.
What Builders Should Do With This
If you're building AI agents that touch anything productivity-related, install gws today and test the MCP server integration. The setup path is:
- Install:
npm install -g @googleworkspace/cli - Auth:
gws auth setup(one-time OAuth flow) - Launch MCP server:
gws mcp -s drive,gmail,calendar - Point your MCP client (Claude Desktop, VS Code, etc.) at the stdio transport
For headless or CI/CD environments, export credentials with gws auth export and pass them via environment variable \u2014 no interactive browser required.
The bigger play: if you're building a product that sits inside someone's Google Workspace, you just got a free, Google-maintained integration layer. That's real infrastructure value, shipped quietly on a Thursday.
Watch this space. An official Google-backed MCP server for Workspace is the kind of thing that makes an entire category of agentic apps suddenly viable.
FOLLOW NeuralWire on X for daily AI signal — what matters, why it matters, what to do about it. →