google-workspace-mcp-advanced
Production-ready MCP server for Google Workspace providing broad coverage across Gmail, Drive, Calendar, Docs, Sheets, and more, with safe-by-default write operations and markdown-to-Google-Docs support.
README
Google Workspace MCP Advanced
Production-ready MCP server for Google Workspace.
google-workspace-mcp-advanced gives MCP clients broad Google Workspace coverage with safe-by-default write operations, Markdown-to-Google-Docs support, and Drive sync workflows.
Why This Project
- 11 service domains: Gmail, Drive, Calendar, Docs, Sheets, Chat, Forms, Slides, Tasks, Search, Apps Script
- 100+ tools for read and write operations
- Dry-run defaults for mutating operations
- Strong Markdown rendering for Google Docs (kitchen-sink validated)
- Persistent OAuth sessions and resilient auth storage
Quick Start
1. Install uv
# macOS (Homebrew)
brew install uv
# Windows (winget)
winget install --id=astral-sh.uv -e
# Windows (PowerShell installer)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
# Linux/macOS (official installer)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Verify
uv --version
2. Run the MCP server from PyPI (recommended)
# Stable channel (latest release)
uvx google-workspace-mcp-advanced --transport stdio
# Pinned deterministic version (recommended for teams)
uvx google-workspace-mcp-advanced==1.0.10 --transport stdio
3. Add MCP client config
{
"mcpServers": {
"google-workspace": {
"command": "uvx",
"args": ["google-workspace-mcp-advanced==1.0.10", "--transport", "stdio"],
"env": {
"USER_GOOGLE_EMAIL": "your.email@company.com"
}
}
}
}
4. Use client-specific setup guides
5. Authenticate on first run
- Start the server from your MCP client.
- Run any Google tool (for example, list calendars or list Drive files).
- In
stdiomode (default), complete the device flow:- open the verification URL,
- enter the user code,
- retry your tool call.
- if device flow is unsupported for your OAuth client type, the server falls back to callback flow automatically.
- In
streamable-http, complete callback auth by opening the OAuth URL shown by the server.- for MCP-hosted/manual completion workflows, use
complete_google_authwith the browser callback URL.
- for MCP-hosted/manual completion workflows, use
- Credentials are saved in
~/.config/google-workspace-mcp-advanced/credentials/. - Legacy directory
~/.config/gws-mcp-advanced/is still supported for migration.
Single-MCP Multi-Client Mode
Use one MCP entry with multiple OAuth clients (for example private + enterprise tenants) via:
auth_clients.jsonunderWORKSPACE_MCP_CONFIG_DIR- deterministic routing by
script_clients,account_clients, anddomain_clients - setup tools:
setup_google_auth_clients,import_google_auth_client - completion tool:
complete_google_auth
Guide:
Local Development Mode
Use repository-local execution when building or testing unreleased changes.
{
"mcpServers": {
"google-workspace-dev": {
"command": "uv",
"args": [
"run",
"--project",
"/path/to/google-workspace-mcp-advanced",
"google-workspace-mcp-advanced",
"--transport",
"stdio"
],
"env": {
"USER_GOOGLE_EMAIL": "your.email@company.com"
}
}
}
}
Service Coverage
| Service | Example Capabilities |
|---|---|
| Gmail | search, read, draft, send, labels, filters |
| Drive | search, read, upload, permissions, ownership transfer |
| Calendar | list/create/modify/delete events |
| Docs | create/update docs, markdown insertion, table and image handling |
| Sheets | read/write ranges, formatting, conditional formatting |
| Chat | list spaces, read/send messages |
| Forms | create forms, read responses, update publish settings |
| Slides | create presentations, batch updates |
| Tasks | task lists and task lifecycle management |
| Search | programmable search endpoint support |
| Apps Script | project metadata/content, versions, deployments, processes, metrics, and safe-by-default mutators |
Safety Model
- Mutating tools default to
dry_run=True. - You must pass
dry_run=Falseto execute real changes. - This reduces accidental writes during assistant experimentation.
Common Runtime Commands
# Run locally from repo
uv run google-workspace-mcp-advanced --transport stdio
# HTTP transport
uv run google-workspace-mcp-advanced --transport streamable-http
# Single-user mode
uv run google-workspace-mcp-advanced --single-user
# Load specific service groups only
uv run google-workspace-mcp-advanced --tools gmail drive calendar
Required Environment Variables
| Variable | Required | Description |
|---|---|---|
USER_GOOGLE_EMAIL |
Yes | Target Google account email |
GOOGLE_OAUTH_CLIENT_ID |
Yes for legacy single-client mode | OAuth client ID |
GOOGLE_OAUTH_CLIENT_SECRET |
Yes for legacy single-client mode | OAuth client secret |
WORKSPACE_MCP_CONFIG_DIR |
No | Config/credential directory override |
WORKSPACE_MCP_AUTH_FLOW |
No | Auth interaction mode: auto (default), device, or callback |
Migration from Legacy Name
If you previously ran the project as gws-mcp-advanced, follow:
Documentation
- User docs: docs/INDEX.md
- Client setup hub: docs/setup/MCP_CLIENT_SETUP_GUIDE.md
- Migration guide: docs/setup/MIGRATING_FROM_GWS_MCP_ADVANCED.md
- Authentication model: docs/setup/AUTHENTICATION_MODEL.md
- Single-MCP multi-client auth setup: docs/setup/MULTI_CLIENT_AUTH_SETUP.md
- Apps Script setup and limitations: docs/setup/APPS_SCRIPT_SETUP.md
- Apps Script capabilities and workflows: docs/setup/APPS_SCRIPT_USER_GUIDE.md
- Apps Script + clasp workflows: docs/setup/APPS_SCRIPT_CLASP_GUIDE.md
- Claude Code setup: docs/setup/CLAUDE_CODE_MCP_SETUP.md
- Cursor setup: docs/setup/CURSOR_MCP_SETUP.md
- OpenCode setup: docs/setup/OPENCODE_MCP_SETUP.md
- Gemini CLI setup: docs/setup/GEMINI_CLI_MCP_SETUP.md
- Cadence workflow user guide: docs/setup/LIVE_CADENCE_WORKFLOW.md
- Distribution/release guide: docs/DISTRIBUTION_RELEASE.md
- Release notes: docs/RELEASE_NOTES.md
- Comparison with upstream: docs/COMPARISON.md
Contributor docs live in AGENTS.md and agent-docs/.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。