MCP fork of Google Workspace CLI (Gmail, Drive, Calendar, and more)
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
One CLI for all of Google Workspace β built for humans and AI agents.
Drive, Gmail, Calendar, and every Workspace API. Zero boilerplate. Structured JSON output. 40+ agent skills included.
[!NOTE] This is not an officially supported Google product.
β¬οΈ Download the latest release for your OS
gws doesn't ship a static list of commands. It reads Google's own Discovery Service at runtime and builds its entire command surface dynamically. When Google Workspace adds an API endpoint or method, gws picks it up automatically.
[!IMPORTANT] This project is under active development. Expect breaking changes as we march toward v1.0.
npm install (or download a pre-built binary from GitHub Releases)gcloud CLI or with the gws auth setup command.The recommended way to install gws is to download the pre-built binary for your OS and architecture from the GitHub Releases page. Extract the archive and place the gws binary in your $PATH.
For convenience, you can also use npm to automate downloading the appropriate binary from GitHub Releases:
Or build from source:
A Nix flake is also available at github:googleworkspace/cli
On macOS and Linux, you can also install via Homebrew:
For humans β stop writing curl calls against REST docs. gws gives you --help on every resource, --dry-run to preview requests, and autoβpagination.
For AI agents β every response is structured JSON. Pair it with the included agent skills and your LLM can manage Workspace without custom tooling.
The CLI supports multiple auth workflows so it works on your laptop, in CI, and on a server.
| I have⦠| Use |
|---|---|
gcloud installed and authenticated | gws auth setup (fastest) |
A GCP project but no gcloud | Manual OAuth setup |
| An existing OAuth access token | GOOGLE_WORKSPACE_CLI_TOKEN |
| Existing Credentials | GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE |
Credentials are encrypted at rest (AES-256-GCM) with the key stored in your OS keyring (or ~/.config/gws/.encryption_key when GOOGLE_WORKSPACE_CLI_KEYRING_BACKEND=file).
gws auth setuprequires thegcloudCLI. If you don't havegcloud, use the manual setup below instead.
[!WARNING] Scope limits in testing mode: If your OAuth app is unverified (testing mode), Google limits consent to ~25 scopes. The
recommendedscope preset includes 85+ scopes and will fail for unverified apps (especially for@gmail.comaccounts). Choose individual services instead to filter the scope picker:
Use this when gws auth setup cannot automate project/client creation, or when you want explicit control.
https://console.cloud.google.com/apis/credentials/consent?project=<PROJECT_ID>https://console.cloud.google.com/apis/credentials?project=<PROJECT_ID>~/.config/gws/client_secret.json[!IMPORTANT] You must add yourself as a test user. In the OAuth consent screen, click Test users β Add users and enter your Google account email. Without this, login will fail with a generic "Access blocked" error.
Then run:
You can complete OAuth either manually or with browser automation.
gws auth login, open the printed URL, approve scopes.If consent shows "Google hasn't verified this app" (testing mode), click Continue. If scope checkboxes appear, select required scopes (or Select all) before continuing.
Point to your key file; no login needed.
Useful when another tool (e.g. gcloud) already mints tokens for your environment.
| Priority | Source | Set via |
|---|---|---|
| 1 | Access token | GOOGLE_WORKSPACE_CLI_TOKEN |
| 2 | Credentials file | GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE |
| 3 | Encrypted credentials | gws auth login |
| 4 | Plaintext credentials | ~/.config/gws/credentials.json |
Environment variables can also live in a .env file.
The repo ships 100+ Agent Skills (SKILL.md files) β one for every supported API, plus higher-level helpers for common workflows and 50 curated recipes for Gmail, Drive, Docs, Calendar, and Sheets. See the full Skills Index for the complete list.
The gws-shared skill includes an install block so OpenClaw auto-installs the CLI via npm if gws isn't on PATH.
Authenticate the CLI first:
Install the extension into the Gemini CLI:
Installing this extension gives your Gemini CLI agent direct access to all gws commands and Google Workspace agent skills. Because gws handles its own authentication securely, you simply need to authenticate your terminal once prior to using the agent, and the extension will automatically inherit your credentials.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/mcp-fork-of-google-workspace-cli)<a href="https://allmcps.com/mcp/mcp-fork-of-google-workspace-cli"><img src="https://allmcps.com/api/badge/mcp-fork-of-google-workspace-cli?style=directory" alt="MCP fork of Google Workspace CLI on AllMCPs" /></a>