- Home
- MCP servers
- Google Docs
Google Docs
- other
0
GitHub Stars
other
Language
6 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"nickweedon-google-docs-mcp-docker": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-p",
"3000",
"-v",
"C:/path/to/google-docs-mcp/credentials:/workspace/credentials",
"-v",
"blob-storage:/mnt/blob-storage",
"-e",
"BLOB_STORAGE_ROOT=/mnt/blob-storage",
"-e",
"BLOB_STORAGE_MAX_SIZE_MB=100",
"-e",
"BLOB_STORAGE_TTL_HOURS=24",
"workspace-google-docs-mcp:latest"
],
"env": {
"BLOB_STORAGE_ROOT": "/mnt/blob-storage",
"BLOB_STORAGE_TTL_HOURS": "24",
"BLOB_STORAGE_MAX_SIZE_MB": "100"
}
}
}
}You can run the Google Docs MCP Server inside a Docker container to access and automate Google Docs and Drive from your MCP client. This setup provides tools for reading, editing, and organizing documents, plus smooth integration with your existing MCP workflows.
How to use
Use a MCP client to connect to the Google Docs MCP Server running in Docker. The server exposes a set of document operations you can perform in batches for faster results, manage comments, and interact with Google Drive to create folders, upload files, and link resources. You can invoke actions like reading documents, inserting text, applying formatting, inserting tables, and embedding images. When you operate through a client, you send requests to the MCP endpoint, which handles the corresponding document actions and returns results or confirmations.
How to install
Prerequisites you need before installation:
- Docker installed on your system
- Docker Compose installed
- A Google Account
- A Google Cloud Project with OAuth credentials
Step by step commands you will run to set up and start the server:
# Step 1: Obtain Google Cloud Credentials
# Create and configure a Google Cloud project, enable APIs, and create OAuth credentials
# Step 2: Configure Credentials
mkdir -p credentials
cp ~/Downloads/client_secret_*.json credentials/credentials.json
# Step 3: Build the Docker image
docker-compose build
# Step 4: Authenticate with Google (first-time setup)
# Create an empty token.json if it doesn’t exist
touch credentials/token.json
# Start the container to perform OAuth in a loopback flow
docker run -it --rm \
-p 3000 \
-v $(pwd)/credentials:/workspace/credentials \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
workspace-google-docs-mcp:latest
# After authentication completes, stop the container
Alternatively, start with Docker Compose to run the server in the background after authentication completes.
# Start the server in detached mode
docker-compose up -d
Additional content and guidance
Resource-based uploads let you share files between MCP servers via a shared blob storage volume. Other servers upload a blob and you reference it by a resource identifier to perform actions in Google Drive without transferring full file data through MCP.
Resource-based file uploads
Resource-based uploads enable efficient file sharing between MCP servers. You upload a file to a shared blob storage as a resource ID, and this server uses that ID to upload to Drive.
Example usage shows how another MCP server uploads a resource and this server processes it using a resource ID.
Bulk operations
You can perform multiple document operations in a single batched API call to improve performance. The bulk tool supports actions such as inserting text, deleting ranges, applying text and paragraph styles, inserting tables and page breaks, and inserting images from URLs.
Security and privacy
Never commit credentials.json or token.json to version control. Treat these files like passwords since they grant access to your Google account. Ensure proper access controls and keep them gitignored.
Known limitations
Markdown support relies on Google Drive API for import/export with its native parser. Images in markdown exports may appear as base64 data URLs, and full tab-specific exports aren’t supported. Ensure you have both Google Docs and Drive APIs enabled for full functionality.
Troubleshooting
If authentication fails or the container cannot start, check that credentials.json and token.json exist in credentials/, verify OAuth settings in Google Cloud Console, and review container logs for errors. Ensure port mappings and Docker socket access are configured as shown in the setup steps.
File structure and development notes
Key files and directories include credentials/, docker-compose.yml for production, and the source code under src/ for the MCP server. The server entry point is typically organized under a Python-based stack that handles OAuth and API endpoints for documents, comments, and drive interactions.
Claude Desktop integration
If you use Claude Desktop, ensure your Claude config includes the MCP server entry so the editor can connect to Google Docs via the Docker-based MCP server.
Available tools
read_documents
Read document content from Google Docs and export as text, JSON, or markdown using the Drive API export capabilities.
edit_documents
Insert, append, and delete text within Google Docs via the MCP endpoints.
format_text
Apply character styles (bold, italic, color, font) and paragraph styles (alignment, spacing) to document content.
manage_structure
Insert tables, page breaks, and images; manage document structure and layout.
handle_tabs
List and work with multi-tab documents in Google Docs.
bulk_update_google_doc
Execute multiple document operations in a single batched API call for faster performance.
list_comments
List comments on documents; supports adding, replying, resolving, and deleting.
drive_integration
List, search, and get document metadata; create folders; upload files and images.
upload_image_to_drive_from_resource
Upload an image to Drive using a resource identifier from shared blob storage.
upload_file_to_drive_from_resource
Upload any file to Drive using a resource identifier.
insert_image_from_resource
Insert an image into a document using a resource identifier.