google-docs-mcp
A read-only MCP server for Google Docs. It lets an assistant inspect a document's comments and text without ever changing anything.
List comments in full detail — author, dates, open/resolved status, quoted text, every reply (including who resolved or reopened it) and optionally the surrounding paragraph; filter by status, include deleted items, paginate, and pick
markdownorjsonoutput.Summarize comments — counts by status, participants and their activity, open comments with no replies, open comments waiting on the original author, oldest open comment and latest activity.
Get a single comment thread by ID, with its reply thread and surrounding paragraph.
Read a document — metadata (title, owner, last modified) plus plain-text content across all tabs, up to 500,000 characters.
Search Drive for Google Docs by title or full text, shared drives included.
Check sign-in status — whether the server is authenticated and with which Google account.
Accept a document ID or a full Google Docs URL, and use read-only OAuth scopes only: no tool creates, edits, replies, resolves or deletes, and non-Docs file types are refused.
Provides read-only access to Google Docs documents, including document content, full comment threads with replies and resolution status, comment summaries, and context around quoted text.
Enables searching and listing Google Docs files in Google Drive, including shared drives, and supports retrieving document comments through the Drive API.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@google-docs-mcp Summarize the comments on the Q4 project plan doc"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
google-docs-mcp
A read-only Model Context Protocol server for Google Docs. Its job is to explain a document's comments to an AI assistant (Claude or any MCP client) in full detail: who wrote each one, when, on which piece of text, whether it is open or resolved, the complete reply thread, and who resolved it.

Read-only by design. It only requests the
documents.readonlyanddrive.readonlyscopes. There is no tool that creates, edits, resolves or deletes anything, and every tool is advertised withreadOnlyHint: true.OAuth 2.0 sign-in. Users authenticate with their own Google account through the desktop-app flow with PKCE. Tokens are stored locally and refreshed automatically (see the seven-day exception for External apps in Testing mode).
Zero configuration for the assistant. Tools accept a document ID or a full Google Docs URL.
Built by José Antonio Garrido. I write about the developer tools I build on my blog, josegarrido.dev.
Tools
Tool | What it does |
| The main tool. Every comment in full detail: author, dates, open/resolved status, quoted text, the whole reply thread (including who resolved or reopened it) and, optionally, the paragraph of the document where the quoted text appears. Filter by status, include deleted comments, paginate, and choose |
| Aggregate view: counts by status, participants and their activity, open comments with no replies, open comments waiting for the original author, oldest open comment and latest activity. |
| A single comment thread by ID, with context. |
| Document metadata plus plain-text content (all tabs), so the assistant can understand what the comments refer to. |
| Search Google Docs in Drive (shared drives included) by title or full text. |
| Whether the server is signed in and with which account. |
Example: list_comments
# Q4 project plan
- Document ID: `1AbC...`
- Link: https://docs.google.com/document/d/1AbC.../edit
- Owner: Ana <ana@example.com>
- Last modified: 2026-09-22 08:00 UTC by Jose <jose@example.com> (you)
## Comments (all): 2
### [1] 🟢 OPEN — Ana · 2026-09-22 08:00 UTC
**Quoted text (what the comment refers to):**
> delivery date
**Surrounding paragraph (#7):**
> The delivery date will be shared with the client once the scope is final.
**Comment:**
The delivery date is missing.
_No replies yet._
Comment ID: `AAAAxyz`
### [2] ✅ RESOLVED — Ana · 2026-09-20 10:32 UTC
...
**Thread (2 replies):**
- Jose (you) · 2026-09-21 09:00 UTC: Yes, moving it.
- Jose (you) · 2026-09-21 12:00 UTC — marked as RESOLVED
Resolved by Jose (you) on 2026-09-21 12:00 UTC.Comment and reply authors appear by display name: the Drive API doesn't populate their email address. A document's owner and last editor show an email when Google makes it visible to you.
Related MCP server: Google Drive MCP Server
Quick start
Prerequisites
Node.js >= 20
A Google Cloud project with the Google Drive API and Google Docs API enabled
1. Create an OAuth client in Google Cloud
Open the Google Cloud Console and create or select a project.
APIs & Services → Library: enable Google Drive API and Google Docs API.
APIs & Services → OAuth consent screen: configure it. Use Internal for a Workspace organization; for External apps in testing mode, add your account as a test user.
APIs & Services → Credentials → Create credentials → OAuth client ID, application type Desktop app.
Download the JSON and save it as
~/.config/google-docs-mcp/credentials.json.
External apps in Testing mode have to sign in again every seven days. With an External consent screen whose publishing status is Testing, Google issues a refresh token that expires in 7 days, so automatic renewal stops working and tools report that the sign-in expired until you repeat step 2. The running server picks up the new sign-in without a restart. An Internal consent screen (Workspace organizations only) doesn't have this limit. Neither does publishing the app (In production), but
drive.readonlyis a restricted scope, so Google then shows an unverified-app warning and caps the project at 100 users unless the app is verified.
You can use environment variables instead of the file:
export GOOGLE_CLIENT_ID="...apps.googleusercontent.com"
export GOOGLE_CLIENT_SECRET="..."2. Sign in with Google
npx -y -p @yeyo11/google-docs-mcp google-docs-mcp-authYour browser opens (or the URL is printed so you can paste it). Google asks for read-only access to Drive and
Docs. Tokens are saved to ~/.config/google-docs-mcp/token.json with 0600 permissions. Run the same command
again to switch accounts.
3. Register the server with your MCP client
No clone or build step is needed; npx fetches the package on first use.
Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"google-docs": {
"command": "npx",
"args": ["-y", "@yeyo11/google-docs-mcp"]
}
}
}Claude Code:
claude mcp add google-docs -- npx -y @yeyo11/google-docs-mcpAny other MCP client that supports stdio servers works the same way. If you use environment variables for the OAuth
client, add them to the env block of your client configuration.
git clone https://github.com/yeyo11/google-docs-mcp.git
cd google-docs-mcp
npm install
npm run build
npm run authThen point your MCP client at node /absolute/path/to/google-docs-mcp/dist/index.js.
4. Ask away
"Summarize the open comments in https://docs.google.com/document/d/…/edit and tell me which ones are waiting on me."
Configuration
Variable | Description | Default |
| Path to the OAuth client JSON. |
|
| Alternative to the JSON file. | — |
| Where the user's tokens are stored. |
|
| Base directory for the two files above. |
|
How it works
MCP client ──stdio──▶ google-docs-mcp ──OAuth2 (read-only)──▶ Google Drive API (files, comments)
└▶ Google Docs API (document text)Comments come from the Drive API (
comments.list/comments.get) with every field requested explicitly, so nothing is silently dropped: quoted text, replies,resolve/reopenactions, deleted flags.The "surrounding paragraph" is found by locating the quoted text inside the document body fetched from the Docs API (all tabs are traversed, including tables).
Google API errors (401/403/404/429) are returned as MCP
isErrorresults with an actionable message instead of breaking the session. Logs go tostderr;stdoutis reserved for the protocol.
Development
npm run dev # run the server from src/ with tsx
npm run typecheck # type-check without emitting
npm test # smoke test: tool listing, error handling without credentials, comment formattingSee CONTRIBUTING.md for the workflow and commit conventions.
Security
Only read-only scopes are requested; Google never grants this client write access.
If the stored token lacks the expected scopes, the server refuses to use it and asks you to sign in again.
credentials.jsonandtoken.jsonare git-ignored. Never commit them.To revoke access, remove the app at https://myaccount.google.com/permissions and delete
token.json.
To report a vulnerability, see SECURITY.md.
An independent review of the server's access and security is on mcprush:
Limits
Read-only. It can't create, reply to or resolve comments, or edit documents.
Google Docs only. Sheets, Slides and other file types are refused, by URL and by bare ID.
Suggestions, assignments and mentions aren't read as such. A comment is its text, status and thread: an assigned comment looks like any other and a mention is just part of the text. Depending on your access, text pending as a suggestion can appear in
get_documentas ordinary text.Comment authors are told apart by display name, since Drive doesn't return their email. In
get_comments_summary, two people with the same name count as one.get_documentreturns plain body text from all tabs, tables included: no formatting, images, smart chips, headers, footers or footnotes. 20,000 characters by default, 500,000 at most (max_chars).The surrounding paragraph is found by searching for the quoted text. It takes the first match, so a repeated phrase can point to the wrong paragraph, and it may be missed if the text was edited after the comment. Quotes under 8 characters get no paragraph, and paragraphs over 600 characters are trimmed.
list_commentspages by 100. Usepage_tokenfor the rest. Thestatusfilter applies to each page, so a page can come back short or empty while more remain.get_comments_summaryreads every page.One Google account per installation. Run the sign-in command again to switch.
Local stdio only. There is no remote or HTTP transport.
Tokens are stored unencrypted in
token.json, with0600permissions.drive.readonlycovers all of Drive the account can see, not only Docs. The tools read Docs only, but that is what you grant on Google's sign-in screen and what the stored token allows.What a tool returns reaches the assistant. Document text, comments, names and email addresses go to whichever assistant and model provider you use. Text written by other people arrives as is, so treat it as untrusted.
Roadmap
Optional write tools (reply, resolve) behind an explicit opt-in scope
Multiple accounts / profiles
Streamable HTTP transport for remote deployments
License
Available Tools
6 toolsget_auth_statusGet authentication statusARead-onlyIdempotent
Check whether the server is signed in to Google and which account is being used. Call this first if other tools fail with authentication errors.
Inputs: no named parameters.
get_commentGet a single comment threadARead-onlyIdempotent
Fetch one comment of a Google Doc by ID with its full reply thread, quoted text and surrounding paragraph.
Inputs: document (required), comment_id (required), format, include_context.
get_comments_summarySummarize commentsARead-onlyIdempotent
Aggregate view of all comments in a Google Doc: counts by status, participants and their activity, open comments with no replies, open comments waiting for the original author, oldest open comment and latest activity. Reads every page of comments.
Inputs: document (required), format.
get_documentGet documentARead-onlyIdempotent
Read a Google Doc: metadata (title, owner, last modified) and its plain-text content across all tabs. Useful to understand what the comments refer to.
Inputs: document (required), max_chars, include_content.
list_commentsList commentsARead-onlyIdempotent
List the comments of a Google Doc in full detail: author, dates, open/resolved status, the quoted text each comment refers to, every reply in the thread (with who resolved or reopened it) and, optionally, the surrounding paragraph of the document. This is the main tool of this server.
Inputs: document (required), format, status, page_token, +3 more.
list_documentsList Google DocsARead-onlyIdempotent
Search the user's Google Drive for Google Docs documents (including shared drives). Returns name, ID, owner and last-modified date, newest first. Use the returned ID with the other tools.
Inputs: query, page_token, max_results.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
The tools separate cleanly by resource and granularity: auth, document discovery, document content, and comment retrieval. The three comment tools overlap somewhat, but full-detail listing, single-comment retrieval, and aggregate summary are distinct enough from their descriptions.
All tools follow a consistent snake_case verb_noun pattern using get_ or list_. Collection retrieval uses list_, single-resource retrieval uses get_, and the aggregate tool is still clearly named as a summary.
Six tools is well-scoped for a read-focused Google Docs and comments server. Each tool serves a distinct step in the workflow without unnecessary redundancy.
The read/comments-analysis surface is nearly complete: auth, document discovery, document contents, full comment threads, and summary analytics are all covered. The only gap is the absence of write or comment-management operations, which matters if the server is expected to be a full Google Docs MCP rather than a read-only one.
Maintenance
Related MCP Connectors
Comment.io lets people and trusted agents work on the same files. Review edits and comments in the browser, manage structured data with DocDB, and build apps over your workspace. Connect your preferred agent through a single run tool using OAuth and Streamable HTTP.
Task management for people and AI agents, with scoped OAuth access to issues, projects, and docs.
Task management for people and AI agents, with scoped OAuth access to issues, projects, and docs.
Web search, data extraction and controlled browser automation for AI assistants via OAuth.
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.MIT
- AlicenseNot gradedqualityDmaintenanceEnables searching, reading, and commenting on Google Drive documents through secure OAuth2 authentication, with support for creating styled notes directly in document content.23 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables creating anchored comments, replies, and real suggested edits in Google Docs from Claude.MIT
- AlicenseNot gradedqualityDmaintenanceEnables Claude Code to read Google Docs and their comment threads, then write corrections and replies back into the same document at the same URL.MIT