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.
| 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 |
- Headings (h1-h4)
- Bold, italic,
inline code - Bullet lists (nested)
- Tables with headers
- Links
- Python 3.10+
- Google Cloud project with these APIs enabled:
- OAuth 2.0 credentials (Desktop app type) — download from Google Cloud Console
# 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 .mkdir credentials
cp /path/to/your/client_secret.json credentials/client_secret.jsonpython -m mcp_gdocs.serverThis opens a browser for Google OAuth consent. After authorization, the token is cached in credentials/token.json.
claude mcp add mcp-gdocs -- /path/to/mcp-gdocs/.venv/Scripts/python -m mcp_gdocs.serverOr 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"
}
}
}
}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"
}
}
}
}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"
| 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 |
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)
- Python 3.10+
- MCP SDK — Model Context Protocol
- python-docx — DOCX generation
- mistune — Markdown parsing
- Google Drive API v3
MIT