# google-docs-mcp 0.1.2: the right sign-in command, clear expiry errors and decoded quotes

> 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.

- URL: https://josegarrido.dev/en/google-docs-mcp-expired-sign-in-and-quoted-text-fixes/
- Author: José Antonio Garrido
- Published: 2026-11-06
- Language: en
- Project: [google-docs-mcp](https://github.com/yeyo11/google-docs-mcp) v0.1.2
- Tags: mcp, google-docs, oauth, typescript, ai-tools
- Spanish version: https://josegarrido.dev/es/google-docs-mcp-sesion-caducada-y-texto-citado/

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:

```text
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:

```text
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:

```bash
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:

```text
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:

```text
AND CreateAt &gt; :ChannelMemberLastViewedAt
```

It now arrives as it reads in the document:

```text
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](https://github.com/yeyo11/google-docs-mcp#quick-start) has the steps.

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

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

Register the server. In Claude Code:

```bash
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](https://github.com/yeyo11/google-docs-mcp), and the [changelog](https://github.com/yeyo11/google-docs-mcp/blob/main/CHANGELOG.md) has the full list of changes.
