google-workspace-mcp
google-workspace-mcp
处理 Google Workspace(Sheets / Docs / Slides / Forms)与 Google Drive 的 MCP 服务器。
Cowork 默认连接官方 "Google Drive" 连接器仅支持搜索、读取、创建文件、移入回收站, 无法修改已有文件的内容。因此,即使只想在表格中新增一行,也只能把全部数据重新做成新文件、丢弃原文件。本服务器填补了这一空白——在保持文件 ID 不变的前提下,向表格追加行、修改文档正文、添加幻灯片。
提供的工具
工具 | 功能 |
| 单元格值 read / append(追加行) / update / clear |
| 创建电子表格,添加、删除、重命名标签页,查询元数据,batchUpdate |
| 以文本(含表格)或原始结构读取文档 |
| 创建文档、末尾追加、指定位置插入、查找替换、batchUpdate |
| 按幻灯片查询文本、演讲者备注 |
| 创建演示文稿、添加幻灯片(填充标题、正文)、删除、查找替换 |
| 创建、查询问卷,查询响应列表、单条响应,batchUpdate |
| 按文件名、全文搜索、MIME、文件夹条件搜索 |
| 元数据、创建、创建文件夹、替换内容(保持 ID)、重命名、移动、复制、移入回收站、彻底删除、下载、export |
| 查询、撰写评论,回复、解决、删除 |
| 查询版本历史、取回历史版本内容、固定保留 |
| 检查、添加、修改、解除共享权限 |
| 共享云端硬盘列表、详情 |
| 获取起始令牌后仅查询其后的变更 |
所有工具均可通过 max_chars 调节响应长度上限,设为 0 则不截断。
Related MCP server: Google Docs, Drive & Sheets MCP Server
环境变量
名称 | 说明 |
| OAuth 客户端 ID |
| OAuth 客户端密钥 |
| 包含 |
| 访问门禁允许的密钥列表(逗号分隔)。为空则禁用门禁 |
| 设为 |
仅凭 drive 一个作用域即可覆盖 Sheets、Docs、Slides、Forms API 与 Drive API 的全部功能
(各 API 官方认证作用域列表中均包含 auth/drive)。
准备 Google Cloud 项目
与作用域无关,你需要在项目中**启用(Enable)**要使用的 API。
若不启用,会报 403 has not been used in project ... or it is disabled。
Google Sheets API / Google Docs API / Google Slides API / Google Forms API
Google Drive API
调用
https://<배포도메인>/api/mcp?k=<게이트키>本地冒烟测试
将上述 3 个 Google 凭据填入 scripts/.env.local.json(已被 gitignore)后:
npm install
npm test会在真实 Google 账户中创建测试文件,最后统一移入回收站清理。
This server cannot be deployed
Maintenance
Related MCP Connectors
Permissioned access to Gmail, Drive and Calendar via the user's own Google account
Multiple Gmail accounts, editable Google Sheets & Docs for AI agents. Deny-by-default access rules.
Docs, decks, forms, apps you build and deploy, automations, and AI images, video and voice.
Edworking tasks, Docs, workspace search, conversations and files with scoped OAuth access.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables comprehensive interaction with Google Docs and Google Drive through AI assistants, supporting document reading/writing, rich formatting, table/image insertion, comment management, and complete file/folder operations with secure OAuth authentication.4 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables deep integration with Google Workspace for AI assistants, allowing for document creation, spreadsheet manipulation, and file management. It supports advanced features like template processing, comment thread management, and cell formatting.89 npmMIT
- FlicenseNot gradedqualityDmaintenanceProvides AI assistants with access to Google Workspace APIs including Sheets, Calendar, Gmail, Tasks, Drive, and Docs. Enables full CRUD operations and management of Google services through natural language.1-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to create, read, and modify Google Slides, Sheets, Docs, and Drive documents programmatically. Supports file management, content editing, and version history retrieval.1,922 npmMIT