- Home
- MCP servers
- Google Docs
Google Docs
- python
4
GitHub Stars
python
Language
3 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"gigabrainobserver-google-docs-mcp-server": {
"command": "uvx",
"args": [
"google-docs-mcp-server"
],
"env": {
"SUBJECT_EMAIL": "user@domain.com",
"SERVICE_ACCOUNT_PATH": "/path/to/key.json"
}
}
}
}You can connect to Google Docs with full tab support using this MCP server, enabling you to read, modify, and manage documents with precise tab handling and markdown-friendly output within your MCP workflows.
How to use
You will run this MCP server alongside your MCP client and invoke its tools to interact with Google Docs. Use the available tools to inspect documents, read content as markdown, create new documents, and apply changes across tabs with batch updates. Tools that target specific tabs accept either tab_id or tab_title (case-insensitive). When using batch operations, the server automatically injects tab identifiers so you can focus on content changes.
How to install
Install Python dependencies and run the server locally in development or production.
pip install google-docs-mcp-server
uvx google-docs-mcp-server
Configuration and usage notes
You will configure the MCP client to point at this server and supply the required credentials for Google APIs.
Two environment variables are required to authenticate and impersonate a Workspace user: SERVICE_ACCOUNT_PATH and SUBJECT_EMAIL.
Environment variables
| Variable | Description |
|---|---|
SERVICE_ACCOUNT_PATH | Path to the service account JSON key file |
SUBJECT_EMAIL | Email of the Workspace user to impersonate |
Setup
Follow these steps to enable Google Docs and Drive access and prepare a service account for domain-wide delegation.
Prerequisites
- Python 3.11+
- A Google Cloud service account with domain-wide delegation
Install prerequisites and run the server
You must create a Google Cloud project, enable APIs, create a service account, and provide a JSON key. Then start the MCP server with the required environment variables.
MCP client configuration
Add the MCP server entry to your MCP client configuration using the provided command and environment variables.
Example MCP client configuration
{
"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"
}
}
}
}
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 |
Available tools
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
Provide lightweight metadata: title, ID, link, tab list
create_document
Create a new document with optional initial text
append_text
Append text to the end of a specific tab
insert_text
Insert text at a specific character index in a tab
replace_text
Find and replace within a tab or the entire document
batch_update
Perform full batchUpdate operations for formatting, tables, images, and styles
list_documents
Search Drive for documents by name