google-drive-cowork-mcp
Create, read, and edit Google Docs documents including appending text, replacing text, inserting headings and tables, and managing document sharing and folder placement.
Create, read, write, and format Google Sheets, manage tabs (add, rename, delete, freeze), and create embedded charts.
Create presentations, read presentation structure, get text from slides, add slides with layouts, apply batch updates, and insert images from URLs.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@google-drive-cowork-mcpCreate a new Google Doc for meeting notes."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
google-drive-cowork-plugin
MCP server that lets Claude Cowork create and edit Google Docs, Sheets, and Slides. Runs as a local stdio process — no hosted backend.
What it does
22 tools exposed over the Model Context Protocol:
Google Docs (9 tools)
Tool | Purpose |
| Create a new doc (with dedup) |
| Read structure or full text |
| Append text with optional heading style |
| Global find/replace |
| Rewrite one section by heading |
| Add a heading after a section or at end |
| Insert a table with optional pre-fill data |
| Share with email recipients |
| Move to a Drive folder |
Google Sheets (7 tools)
Tool | Purpose |
| Create a new spreadsheet |
| Read metadata, tabs, named ranges |
| Read cell values from a range |
| Write values (atomic batch) |
| Apply formatting via batchUpdate |
| Add, rename, delete, freeze tabs |
| Create embedded charts |
Google Slides (6 tools)
Tool | Purpose |
| Create a new presentation |
| Read presentation structure |
| Read text from a specific slide |
| Add slide with layout |
| Apply batchUpdate requests |
| Insert image from URL |
Related MCP server: Google Workspace MCP
Install
Two paths, same plugin. Pick the one that matches how you use Claude.
Path 1: Claude Code
claude plugin marketplace add https://github.com/sashakang/google-drive-cowork-plugin
claude plugin install google-drive-cowork-mcpThen follow CONNECTORS.md to set up GCP credentials and authenticate.
Path 2: Cowork (via Claude Code)
Cowork can't install MCP plugins directly. Use Claude Code to set it up once, then Cowork picks it up on restart.
git clone https://github.com/sashakang/google-drive-cowork-plugin.git
cd google-drive-cowork-plugin
python3 -m venv .venv
source .venv/bin/activate
pip install -e .Then follow CONNECTORS.md to set up GCP credentials, authenticate, and add the MCP server to your Claude Desktop config. Restart Claude — the 22 tools will be available in Cowork.
Architecture
Claude Cowork / Claude Code
└─ MCP (stdio transport)
└─ python3 -m server.main
├─ Google Docs API v1 (document operations)
├─ Google Drive API v3 (folders, sharing)
├─ Google Sheets API v4 (spreadsheet operations)
└─ Google Slides API v1 (presentation operations)All state lives in ~/.config/gdocs-mcp/:
File | Purpose |
| OAuth client (from GCP Console) |
| Refresh token (auto-generated) |
| Optional folder/domain allowlists |
| Append-only JSONL operation log |
Safety
Read-before-write — all write tools require a prior read call (server-enforced, 5 min window)
Prompt injection mitigation — returned doc content is prefixed with a machine-readable warning banner
Folder and domain allowlists — restrict where docs can be moved and who they can be shared with
Create deduplication — same title within 30s returns the cached doc
Typed errors with recovery hints — every error includes an LLM-actionable
recoveryfieldAudit trail — all operations logged to JSONL (no doc content stored)
Timeout — 60s per tool call; returns a clear error on timeout
Thread-safe caches — locking around all shared state
Optional: Docker
docker build -t gdocs-mcp .
docker run -v ~/.config/gdocs-mcp:/root/.config/gdocs-mcp gdocs-mcpConfiguration
Create ~/.config/gdocs-mcp/config.json to restrict operations:
{
"allowed_folder_ids": ["1ABC...xyz"],
"allowed_sharing_domains": ["yourcompany.com"]
}Empty arrays (or no file) means allow all.
Troubleshooting
"Server disconnected" in Claude:
Check the MCP log at ~/Library/Logs/Claude/mcp-server-google-docs.log. Common causes:
Wrong Python (must use venv): use the
bash -cconfig shown in CONNECTORS.mdTypeError: Server.run() missing ... initialization_options: updatemcppackage in venv
"Credential scopes outdated":
The server needs 4 scopes (docs, drive, sheets, presentations). Re-run python3 -m server.auth --setup to re-authorize.
"redirect_uri_mismatch":
Your OAuth client must be a Desktop type (not Web). The redirect_uris should be ["http://localhost"].
"externally-managed-environment":
You're using Homebrew Python without a venv. Activate the venv first: source .venv/bin/activate.
Auth flow hangs / no browser opens: The auth command starts a local HTTP server and waits for a callback. If the browser didn't open automatically, copy the URL from the terminal and open it manually. You'll see "Waiting for browser authorization..." in the terminal while it waits.
Project structure
server/
main.py — MCP server, tool routing, dispatch
docs_api.py — Google Docs API client
drive_api.py — Google Drive API client
sheets_api.py — Google Sheets API client
slides_api.py — Google Slides API client
workspace_client.py — Base class for all API clients
auth.py — OAuth 2.0 credential management
config.py — Policy enforcement (allowlists, TTL cache)
errors.py — Typed exceptions + shared HTTP error handler
paths.py — Centralized path constants
tools/
docs.py — Docs tool definitions and dispatch
sheets.py — Sheets tool definitions and dispatch
slides.py — Slides tool definitions and dispatch
skills/
google-docs/SKILL.md — LLM skill definition
commands/
create-doc.md — /create-doc slash command
replace-section.md — /replace-section slash commandLicense
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/sashakang/google-drive-plugin'
If you have feedback or need assistance with the MCP directory API, please join our Discord server