MCP ConfigsApr 8, 2026·3 min read

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.

TL;DR
Google Workspace MCP gives AI agents access to Gmail, Drive, Calendar, Docs, Sheets, and other Google services through a single CLI-based MCP server.
§01

What it is

Google Workspace MCP is an official CLI tool with a built-in MCP (Model Context Protocol) server for Google Workspace APIs. One command starts a server that exposes Gmail, Google Drive, Calendar, Docs, Sheets, and over 10 other Google services to AI agents like Claude Code. The tool handles OAuth authentication and API access in a unified interface.

This MCP server targets developers and teams who want AI agents to read, search, and interact with their Google Workspace data. Instead of building custom API integrations, you configure the MCP server once and your agent gets structured access to all supported services.

§02

How it saves time or tokens

Without this tool, connecting an AI agent to Google Workspace requires building OAuth flows, managing API credentials for each service, and writing custom tool definitions. Google Workspace MCP handles all of this with a single gws mcp command. You specify which services to expose, and the MCP server presents them as structured tools that agents can call directly.

§03

How to use

  1. Install the CLI globally: npm install -g @googleworkspace/cli.
  2. Set up authentication with gws auth setup followed by gws auth login for one-time OAuth consent.
  3. Start the MCP server with gws mcp -s drive,gmail,calendar to expose selected services.
§04

Example

# Install the CLI
npm install -g @googleworkspace/cli

# One-time auth setup
gws auth setup
gws auth login

# Start MCP server with selected services
gws mcp -s drive,gmail,calendar
{
  "mcpServers": {
    "gws": {
      "command": "gws",
      "args": ["mcp", "-s", "drive,gmail,calendar"]
    }
  }
}
§05

Related on TokRepo

§06

Common pitfalls

  • OAuth scopes are broad by default. Limit the services you expose with the -s flag to only what your workflow needs. Avoid granting Gmail access if you only need Drive.
  • The MCP server runs locally and requires an active OAuth session. Tokens expire and may need re-authentication periodically.
  • Some Google Workspace APIs have rate limits. Heavy automation against Gmail or Drive may trigger quota errors. Check Google API console for your usage limits.

Frequently Asked Questions

Which Google services does this MCP server support?+

The server supports Gmail, Google Drive, Calendar, Docs, Sheets, Slides, Forms, Tasks, Keep, Contacts, and Admin. You select which services to expose using the -s flag when starting the server.

How does authentication work?+

The CLI uses OAuth 2.0 with Google. You run gws auth setup once to configure credentials, then gws auth login to complete the OAuth consent flow in your browser. Tokens are stored locally and refreshed automatically.

Can I use this with Claude Desktop?+

Yes. Add the MCP server configuration to your claude_desktop_config.json file with the gws command and desired service arguments. Claude Desktop will start the MCP server automatically.

Is this an official Google product?+

The @googleworkspace/cli package is the official Google CLI for Workspace APIs. The built-in MCP server capability exposes these APIs through the Model Context Protocol standard.

What permissions does the AI agent get?+

The agent gets the permissions you grant during OAuth consent, scoped to the services specified with -s. You can limit access to read-only for specific services. Review and revoke access at any time in your Google Account security settings.

Citations (3)
🙏

Source & Thanks

Created by Google Workspace. Licensed under Apache 2.0.

googleworkspace/cli — 24k+ stars

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.