{
  "markdown": "# google-drive-comments-mcp\n\n<!-- mcp-name: io.github.zayansalman/google-drive-comments-mcp -->\n\nA focused [Model Context Protocol](https://modelcontextprotocol.io) 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.\n\nBuilt 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.\n\n## Features\n\n- **2 MCP tools** — `drive_search_files`, `drive_get_comments`. That's the whole API.\n- **Reads full comment threads** — author, content, the **anchored quoted text**, resolved/open status, and every reply (with resolve/reopen actions).\n- **Works across Docs, Sheets, and Slides** — the Drive comments API is uniform across file types.\n- **Accepts URLs or IDs** — paste a `docs.google.com/document/d/…` link or a bare file ID.\n- **Read-only OAuth scope** (`drive.readonly`).\n- **Env-var-driven config** — `DRIVE_MCP_CREDENTIALS`, `DRIVE_MCP_TOKEN`, `DRIVE_MCP_SCOPES`.\n\n## Install\n\n```bash\npip install google-drive-comments-mcp\n# or, with uv:\nuv tool install google-drive-comments-mcp\n```\n\n## One-time setup (~10 minutes)\n\nYou need a Google Cloud OAuth client. The server runs entirely on your machine; nothing leaves it.\n\n1. Sign in to [Google Cloud Console](https://console.cloud.google.com/) with the account whose Drive comments you want to read.\n2. Create a project (or pick an existing one).\n3. Enable the Drive API: [console.cloud.google.com/apis/library/drive.googleapis.com](https://console.cloud.google.com/apis/library/drive.googleapis.com).\n4. Configure the OAuth consent screen under **APIs & Services → OAuth consent screen**:\n   - **Google Workspace** users: User type = **Internal**. No app verification is needed even though `drive.readonly` is a restricted scope.\n   - **Personal Gmail** users: User type = **External**, and add your own address under \"Test users\".\n5. **APIs & Services → Credentials → + Create credentials → OAuth client ID**\n   - Application type: **Desktop app**\n   - Download the JSON.\n6. Run setup:\n\n```bash\ngoogle-drive-comments-mcp setup --import-credentials ~/Downloads/client_secret_*.json\n```\n\nA browser window opens for OAuth consent. The refresh token is cached at `~/.config/google-drive-comments-mcp/token.json`.\n\nVerify:\n```bash\ngoogle-drive-comments-mcp status\ngoogle-drive-comments-mcp comments \"https://docs.google.com/document/d/YOUR_DOC_ID/edit\"\n```\n\n## Use it from Claude Code\n\n```bash\nclaude mcp add --scope user google-drive-comments google-drive-comments-mcp -- serve\n```\n\nThen:\n> Read the open comments on this doc and summarize what reviewers are asking for: https://docs.google.com/document/d/…\n\n## Use it from Claude Desktop\n\n`~/Library/Application Support/Claude/claude_desktop_config.json` (Mac):\n\n```json\n{\n  \"mcpServers\": {\n    \"google-drive-comments\": {\n      \"command\": \"google-drive-comments-mcp\",\n      \"args\": [\"serve\"]\n    }\n  }\n}\n```\n\n(Use the absolute path from `which google-drive-comments-mcp` if it isn't on Claude Desktop's `$PATH`.)\n\n## Use it from the shell\n\n```bash\n# Find a doc\ngoogle-drive-comments-mcp search \"Q3 strategy\"\n\n# Read all comments (open + resolved) on a doc by URL or ID\ngoogle-drive-comments-mcp comments \"https://docs.google.com/document/d/abc123/edit\"\n\n# Only unresolved comments\ngoogle-drive-comments-mcp comments abc123 --open-only\n```\n\n## The 2 MCP tools\n\n### `drive_search_files(query, max_results=10)`\nSearch Drive. Plain strings are auto-wrapped as a filename search; raw Drive query syntax passes through.\n\n```json\n[\n  {\n    \"id\": \"1AbC…\",\n    \"name\": \"Q3 Strategy\",\n    \"mime_type\": \"application/vnd.google-apps.document\",\n    \"modified\": \"2026-04-20T09:00:00.000Z\",\n    \"owners\": [\"Jane Doe\"],\n    \"web_view_link\": \"https://docs.google.com/document/d/1AbC…/edit\"\n  }\n]\n```\n\n### `drive_get_comments(file, include_resolved=True)`\nRead all comments on a file. `file` accepts a Docs/Sheets/Slides/Drive URL **or** a bare file ID.\n\n```json\n{\n  \"file\": { \"id\": \"1AbC…\", \"name\": \"Q3 Strategy\", \"mime_type\": \"…document\", \"web_view_link\": \"…\", \"owners\": [\"Jane Doe\"] },\n  \"open_count\": 2,\n  \"resolved_count\": 1,\n  \"comments\": [\n    {\n      \"id\": \"AAAA…\",\n      \"author\": \"Jane Doe\",\n      \"content\": \"Can we add the unit-economics table here?\",\n      \"quoted_text\": \"Our margins improved in Q3.\",\n      \"resolved\": false,\n      \"created\": \"2026-04-21T10:00:00Z\",\n      \"modified\": \"2026-04-21T10:00:00Z\",\n      \"replies\": [\n        { \"author\": \"John Smith\", \"content\": \"Added.\", \"action\": \"\", \"created\": \"2026-04-21T11:00:00Z\" }\n      ]\n    }\n  ]\n}\n```\n\n`quoted_text` is the document text the comment is anchored to — useful context for understanding what each comment refers to.\n\n## Configuration\n\n| Variable | Default | What |\n|---|---|---|\n| `DRIVE_MCP_CREDENTIALS` | `~/.config/google-drive-comments-mcp/credentials.json` | OAuth client secret JSON |\n| `DRIVE_MCP_TOKEN` | `~/.config/google-drive-comments-mcp/token.json` | Cached refresh token |\n| `DRIVE_MCP_SCOPES` | `https://www.googleapis.com/auth/drive.readonly` | OAuth scopes (comma-separated) |\n| `XDG_CONFIG_HOME` | `~/.config` | Standard XDG override |\n\n### Sharing one login with other Google MCP tools\n\nIf you also run a sibling tool (e.g. [`gmail-attachments-mcp`](https://github.com/zayansalman/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:\n\n```bash\nDRIVE_MCP_SCOPES=\"https://www.googleapis.com/auth/gmail.readonly,https://www.googleapis.com/auth/drive.readonly\" \\\n  google-drive-comments-mcp setup --reauth\n```\n\nA token granted a superset of scopes satisfies each tool's narrower request.\n\n## Security\n\n- **Read-only**: the default scope is `drive.readonly`. It cannot edit, comment, or delete — only read file metadata, content, and comments.\n- **Scope breadth**: `drive.readonly` grants 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 written `0600`).\n- **No telemetry**: your OAuth client lives in your own Google Cloud project. Nothing leaves your machine.\n\n## Troubleshooting\n\n**`HttpError 403: Google Drive API has not been used in project … before or it is disabled`**\nEnable the Drive API on the project that owns your OAuth client, then retry.\n\n**`No valid Google token` from Claude Desktop / cron**\nRun `google-drive-comments-mcp setup` once in a terminal where a browser can open. Subsequent runs reuse the cached token.\n\n**Comments come back empty on a file you know has comments**\nConfirm 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`.\n\n## Authentication — bring your own Google OAuth client\n\nThere 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.\n\n- **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.\n- **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](docs/setup-google-oauth.md).\n- **Where your token lives:** `~/.config/google-drive-comments-mcp/token.json` (mode `0600`). Delete it to revoke locally; revoke fully at [myaccount.google.com/permissions](https://myaccount.google.com/permissions).\n- **No hosted/SaaS option** — everything runs locally; your Drive data never touches a third-party server.\n\n## More guides\n\n- [docs/setup-google-oauth.md](docs/setup-google-oauth.md) — full OAuth walkthrough + common errors\n- [docs/claude-code.md](docs/claude-code.md) · [docs/claude-desktop.md](docs/claude-desktop.md) · [docs/other-clients.md](docs/other-clients.md) — per-client setup (Cursor, Cline, Continue, …)\n- [examples/](examples/) — runnable snippets\n\n## Related tools\n\nPart of a small family of focused, local MCP servers for Google Workspace data the hosted connectors don't expose:\n\n- **[gmail-attachments-mcp](https://github.com/zayansalman/gmail-attachments-mcp)** — download Gmail attachment bytes to disk\n- **google-drive-comments-mcp** — read comment threads on Docs/Sheets/Slides *(this repo)*\n- **[google-drive-files-mcp](https://github.com/zayansalman/google-drive-files-mcp)** — move/organize Drive files\n\nThey can share one OAuth login or stay isolated — see each repo's setup.\n\n## License\n\nMIT. See [LICENSE](LICENSE).\n",
  "bytes": 9132,
  "sha": "9e4d9c3e8fa7574272fbb92cbc07f80fd832b642de10c2c815e70ce5386f76b9",
  "repo_slug": "zayansalman/google-drive-comments-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_zayansalman_google_drive_comme_00aa7bcc/readme"
}