Google Docs MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add -e "SERVICE_ACCOUNT_PATH=${SERVICE_ACCOUNT_PATH}" -e "SUBJECT_EMAIL=${SUBJECT_EMAIL}" google-docs -- uvx google-docs-mcp-server
Required:SERVICE_ACCOUNT_PATHSUBJECT_EMAIL
README.md

A Model Context Protocol server for Google Docs with full tab support.

Google Docs MCP Server

A Model Context Protocol server for Google Docs with full tab support — something most existing servers get wrong or skip entirely.

Uses Google service accounts with domain-wide delegation, so it works in Workspace orgs without OAuth consent screens.

What it does

Tool Description
list_tabs List all tabs (including nested) in a document
read_document Read one tab or all tabs as markdown with proper heading levels
get_document_info Lightweight metadata: title, ID, link, tab list
create_document Create a new doc with optional initial text
append_text Append text to the end of a specific tab
insert_text Insert text at a character index in a tab
replace_text Find and replace within a tab (or whole doc)
batch_update Full batchUpdate access — formatting, tables, images, styles
list_documents Search Drive for docs by name

All tab-targeting tools accept tab_id or tab_title (case-insensitive). The batch_update tool auto-injects tabId into requests so you don't have to.

Why this exists

Google Docs has supported tabs since late 2024, but most MCP servers either:

  • Ignore tabs entirely (only read the first tab)
  • Don't use includeTabsContent=True, so tab content is invisible
  • Don't handle nested tabs

This server handles all of that correctly and converts content to markdown with proper heading structure.

Install

pip install google-docs-mcp-server

Or run directly with uv:

uvx google-docs-mcp-server

Prerequisites

  • Python 3.11+
  • A Google Cloud service account with domain-wide delegation

Setup

1. Create a GCP service account

  1. Go to Google Cloud Console and create (or select) a project
  2. Enable the Google Docs API and Google Drive API
  3. Create a service account under IAM & Admin > Service Accounts
  4. Create a JSON key and download it

2. Enable domain-wide delegation

  1. In GCP, on the service account details page, enable Domain-wide Delegation and note the Client ID
  2. In Google Workspace Admin > Security > API Controls > Domain-wide Delegation
  3. Add the Client ID with these scopes:
    https://www.googleapis.com/auth/documents
    https://www.googleapis.com/auth/drive.readonly
    

3. Configure your MCP client

Add to your MCP config (e.g. ~/.claude/mcp.json or .mcp.json):

{
  "mcpServers": {
    "google-docs": {
      "command": "uvx",
      "args": ["google-docs-mcp-server"],
      "env": {
        "SERVICE_ACCOUNT_PATH": "/path/to/your-service-account-key.json",
        "SUBJECT_EMAIL": "you@yourdomain.com"
      }
    }
  }
}

SUBJECT_EMAIL is the Workspace user the service account impersonates.

Environment variables

Variable Required Description
SERVICE_ACCOUNT_PATH Yes Path to the service account JSON key file
SUBJECT_EMAIL Yes Email of the Workspace user to impersonate

License

MIT

Tools (9)

list_tabsList all tabs including nested ones in a document
read_documentRead one tab or all tabs as markdown with proper heading levels
get_document_infoGet lightweight metadata including title, ID, link, and tab list
create_documentCreate a new document with optional initial text
append_textAppend text to the end of a specific tab
insert_textInsert text at a specific character index in a tab
replace_textFind and replace text within a tab or the whole document
batch_updatePerform full batchUpdate access for formatting, tables, images, and styles
list_documentsSearch Google Drive for documents by name

Environment Variables

SERVICE_ACCOUNT_PATHrequiredPath to the service account JSON key file
SUBJECT_EMAILrequiredEmail of the Workspace user to impersonate

Configuration

claude_desktop_config.json
{"mcpServers": {"google-docs": {"command": "uvx", "args": ["google-docs-mcp-server"], "env": {"SERVICE_ACCOUNT_PATH": "/path/to/your-service-account-key.json", "SUBJECT_EMAIL": "you@yourdomain.com"}}}}

Try it

List all the tabs in my project documentation document.
Read the content of the 'Requirements' tab in my Google Doc and summarize it as markdown.
Create a new Google Doc titled 'Meeting Notes' and append today's date to the first tab.
Find the document named 'Q4 Strategy' and replace all instances of '2024' with '2025'.
Get the metadata for my latest project brief to find its document ID.

Frequently Asked Questions

What are the key features of Google Docs MCP Server?

Full support for Google Docs tabs including nested structures. Converts document content to markdown with proper heading hierarchy. Supports domain-wide delegation for Google Workspace organizations. Comprehensive batch update capabilities for formatting and styling. Lightweight metadata retrieval for document management.

What can I use Google Docs MCP Server for?

Automating the generation of formatted project reports from AI-generated content. Syncing documentation across multiple tabs in a single Google Doc. Bulk updating document formatting or styles across an organization's files. Searching and retrieving specific document content without leaving the AI interface.

How do I install Google Docs MCP Server?

Install Google Docs MCP Server by running: pip install google-docs-mcp-server

What MCP clients work with Google Docs MCP Server?

Google Docs MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Google Docs MCP Server docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare