Google Docs MCP

v26.11.14
com.renzojohnson/google-docs-mcp Checked 1 day ago Published 19 days ago

Google Docs MCP server: read documents, append or insert text, find and replace.

Google Docs MCP server for Claude Code, Cursor and any MCP client. Read and edit Google Docs. The server speaks MCP over stdio. It needs Node.js 22 or newer. Prefer VS Code? Install the Google Docs MCP extension: it signs you in with a wizard and registers the server with 8 AI agents. The server uses the first credential it finds:

Summary extracted from the README.

Google Docs MCP

Google Docs MCP server for Claude Code, Cursor and any MCP client. Read and edit Google Docs.

npx -y @renzo.johnson/google-docs-mcp

The server speaks MCP over stdio. It needs Node.js 22 or newer. Prefer VS Code? Install the Google Docs MCP extension: it signs you in with a wizard and registers the server with 8 AI agents.

Sign in

The server uses the first credential it finds:

  1. An OAuth user: set GOOGLE_OAUTH_CLIENT_ID, GOOGLE_OAUTH_CLIENT_SECRET and GOOGLE_OAUTH_REFRESH_TOKEN. Set all three or none; a partial set stops the server with an error naming what is missing.
  2. GOOGLE_APPLICATION_CREDENTIALS: path to a service-account key or an authorized_user JSON file.
  3. Application Default Credentials from the gcloud CLI:
gcloud auth application-default login --scopes=https://www.googleapis.com/auth/documents,https://www.googleapis.com/auth/documents.readonly

The OAuth refresh token (or service account) needs these scopes:

  • https://www.googleapis.com/auth/documents
  • https://www.googleapis.com/auth/documents.readonly

Claude Code

Add it from the command line:

claude mcp add google-docs-mcp -- npx -y @renzo.johnson/google-docs-mcp

Or add it to .mcp.json in your project (or ~/.claude.json for every project).

Cursor

Add it to ~/.cursor/mcp.json (or .cursor/mcp.json in a project).

Configuration

Claude Code and Cursor use the same JSON shape:

With Application Default Credentials (gcloud):

{
  "mcpServers": {
    "google-docs-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@renzo.johnson/google-docs-mcp"
      ]
    }
  }
}

With an OAuth user:

{
  "mcpServers": {
    "google-docs-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@renzo.johnson/google-docs-mcp"
      ],
      "env": {
        "GOOGLE_OAUTH_CLIENT_ID": "your-client-id.apps.googleusercontent.com",
        "GOOGLE_OAUTH_CLIENT_SECRET": "your-client-secret",
        "GOOGLE_OAUTH_REFRESH_TOKEN": "your-refresh-token"
      }
    }
  }
}

With a service-account key:

{
  "mcpServers": {
    "google-docs-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@renzo.johnson/google-docs-mcp"
      ],
      "env": {
        "GOOGLE_APPLICATION_CREDENTIALS": "/path/to/service-account.json"
      }
    }
  }
}

Available Tools (3)

Docs (1 tool)

Tool What It Does Example Prompt
docs_read Read full text of a Google Doc "Read the project proposal doc"

Docs Admin (mega-tool)

Action Description
create Create a new document
append_text Add text to end of document
insert_text Insert text at a specific position
replace_text Find and replace text
delete_content Delete content range (requires confirm)

Safety

Destructive actions (delete, trash, clear) require confirm: true to execute. The AI agent will be warned and must explicitly confirm before proceeding.

Privacy

The server sends no telemetry. It talks only to Google APIs, with your own credentials.

By Renzo Johnson | MIT License