mcpField
G
google-docs-mcp-server

google-docs-mcp-server

Local
github.com/gigabrainobserverProductivity4Updated 34w ago

About google-docs-mcp-server

google-docs-mcp-server lets Google Workspace users read and edit Google Docs through MCP. It handles nested tabs and converts document content to Markdown with heading structure.

Key features

  1. 01List nested document tabs
  2. 02Read tabs as structured Markdown
  3. 03Create documents and edit text
  4. 04Apply batch formatting and updates
  5. 05Search Drive for documents

Use cases

  1. 01Read every tab in a document
  2. 02Append or replace text in a chosen tab
  3. 03Apply formatting or table updates in batches

MCP support

It exposes Google Docs and Drive operations as tools for MCP clients, including tab-aware reading and editing. Authentication uses a Google service account with domain-wide delegation.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"gigabrain-observer-google-docs": {
"command": "uvx",
"args": [
"google-docs-mcp-server"
],
"env": {
"SERVICE_ACCOUNT_PATH": "<SERVICE_ACCOUNT_PATH>",
"SUBJECT_EMAIL": "<SUBJECT_EMAIL>"
}
}
}
}
Run commanduvx google-docs-mcp-server
Environment variables to set
SERVICE_ACCOUNT_PATHPath to the Google service account JSON key file
SUBJECT_EMAILEmail of the Workspace user to impersonate via domain-wide delegation

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
pypigoogle-docs-mcp-server0.1.1

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

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

ToolDescription
list_tabsList all tabs (including nested) in a document
read_documentRead one tab or all tabs as markdown with proper heading levels
get_document_infoLightweight metadata: title, ID, link, tab list
create_documentCreate a new doc with optional initial text
append_textAppend text to the end of a specific tab
insert_textInsert text at a character index in a tab
replace_textFind and replace within a tab (or whole doc)
batch_updateFull batchUpdate access — formatting, tables, images, styles
list_documentsSearch 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": "[email protected]"
      }
    }
  }
}

SUBJECT_EMAIL is the Workspace user the service account impersonates.

Environment variables

VariableRequiredDescription
SERVICE_ACCOUNT_PATHYesPath to the service account JSON key file
SUBJECT_EMAILYesEmail of the Workspace user to impersonate

License

MIT

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.