MCP Configs2026年4月8日·1 分钟阅读

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.

Agent 就绪

这个资产会安全暂存

这个资产会先安全暂存。复制的指令会要求 Agent 读取暂存文件,并在激活脚本、MCP 配置或全局配置前先确认。

Stage only · 17/100策略:需暂存
Agent 入口
任意 MCP/CLI Agent
类型
Mcp Config
安装
Stage only
信任
信任等级:Established
入口
Google Workspace MCP — Gmail Drive Calendar for AI
安全暂存命令
npx -y tokrepo@latest install 557765e3-1497-4f9d-ad89-23f9460c6d75 --target codex

先暂存文件;激活前需要读取暂存 README 和安装计划。

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.

常见问题

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.

引用来源 (3)
🙏

来源与感谢

googleworkspace/cli — 24k+ stars, Apache 2.0

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产