mcp-gdocs
MCP server for creating Google Docs from Markdown with full formatting support. Designed for AI agents — any MCP-compatible client (Claude Code, Claude Desktop, etc.) can create, update, and search Google Docs.
Tools
| Tool | Description |
|---|---|
markdown_to_gdoc |
Convert Markdown to a Google Doc, get back a URL |
update_google_doc |
Update existing Google Doc with new Markdown content |
list_google_docs |
Search your Google Docs by name |
Supported Markdown
- Headings (h1-h4)
- Bold, italic,
inline code - Bullet lists (nested)
- Tables with headers
- Links
Prerequisites
- Python 3.10+
- Google Cloud project with these APIs enabled:
- OAuth 2.0 credentials (Desktop app type) — download from Google Cloud Console
Installation
# Clone the repository
git clone https://github.com/Baho73/mcp-gdocs.git
cd mcp-gdocs
# Create virtual environment and install
python -m venv .venv
.venv/Scripts/activate # Windows
# source .venv/bin/activate # Linux/Mac
pip install -e .
Setup
1. Add Google OAuth credentials
mkdir credentials
cp /path/to/your/client_secret.json credentials/client_secret.json
2. Authenticate (first run)
python -m mcp_gdocs.server
This opens a browser for Google OAuth consent. After authorization, the token is cached in credentials/token.json.
3. Add to Claude Code
claude mcp add mcp-gdocs -- /path/to/mcp-gdocs/.venv/Scripts/python -m mcp_gdocs.server
Or add to .claude.json manually:
{
"mcpServers": {
"mcp-gdocs": {
"type": "stdio",
"command": "/path/to/mcp-gdocs/.venv/Scripts/python",
"args": ["-m", "mcp_gdocs.server"],
"env": {
"GDOCS_CREDENTIALS_PATH": "/path/to/credentials/client_secret.json",
"GDOCS_TOKEN_PATH": "/path/to/credentials/token.json"
}
}
}
}
4. Add to Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"mcp-gdocs": {
"command": "/path/to/mcp-gdocs/.venv/Scripts/python",
"args": ["-m", "mcp_gdocs.server"],
"env": {
"GDOCS_CREDENTIALS_PATH": "/path/to/credentials/client_secret.json",
"GDOCS_TOKEN_PATH": "/path/to/credentials/token.json"
}
}
}
}
Usage Examples
Once connected, any MCP client can use these tools:
Create a document:
"Create a Google Doc from this markdown with title 'Meeting Notes'"
Search documents:
"Find my Google Docs about 'project plan'"
Update a document:
"Update the Google Doc with ID xxx with this new content"
Environment Variables
| Variable | Default | Description |
|---|---|---|
GDOCS_CREDENTIALS_PATH |
credentials/client_secret.json |
Path to Google OAuth client secret |
GDOCS_TOKEN_PATH |
credentials/token.json |
Path to cached OAuth token |
Architecture
Built with GRACE framework. Four modules:
- M-AUTH — OAuth2 authentication with token caching
- M-CONVERTER — Markdown to DOCX conversion (python-docx + mistune)
- M-GDRIVE — Google Drive API client (upload, update, list)
- M-SERVER — MCP server (FastMCP, stdio transport)
Tech Stack
- Python 3.10+
- MCP SDK — Model Context Protocol
- python-docx — DOCX generation
- mistune — Markdown parsing
- Google Drive API v3
License
MIT
Metadata
Release files for mcp-gdocs 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 |
|---|---|---|---|---|
| mcp_gdocs-0.1.0.tar.gz | 10.3 kB | Without provenance | Details for mcp_gdocs-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mcp_gdocs-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for mcp_gdocs-0.1.0-py3-none-any.whl |
Total release size: 20.3 kB
Release files / mcp_gdocs-0.1.0.tar.gz
| Download URL | mcp_gdocs-0.1.0.tar.gz |
|---|---|
| Size | 10.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9c68aa29e665ca9d4ee95344356e72ec5ca9e66cbc293e87bf2626e43bbc9600
|
|
BLAKE2b-256 checksum How to use checksums |
4aa3c4bd08a878c27f7565ccb7fcf87f86c8cc70de2724a95d07fa041eb0035f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / mcp_gdocs-0.1.0-py3-none-any.whl
| Download URL | mcp_gdocs-0.1.0-py3-none-any.whl |
|---|---|
| Size | 10.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
75e8bd4822945c19a4c8793be83acbbf88c3e0fdb51b8c335b34c379bfe47255
|
|
BLAKE2b-256 checksum How to use checksums |
02f4bc2e19203230a1df464e40b57dca26d7fd66af8db64d94b204b4730f8f6d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for mcp-gdocs 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.