Google Docs MCP
MCP server for Google Docs.
Features
- Tools:
docs.read— Read a Doc as Markdown or HTMLcomments.list— List comments and repliescomments.reply— Reply to a comment (write gated)comments.resolve— Resolve a comment (write gated)docs.insert_text— Insert or append text (write gated)docs.from_url— Normalize a Docs/Drive URL to IDsdrive.export_file— Export as PDF/DOCX/HTML
- Resources:
mcp://token-info— Safe token diagnostics (no secrets)gdoc-md://{document_id}— Google Doc (Markdown)gdoc-html://{document_id}— Google Doc (HTML)
- Prompts:
comment_reply,summarize_doc
Quick Start
- Using CLI (recommended):
- Authorize:
uvx google-docs-mcp auth authorize [-f|--force] - Start server (default stdio):
uvx google-docs-mcp server [--transport stdio|http|sse|streamable-http]
- Authorize:
- Using local instance:
- Authorize:
uv run google_docs_mcp auth authorize - Start server:
uv run google_docs_mcp server
- Authorize:
MCP Config (example)
Add to your MCP client configuration (installed CLI):
[mcp_servers.google_docs_mcp]
command = "uvx"
args = ["google-docs-mcp", "server"]
env = {
WRITE_MODE = "disabled",
GOOGLE__CLIENT_ID = "<id>",
GOOGLE__CLIENT_SECRET = "<secret>",
}
OAuth Setup
- Create OAuth Desktop client in Google Cloud Console.
- Provide
GOOGLE__CLIENT_IDandGOOGLE__CLIENT_SECRETas env vars, or put a client file in the config dir and setGOOGLE__OAUTH_CLIENT_FILE. - Run
google-docs-mcp auth authorize(oruv run -m google_docs_mcp.cli auth authorize) and approve scopes.
Write Safety
- Controlled via
WRITE_MODEenv var. Default isenabled. Setdisabledto block any write tools.
Configuration
- This repo provides an auto-generated
Configuration.mdand a starter.env.example. They are the source of truth for all env vars and defaults. - Common variables:
WRITE_MODE:enabled(default) ordisabledLOG_LEVEL:DEBUG|INFO(default) |WARNING|ERROR|CRITICALGOOGLE__CLIENT_ID,GOOGLE__CLIENT_SECRET,GOOGLE__OAUTH_CLIENT_FILE,GOOGLE__SCOPESs SeeConfiguration.mdfor all environment variables and examples. A starter.env.exampleis provided.
Notes
- Python 3.13, pydantic v2, ruff format, strict mypy.
- No tests by design; keep code small and documented.
MCP Inspector
The MCP Inspector is a handy UI to explore and call tools.
Interactive setup (recommended):
- Start Inspector:
npx -y @modelcontextprotocol/inspector - In the connection dialog, set:
- Transport:
stdio - Command:
google-docs-mcp(oruvfor the alternative config above) - Args:
server - Env (optional): add
WRITE_MODE=disabledand your OAuth vars if not already stored
- Transport:
- Connect, then list tools and try
docs.from_urlanddocs.read.
Tip: enable verbose logs with LOG_LEVEL=DEBUG in Env to diagnose issues.
Note on Drive permissions
- Some tools (comments and exports) call the Drive API. If you see a Drive 404 like "File not found" on an accessible Doc, re-authorize with Drive read-only scope:
- Ensure
GOOGLE__SCOPESincludeshttps://www.googleapis.com/auth/drive.readonly. - Run
google-docs-mcp auth authorizeagain to grant the new scope.
- Ensure
Diagnostics
- Show token info (safe):
google-docs-mcp auth token-info - Revoke local token:
google-docs-mcp auth revoke
Security
- Required scopes:
https://www.googleapis.com/auth/documentsandhttps://www.googleapis.com/auth/drive.readonly. - Secrets are never logged. The
mcp://token-inforesource exposes only safe metadata.
Metadata
Release files for google-docs-mcp 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| google_docs_mcp-0.1.0.tar.gz | 14.2 kB | Without provenance | Details for google_docs_mcp-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| google_docs_mcp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for google_docs_mcp-0.1.0-py3-none-any.whl |
Total release size: 32.9 kB
Release files / google_docs_mcp-0.1.0.tar.gz
| Download URL | google_docs_mcp-0.1.0.tar.gz |
|---|---|
| Size | 14.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9568415ca89720cbc498f5c9dfed7ca2fe82dc940b90a917600cd117be7fc912
|
|
BLAKE2b-256 checksum How to use checksums |
80c9a4644712a519dc0b4e3a964c7ddb5516891218814cab1f9108576f2fcde7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.14
|
Release files / google_docs_mcp-0.1.0-py3-none-any.whl
| Download URL | google_docs_mcp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 18.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8340ac352534d907c24e63434877c7968d1a38f09d4061761b4a19efd1f70e13
|
|
BLAKE2b-256 checksum How to use checksums |
8c8b4342cb791e3759e367750db0da05ca9205a029f114b69e7d730cd6330ed1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.14
|
Security for google-docs-mcp 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.