Google Workspace MCP Server
Provides tools to search, send, reply to, draft, label, filter, and manage Gmail messages, attachments, and settings.
Provides tools to list calendars, create/update/delete events, manage attendees, and check free/busy availability.
Provides tools to create and edit documents, format text/paragraphs, manage tables, lists, tabs, comments, and Mermaid diagrams.
Provides tools to search, upload/download binary files, manage folders and permissions, and optionally sync with rclone.
Provides tools to create spreadsheets, read/write and format cells, create charts, merge cells, and apply conditional formatting.
Provides tools to create presentations and slides, format text, add images/text boxes, backgrounds, layouts, and bullet lists.
Provides tools to manage task lists, create/update/complete tasks, manage subtasks and due dates, and search across lists.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Google Workspace MCP Server
Connect Claude to Google Workspace APIs through the Model Context Protocol (MCP).
Features
116 MCP tools across 7 Google Workspace APIs:
Service | Tools | Capabilities |
Gmail | 27 | Search, send, reply, drafts, labels, filters, formatting, batch operations, attachments |
Calendar | 8 | List calendars, create/update/delete events, manage attendees, free/busy |
Drive | 17 | Search, upload/download binary files, folders, permissions, sync (rclone integration) |
Docs | 17 | Create, edit, format text/paragraphs, tables, lists, tabs, comments |
Sheets | 12 | Create, read, write, format cells, charts, merge, conditional formatting |
Slides | 21 | Create presentations, slides, format text, backgrounds, layouts |
Tasks | 13 | Task lists, create/update/complete tasks, subtasks, search |
Highlights
Full Gmail Management: Search with advanced queries, send/reply with file attachments, organize with labels, filters, rich HTML formatting, batch operations
Binary File Transfer: Upload any file type to Drive via local path; download Drive files and Gmail attachments to disk
Calendar Integration: Create events with attendees, manage multiple calendars, handle timezones, check availability
Drive Operations: Search files, manage folders, permissions, upload/download with optional rclone sync
Google Docs: Create and edit documents, rich text formatting, tables, lists, tabs, comments, Mermaid diagrams
Google Sheets: Create spreadsheets, format cells, charts, conditional formatting, merge cells, number formats
Google Slides: Create presentations, format text, add images/text boxes, backgrounds, layouts, bullet lists
Tasks API: Full task management with lists, subtasks, due dates, and cross-list search
Binary File Transfer (v0.3.0)
Work with any file type — not just text:
# Upload a JPEG to Drive
upload_drive_file(local_path="/path/to/photo.jpg", parent_id="<folder-id>")
# Download a Drive file to disk (PDF, image, etc.)
get_drive_file_content(file_id="<id>", save_path="/tmp/report.pdf")
# Send an email with attachments
send_email(to="...", subject="...", body="...", attachments=["/path/to/file.pdf"])
# List attachments in a received email
get_gmail_message_content(message_id="<id>")
# → response includes: attachments: [{filename, mimeType, size, attachmentId}, ...]
# Download a Gmail attachment
download_gmail_attachment(message_id="<id>", attachment_id="<att-id>", save_path="/tmp/file.pdf")Formatting Capabilities
Rich Text Formatting: Apply bold, italic, underline, colors, fonts across Docs, Slides, and Gmail
Advanced Cell Formatting: Background colors, borders, number formats, conditional formatting in Sheets
Professional Presentations: Custom layouts, formatted text boxes, backgrounds, and bullet lists in Slides
HTML Email Creation: Rich formatting for professional email communications
Related MCP server: Google Workspace MCP Server
Installation
pip install gworkspace-mcpOr with uv:
uv pip install gworkspace-mcpFor development:
git clone https://github.com/masapasa/google-workspace-mcp.git
cd google-workspace-mcp
pip install -e ".[dev]"Quick Start
1. Set Up Google Cloud Credentials
Go to Google Cloud Console
Create a new project or select an existing one
Enable the following APIs:
Gmail API
Google Calendar API
Google Drive API
Google Docs API
Google Sheets API
Google Slides API
Google Tasks API
Create OAuth 2.0 credentials (Desktop application)
Download and note your Client ID and Client Secret
2. Authenticate
# Set your credentials
export GOOGLE_OAUTH_CLIENT_ID='your-client-id'
export GOOGLE_OAUTH_CLIENT_SECRET='your-client-secret' # pragma: allowlist secret
# Run OAuth flow (opens browser)
workspace setup
# Verify authentication
workspace doctor3. Start MCP Server
workspace mcp4. Connect to Claude Desktop
Add to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"google-workspace": {
"command": "workspace",
"args": ["mcp"],
"env": {
"GOOGLE_OAUTH_CLIENT_ID": "your-client-id",
"GOOGLE_OAUTH_CLIENT_SECRET": "your-client-secret" // pragma: allowlist secret
}
}
}
}Restart Claude Desktop to activate.
Multi-Account Support
Multiple Google accounts can be configured as named profiles, letting you switch between personal and work accounts without re-authenticating.
Setting Up Multiple Accounts
# Set up a named profile (opens browser for each account)
workspace setup --account personal@gmail.com
workspace setup --account work@company.com
# List all configured profiles
workspace accounts list
# Switch the default profile
workspace accounts default work@company.com
# Remove a profile
workspace accounts remove personal@gmail.com
# Check authentication status for a specific account
workspace doctor --account work@company.comUsing Accounts Per Tool Call
Every MCP tool accepts an optional account parameter:
search_gmail_messages(query="budget", account="work@company.com")
get_events(calendar_id="primary", account="personal@gmail.com")Account Resolution Order
When account is not specified, the server selects the account in this order:
accountparameter in the tool call (explicit, highest priority)GWORKSPACE_ACCOUNTenvironment variable (session-wide override)Default profile set via
workspace accounts defaultFallback to
"gworkspace-mcp"(backward compatible with existing tokens)
Session-Wide Account Override
Set GWORKSPACE_ACCOUNT to make all tool calls in a session use a specific account without passing account each time:
export GWORKSPACE_ACCOUNT=work@company.com
workspace mcpListing Configured Accounts
The list_accounts MCP tool returns all configured profiles:
list_accounts()
# → [{email, is_default, created_at}, ...]Storage Format
All profiles are stored in ~/.gworkspace-mcp/tokens.json. The format is backward compatible — existing single-account tokens continue to work without any changes:
{
"gworkspace-mcp": { ... },
"work@company.com": { ... },
"personal@gmail.com": { ... }
}Authentication
OAuth 2.0 Flow
This server uses OAuth 2.0 for secure authentication with Google APIs. The authentication flow:
workspace setupopens your browser for Google consentYou authorize access to Gmail, Calendar, Drive, Docs, Sheets, Slides, and Tasks
Tokens are securely stored locally
Tokens auto-refresh when expired
Required Scopes
The server requests the following OAuth scopes:
Scope | Purpose |
| Read, send, and organize Gmail |
| Full calendar access |
| Full Drive access |
| Read and write Google Docs |
| Read and write Google Sheets |
| Read and write Google Slides |
| Full Tasks access |
Token Storage
Tokens are stored at: ~/.gworkspace-mcp/tokens.json
This file contains your OAuth tokens. Keep it secure and do not share it.
Available Tools
Gmail (26 tools)
Tool | Description |
| Search messages with Gmail query syntax |
| Get full message content by ID |
| Send a new email |
| Reply to an existing thread |
| Save email as draft |
| List all labels (system and custom) |
| Create a custom label |
| Delete a custom label |
| Add/remove labels from a message |
| Archive a message (remove from inbox) |
| Move message to trash |
| Restore message from trash |
| Mark message as read |
| Mark message as unread |
| Add star to message |
| Remove star from message |
| Bulk add/remove labels |
| Bulk archive messages |
| Bulk trash messages |
| Bulk mark as read |
| Permanently delete messages (caution!) |
| Format email content with HTML styling |
| Set Gmail signature with formatting |
| Create rich HTML emails with formatting |
| List all Gmail filters |
| Create new Gmail filter |
| Delete Gmail filter |
| Get vacation auto-responder settings |
| Configure vacation auto-responder |
Calendar (8 tools)
Tool | Description |
| List all accessible calendars |
| Create a new calendar |
| Update calendar properties |
| Delete a calendar |
| Get events within a time range |
| Create a new event |
| Update an existing event |
| Delete an event |
| Check availability for attendees |
Drive (17 tools)
Tool | Description |
| Search files with Drive query syntax |
| Get file content (text files) |
| Create a new folder |
| Upload a text file |
| Delete a file or folder |
| Move file to different folder |
| List folder contents |
| Download folder to local filesystem |
| Upload local folder to Drive |
| Sync between local and Drive |
*Requires rclone to be installed
Sheets (12 tools)
Tool | Description |
| Create a new Google Spreadsheet |
| Get spreadsheet metadata and structure |
| List all sheets in a spreadsheet |
| Get values from a specific sheet/range |
| Update specific cells with new values |
| Append rows to end of sheet data |
| Clear values from a range |
| Apply formatting (colors, fonts, borders) |
| Set number formats (currency, percentage, date) |
| Merge cells across ranges |
| Adjust column widths |
| Create charts (bar, line, pie) from data |
Slides (21 tools)
Tool | Description |
| Create a new Google Slides presentation |
| Get presentation metadata and structure |
| List accessible presentations |
| Extract all text from presentation |
| Get specific slide content |
| Add new slide with layout |
| Delete a slide |
| Update text in slide shapes |
| Apply text formatting to slide content |
| Add text box with custom formatting |
| Add basic text box to slide |
| Set slide background color or image |
| Create slide with bulleted list |
| Apply predefined layout to slide |
| Add image from URL to slide |
Docs (17 tools)
Tool | Description |
| Create a new Google Doc |
| Get document content and structure |
| Append text to a document |
| Convert Markdown to Google Doc |
| List all comments on a document |
| Add a comment to a document |
| Reply to an existing comment |
| List all tabs in a document |
| Get content from a specific tab |
| Create a new tab |
| Update tab title or icon |
| Move tab to new position |
| Render Mermaid diagram and insert into doc |
| Apply text formatting (bold, italic, colors, fonts) |
| Apply paragraph formatting (alignment, spacing) |
| Create bulleted or numbered lists |
| Insert tables with custom dimensions |
| Apply heading styles (H1, H2, etc.) |
| Configure document margins |
| Publish markdown content as Google Doc |
Accounts (1 tool)
Tool | Description |
| List all configured profiles with email, is_default, and created_at |
Tasks (13 tools)
Tool | Description |
| List all task lists |
| Get a specific task list |
| Create a new task list |
| Update task list title |
| Delete a task list |
| List tasks in a list |
| Get a specific task |
| Search tasks across all lists |
| Create a new task |
| Update task details |
| Mark task as completed |
| Delete a task |
| Move task or make it a subtask |
CLI Commands
# Authenticate with Google (default profile)
workspace setup
# Authenticate a named profile
workspace setup --account NAME
# Check authentication status and dependencies
workspace doctor
# Check status for a specific account
workspace doctor --account NAME
# Manage named profiles
workspace accounts list # show all profiles with default marker
workspace accounts default NAME # switch the default profile
workspace accounts remove NAME # remove a profile
# Start the MCP server (for Claude Desktop)
workspace mcp
# Show version
workspace --version
# Show help
workspace --helpDocumentation
For detailed documentation, see the docs/ directory:
Getting Started - Installation, authentication, quickstart
User Guides - Claude Desktop integration, CLI reference
API Reference - Complete tool documentation for all 116 tools
Development - Contributing, testing, releasing
Development
# Clone and install
git clone https://github.com/masapasa/google-workspace-mcp.git
cd google-workspace-mcp
pip install -e ".[dev]"
# Run tests
pytest
# Code quality
ruff format src tests && ruff check src tests && mypy srcSee Contributing Guide for full development setup.
Requirements
Python: 3.10 or higher
Google Cloud Project: With Workspace APIs enabled
OAuth 2.0 Credentials: Desktop application type
Optional: rclone for Drive sync features (4 tools)
Optional: pandoc for Markdown to Docs conversion
Optional: @mermaid-js/mermaid-cli for Mermaid diagrams
Troubleshooting
"Not authenticated" error
Run workspace setup to authenticate, or check status with workspace doctor.
Token refresh failing
Delete ~/.gworkspace-mcp/tokens.json and run workspace setup again.
Missing rclone tools
The 4 rclone-based tools (list_drive_contents, download_drive_folder, upload_to_drive, sync_drive_folder) require rclone to be installed. Install from rclone.org.
Claude Desktop not seeing tools
Ensure the config file path is correct for your OS
Restart Claude Desktop after config changes
Check that
workspace mcpruns without errors
License
MIT License - See LICENSE file for details.
Contributing
Contributions are welcome! Please:
Fork the repository
Create a feature branch
Make your changes
Run tests and linting
Submit a pull request
Links
Repository: https://github.com/masapasa/google-workspace-mcp
Issues: https://github.com/masapasa/google-workspace-mcp/issues
Acknowledgments
Extracted from claude-mpm - Multi-agent project manager with MCP server integrations.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Multiple Google accounts (Gmail, Calendar, Drive, Contacts, Tasks) in one Claude connector.
Multiple Google accounts (Gmail, Calendar, Drive, Contacts, Tasks) in one Claude connector.
Permissioned access to Gmail, Drive and Calendar via the user's own Google account
Give Claude only the Google Drive files you choose. Every action logged.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceEnables Claude to interact with Google Workspace services including Gmail, Drive, Sheets, Docs, and Calendar. Provides comprehensive tools for reading, creating, and managing emails, files, spreadsheets, documents, and calendar events with built-in safety controls and audit logging.-
- AlicenseNot gradedqualityNot gradedmaintenanceA comprehensive integration providing 114 tools to manage Google Drive, Docs, Sheets, Slides, Gmail, Calendar, and more through the Model Context Protocol. It enables seamless interaction with the full Google Workspace suite for file management, communication, and scheduling directly within Claude.-
- AlicenseNot gradedqualityDmaintenanceEnables interaction with Google Workspace services (Gmail, Calendar, Drive, Docs, Sheets, Chat, Slides, People) through natural language using Claude Desktop, Claude Code CLI, and other MCP clients.379 npm3MIT
- AlicenseNot gradedqualityDmaintenanceEnables Claude to manage Gmail, Google Calendar, and Google Drive, including sending emails, scheduling meetings, and organizing files, with integrated workflows.5MIT