google-docs
Google Docs MCP server with full tab support — service account auth, domain-wide delegation, markdown extraction
claude mcp add --transport stdio gigabrainobserver-google-docs-mcp-server uvx google-docs-mcp-server \ --env SUBJECT_EMAIL="Email of the Workspace user to impersonate" \ --env SERVICE_ACCOUNT_PATH="Path to the service account JSON key file"
How to use
This MCP server provides a Google Docs integration with full tab support, enabling you to interact with documents at the level of individual tabs and their content. Core tools include list_tabs (to enumerate all tabs, including nested ones), read_document (to extract a tab or the entire document as Markdown with proper heading structure), get_document_info (to fetch lightweight metadata such as title, ID, link, and tab list), create_document (to create a new document with optional initial text), and editing tools like append_text, insert_text, and replace_text. For more advanced formatting and structure changes, batch_update exposes the Google Docs API’s batchUpdate capabilities, while list_documents lets you search Drive for documents by name. All tab-targeting tools accept either tab_id or tab_title, case-insensitive, and batch_update will auto-inject tabId into requests.
How to install
Prerequisites:
- Python 3.11+
- Access to a Google Cloud project with Google Docs API and Google Drive API enabled
- A Google Cloud service account with domain-wide delegation (and a JSON key)
Install the MCP server package from PyPI:
pip install google-docs-mcp-server
Or run directly with uv:
uvx google-docs-mcp-server
Configure the MCP client to run this server (example shown in the README):
{
"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"
}
}
}
}
Ensure you have the prerequisites set up (see the README) before starting the server.
Additional notes
Environment considerations:
- SERVICE_ACCOUNT_PATH must point to the Google service account JSON key file.
- SUBJECT_EMAIL must be the Workspace user the service account impersonates.
- Ensure Domain-wide Delegation is enabled for the service account and the required scopes are granted: https://www.googleapis.com/auth/documents and https://www.googleapis.com/auth/drive.readonly.
Common issues:
- Incorrect service account permissions or missing domain-wide delegation results in authorization errors.
- If tabs content is not visible, ensure you’re using includeTabsContent in the requests on the client side and that the API supports tab content for the document version you’re targeting.
- When running under uvx, ensure the path to the server executable aligns with your installed package and entry point.
Configuration tips:
- Keep SERVICE_ACCOUNT_PATH and SUBJECT_EMAIL secure; do not commit to version control.
- You can store configuration in MCP client files (e.g., ~/.claude/mcp.json) as shown in the README example.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP