Google quietly shipped something significant this week: an open-source CLI called gws that gives AI agents structured, programmatic access to all of Google Workspace — Gmail, Drive, Calendar, Sheets, Docs, Chat, and every other Workspace API. It hit the top of Hacker News on March 6 and for good reason.

The kicker: it includes a built-in MCP server mode (gws mcp) that exposes Google Workspace as structured tools for AI clients. That means OpenClaw agents, Claude Desktop, Gemini CLI, and any MCP-compatible system can manage your entire Google Workspace through a single interface.

What gws Actually Does

Unlike traditional Google API wrappers, gws doesn’t ship a static list of commands. It reads Google’s own Discovery Service at runtime and dynamically builds its entire command surface. When Google adds a new API endpoint, gws picks it up automatically — no tool update required.

npm install -g @googleworkspace/cli

# List recent files
gws drive files list --params '{"pageSize": 10}'

# Create a spreadsheet
gws sheets spreadsheets create --json '{"properties": {"title": "Q1 Budget"}}'

# Search Gmail
gws gmail search "from:boss subject:urgent"

# Send a Chat message
gws chat spaces messages create \
  --params '{"parent": "spaces/xyz"}' \
  --json '{"text": "Deploy complete."}'

Every response is structured JSON. There’s --dry-run for previewing requests, auto-pagination for large result sets, and schema introspection (gws schema drive.files.list) so agents can discover exactly what’s available.

The MCP Server Mode

This is where it gets interesting for OpenClaw users. Running gws mcp starts an MCP server that exposes Google Workspace operations as structured tools:

# Expose specific services
gws mcp -s drive,gmail,calendar

# Or everything
gws mcp

Any MCP-compatible client can then discover and invoke Workspace operations. For OpenClaw, this means your agent can:

  • Read and send emails without fragile IMAP/SMTP setups
  • Manage calendar events with full Create/Read/Update/Delete
  • Work with spreadsheets — pull as local TSV, edit, push back (git-like workflow)
  • Search and organize Drive files programmatically
  • Send messages in Google Chat spaces

All through a single, well-maintained, officially-hosted-on-Google’s-GitHub tool.

100+ Agent Skills Included

The repo ships over 100 Agent Skills (SKILL.md files) — one for every supported API, plus 50+ curated recipes for common workflows. You can install them individually or all at once:

# Install all skills
npx skills add https://github.com/googleworkspace/cli

# Or pick specific ones
npx skills add https://github.com/googleworkspace/cli/tree/main/skills/gws-drive
npx skills add https://github.com/googleworkspace/cli/tree/main/skills/gws-gmail

The skills follow the same SKILL.md pattern that OpenClaw and other agent frameworks use, making integration straightforward.

Why This Matters

Google Workspace integration has been one of the most requested capabilities for AI agents, and until now the options were limited:

  1. IMAP/SMTP for email — works but fragile, no calendar/drive/sheets access
  2. Google Apps Script — powerful but requires separate deployment and auth
  3. Raw REST API calls — verbose, error-prone, and hard for agents to discover
  4. Third-party wrappers — varying quality, often outdated

gws solves the fundamental problem: it provides a single, authenticated, auto-updating interface to all of Google Workspace, with structured output designed for AI consumption. The MCP server mode means agents don’t need custom code to use it.

Setting It Up with OpenClaw

Here’s the practical setup for OpenClaw users:

1. Install and authenticate:

npm install -g @googleworkspace/cli
gws auth setup    # Creates Cloud project, enables APIs
gws auth login -s drive,gmail,calendar,sheets

2. Start the MCP server:

gws mcp -s drive,gmail,calendar,sheets

3. Configure OpenClaw to use it — add the MCP server to your agent’s tool configuration.

Security notes:

  • Credentials are encrypted at rest (AES-256-GCM) with the key in your OS keyring
  • Supports service accounts for headless/server deployments
  • OAuth scopes are selectable — only expose what your agent needs
  • Has --dry-run mode for testing without side effects

The Caveats

A few things to keep in mind:

  • “Not an officially supported Google product” — it’s built by Google employees (including Justin Poehnelt) and hosted under the googleworkspace GitHub org, but it carries the standard disclaimer. Treat it as high-quality open source, not a guaranteed-stable API.
  • Under active development — they warn of breaking changes before v1.0
  • OAuth scope limits — if your app is in testing mode (unverified), Google caps you at ~25 scopes. Use -s to select specific services rather than requesting everything.
  • PRs temporarily closed to non-collaborators

The Bigger Picture

This release fits a pattern we’ve been tracking: the infrastructure for AI agents to operate in the real world is maturing fast. In the last week alone:

  • OpenAI shipped GPT-5.4 with native computer use (see our coverage)
  • Google released gws with MCP server mode
  • Anthropic continues expanding Claude’s enterprise capabilities

For OpenClaw users, these developments compound. A single OpenClaw agent can now route to GPT-5.4 for computer automation, use gws via MCP for Google Workspace operations, and coordinate with Claude for conversational tasks — all from the same configuration.

The agents aren’t getting smarter in isolation. The tools they can reach are expanding just as fast. To get started with skills and tools, see our top 10 skills for beginners or learn to build your own custom skill.


The gws CLI is available now via npm install -g @googleworkspace/cli. Source code at github.com/googleworkspace/cli. Rust binary builds also available via GitHub Releases and Nix.