José Garrido
SubscribeLeer en españolES

I write when I ship an open-source project: what it does and how to try it. No spam.

Google Docs MCPv0.1.2

google-docs-mcp 0.1.2 names the right sign-in command, explains expired sign-ins, refuses files that aren't Google Docs and decodes quoted text in comments.

google-docs-mcp is a read-only MCP server that explains a Google Doc’s comments to an AI assistant: who wrote each one, when, on which text, whether it is open or resolved, and the full reply thread. Version 0.1.2 fixes four bugs, in the sign-in messages, expired sign-ins, the file-type check and quoted text.

Here is what you get from each fix and how it works.

Which sign-in command does the server give you now?

The sign-in messages told everyone to run npm run auth, which doesn’t exist if you run the server through npx. The server now checks where it is running from and names the command that applies to you. Installed from npm, get_auth_status says:

Ask the user to run `npx -y -p @yeyo11/google-docs-mcp google-docs-mcp-auth` in a terminal to sign in with Google (read-only access).

The check is one line in src/config.ts: if the module’s path goes through node_modules, it is an installed package; anything else is a clone, which keeps npm run auth. The server’s instructions to the assistant and its error messages use the same function, so they all give the same command.

What happens when your Google sign-in expires?

Google answers invalid_grant when a refresh token has expired or been revoked. With an External consent screen in Testing mode, that happens after seven days. Tools used to pass that bare string along. They now return this:

Your Google sign-in has expired or was revoked (invalid_grant). Run `npx -y -p @yeyo11/google-docs-mcp google-docs-mcp-auth` in a terminal to sign in again. With an External OAuth consent screen in Testing mode, Google ends the sign-in after seven days.

Run that command and ask your assistant again. You don’t have to restart the server: when a tool fails this way, the server drops its cached Google clients, so the next call reads token.json again.

The smoke test runs this sequence over stdio against stubbed Google endpoints (scripts/fixtures/fake-google.mjs): expired token, error with the command, new token, signed in. You can run it without a Google account:

npm test

What if you pass the ID of a Sheet?

The server had a “not a Google Doc” check that never fired, because mimeType wasn’t requested from Drive. It is requested now, so a bare ID of a Sheet, a Slides deck or any other file gets a direct answer:

File <id> is not a Google Doc (mimeType application/vnd.google-apps.spreadsheet).

This applies to every tool that takes a document, including the comment tools, which used to let these files through. get_document runs the check before calling the Docs API, so you get this message and not an error from that API.

Why did quoted text look wrong?

Drive returns the text a comment refers to HTML-escaped, and the server showed it that way. A quote from a piece of SQL arrived like this:

AND CreateAt &gt; :ChannelMemberLastViewedAt

It now arrives as it reads in the document:

AND CreateAt > :ChannelMemberLastViewedAt

This also fixes the surrounding paragraph. The server finds it by searching the document for the start of the quote, so an entity in the first characters meant no match.

Decoding happens once, so &amp;lt; becomes &lt; and goes no further. Comment and reply text aren’t touched, because Drive’s reference describes them as plain text: if someone typed &gt; in a comment, you see &gt;. The decoder is the entities package, a new dependency with no dependencies of its own.

What else is in this release?

  • A demo GIF in the README: a replay of a real run on a public document, with the names anonymised.
  • @modelcontextprotocol/sdk 1.32.2 and zod 4.6.7 are now the minimum versions in package.json, and several transitive dependencies were updated.
  • The README explains the seven-day sign-in rule for External consent screens in Testing mode.

How do I try it?

You need Node.js 20 or later and an OAuth client of type Desktop app from a Google Cloud project with the Drive and Docs APIs enabled, saved as ~/.config/google-docs-mcp/credentials.json. The README has the steps.

Sign in, which opens your browser and asks for read-only access:

npx -y -p @yeyo11/google-docs-mcp google-docs-mcp-auth

Register the server. In Claude Code:

claude mcp add google-docs -- npx -y @yeyo11/google-docs-mcp

Then ask about a document:

Summarize the open comments in https://docs.google.com/document/d/…/edit and tell me which ones are waiting on me.

The code is on GitHub, and the changelog has the full list of changes.