home / mcp / google docs mcp server
Provides tab-aware Google Docs access, enabling tab-level read/write, markdown export, and batch updates through MCP.
Configuration
View docs{
"mcpServers": {
"gigabrainobserver-google-docs-mcp-server": {
"command": "uvx",
"args": [
"google-docs-mcp-server"
],
"env": {
"SUBJECT_EMAIL": "[email protected]",
"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.
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.
Install Python dependencies and run the server locally in development or production.
pip install google-docs-mcp-server
```
```bash
uvx google-docs-mcp-serverYou 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.
| Variable | Description |
|----------|-------------|
| SERVICE_ACCOUNT_PATH | Path to the service account JSON key file |
| SUBJECT_EMAIL | Email of the Workspace user to impersonate |
Follow these steps to enable Google Docs and Drive access and prepare a service account for domain-wide delegation.
- Python 3.11+ - A Google Cloud service account with domain-wide delegation
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.
Add the MCP server entry to your MCP client configuration using the provided command and environment variables.
{
"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]"
}
}
}
}| 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 |
List all tabs (including nested) in a document
Read one tab or all tabs as markdown with proper heading levels
Provide lightweight metadata: title, ID, link, tab list
Create a new document with optional initial text
Append text to the end of a specific tab
Insert text at a specific character index in a tab
Find and replace within a tab or the entire document
Perform full batchUpdate operations for formatting, tables, images, and styles
Search Drive for documents by name