
Google Drive Comments Mcp
io.github.zayansalman由 GitHub 账号 zayansalman 发布v0.1.0更新于 Oct 24, 2026
Minimal MCP server for reading comments on Google Drive files (Docs, Sheets, Slides). Read-only.
概览
本地只读 MCP 服务器,让助手搜索 Google Drive 并读取文档、表格和幻灯片的评论串。
- 可以做什么
- 按文件名或 Drive 查询语法搜索文件,返回 ID、所有者与链接
- 通过链接或文件 ID 读取文档、表格、幻灯片的全部评论串
- 查看每条评论的作者、内容、锚定引文、已解决状态及回复
- 可只筛选未解决的评论,便于梳理待处理反馈
- 适用场景
- 需要获取 Google Drive 文档上的评审讨论(锚定引文、回复、解决记录)时使用,这些内容托管版 Drive 连接器只提供文件内容和搜索。适合让助手总结评审者对某份文档、表格或幻灯片的意见。
- 运行要求
- 需在本地安装 Python 包(pip 或 uv),以 stdio 进程运行。需要自建 Google Cloud OAuth 客户端:启用 Drive API、配置同意屏幕、创建桌面应用 OAuth 客户端 JSON,并完成一次浏览器授权。通过 DRIVE_MCP_CREDENTIALS、DRIVE_MCP_TOKEN、DRIVE_MCP_SCOPES 配置,刷新令牌缓存在本地。
安装
在 SourceWeft 中
- 打开 控制台中的 Google Drive Comments Mcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
google-drive-comments-mcp
A focused Model Context Protocol server (and standalone CLI) for reading comments on Google Drive files — Docs, Sheets, and Slides. Two tools, read-only OAuth scope, no extra surface area.
Built because the hosted Google Drive connectors expose file content and search, but not the comment threads — the review discussion, the anchored quotes, the resolve/reopen history. This server fills that gap for any MCP client (Claude Code, Claude Desktop, Cursor, Cline, etc.), and also works as a plain CLI.
Features
- 2 MCP tools —
drive_search_files,drive_get_comments. That's the whole API. - Reads full comment threads — author, content, the anchored quoted text, resolved/open status, and every reply (with resolve/reopen actions).
- Works across Docs, Sheets, and Slides — the Drive comments API is uniform across file types.
- Accepts URLs or IDs — paste a
docs.google.com/document/d/…link or a bare file ID. - Read-only OAuth scope (
drive.readonly). - Env-var-driven config —
DRIVE_MCP_CREDENTIALS,DRIVE_MCP_TOKEN,DRIVE_MCP_SCOPES.
Install
One-time setup (~10 minutes)
You need a Google Cloud OAuth client. The server runs entirely on your machine; nothing leaves it.
- Sign in to Google Cloud Console with the account whose Drive comments you want to read.
- Create a project (or pick an existing one).
- Enable the Drive API: console.cloud.google.com/apis/library/drive.googleapis.com.
- Configure the OAuth consent screen under APIs & Services → OAuth consent screen:
- Google Workspace users: User type = Internal. No app verification is needed even though
drive.readonlyis a restricted scope. - Personal Gmail users: User type = External, and add your own address under "Test users".
- Google Workspace users: User type = Internal. No app verification is needed even though
- APIs & Services → Credentials → + Create credentials → OAuth client ID
- Application type: Desktop app
- Download the JSON.
- Run setup:
A browser window opens for OAuth consent. The refresh token is cached at ~/.config/google-drive-comments-mcp/token.json.
Verify:
Use it from Claude Code
Then:
Read the open comments on this doc and summarize what reviewers are asking for: https://docs.google.com/document/d/…
Use it from Claude Desktop
~/Library/Application Support/Claude/claude_desktop_config.json (Mac):
(Use the absolute path from which google-drive-comments-mcp if it isn't on Claude Desktop's $PATH.)
Use it from the shell
The 2 MCP tools
drive_search_files(query, max_results=10)
Search Drive. Plain strings are auto-wrapped as a filename search; raw Drive query syntax passes through.
drive_get_comments(file, include_resolved=True)
Read all comments on a file. file accepts a Docs/Sheets/Slides/Drive URL or a bare file ID.
quoted_text is the document text the comment is anchored to — useful context for understanding what each comment refers to.
Configuration
Sharing one login with other Google MCP tools
If you also run a sibling tool (e.g. gmail-attachments-mcp) and want a single OAuth consent for both, point both tools at the same credential + token files (via the env vars above, or symlinks) and authorize once with the combined scopes:
A token granted a superset of scopes satisfies each tool's narrower request.
Security
- Read-only: the default scope is
drive.readonly. It cannot edit, comment, or delete — only read file metadata, content, and comments. - Scope breadth:
drive.readonlygrants read access to all your Drive files, not just the one you query. There is no per-file read scope that also exposes comments. Treat the cached token like a password (it's written0600). - No telemetry: your OAuth client lives in your own Google Cloud project. Nothing leaves your machine.
Troubleshooting
HttpError 403: Google Drive API has not been used in project … before or it is disabled
Enable the Drive API on the project that owns your OAuth client, then retry.
No valid Google token from Claude Desktop / cron
Run google-drive-comments-mcp setup once in a terminal where a browser can open. Subsequent runs reuse the cached token.
Comments come back empty on a file you know has comments
Confirm you authorized the account that can actually see the file, and that the file genuinely has comments (suggestions are not comments). Resolved comments are included unless you pass --open-only / include_resolved=false.
Authentication — bring your own Google OAuth client
There are no API keys and no shipped secrets. The server authenticates to your Google account with an OAuth client you create, and caches a refresh token locally. The author has zero access to your data.
- Why your own client? Google's restricted scopes (here,
drive.readonly) can't be redistributed in a shared app, and an unverified shared app is capped at 100 users. "Bring your own OAuth client" is the standard pattern for personal-data MCP servers. - What you need: a free Google Cloud project, the Drive API enabled, an OAuth consent screen, and a Desktop OAuth client. Full walkthrough → docs/setup-google-oauth.md.
- Where your token lives:
~/.config/google-drive-comments-mcp/token.json(mode0600). Delete it to revoke locally; revoke fully at myaccount.google.com/permissions. - No hosted/SaaS option — everything runs locally; your Drive data never touches a third-party server.
More guides
- docs/setup-google-oauth.md — full OAuth walkthrough + common errors
- docs/claude-code.md · docs/claude-desktop.md · docs/other-clients.md — per-client setup (Cursor, Cline, Continue, …)
- examples/ — runnable snippets
Related tools
Part of a small family of focused, local MCP servers for Google Workspace data the hosted connectors don't expose:
- gmail-attachments-mcp — download Gmail attachment bytes to disk
- google-drive-comments-mcp — read comment threads on Docs/Sheets/Slides (this repo)
- google-drive-files-mcp — move/organize Drive files
They can share one OAuth login or stay isolated — see each repo's setup.
License
MIT. See LICENSE.
来源:README.md,提交 5e81432
工具
0版本历史
1- v0.1.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
