Skip to main content

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

Metadata

Release files for google-docs-mcp-server 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for google-docs-mcp-server 0.1.1
File Size Uploaded
google_docs_mcp_server-0.1.1.tar.gz 6.9 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for google-docs-mcp-server 0.1.1
File Interpreter ABI Platform
google_docs_mcp_server-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 6.9 MB

Release files / google_docs_mcp_server-0.1.1.tar.gz

Download URL google_docs_mcp_server-0.1.1.tar.gz
Size 6.9 MB
Tags Source
SHA-256 checksum
How to use checksums
8ba1ad0e27ac0d5d7c08075dfeab48f3b2ade2504f7c2b3961d1c2b00f2210a3
BLAKE2b-256 checksum
How to use checksums
bfd481212e1578832e3a92f67958d0212df399f97d37c832ba4791f9a5cfb11c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.8

Release files / google_docs_mcp_server-0.1.1-py3-none-any.whl

Download URL google_docs_mcp_server-0.1.1-py3-none-any.whl
Size 12.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7f40102141fc09f61a2691cfaab94fbecddcbd1f767d5ce4e9bed4c9903d06f0
BLAKE2b-256 checksum
How to use checksums
fcf165a386cff89d9200b0a5df8572bdd52b7b74fee843eb274a9c1e59d828fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.8

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page