Google Workspace MCP
Provides tools for interacting with Gmail: search and read messages, list and download attachments, send mail and replies (including 'send mail as' aliases), create drafts, manage labels, mark messages read/unread, and delete messages.
Provides tools for Google Workspace services — Calendar (list/create/update/delete/search events, free/busy lookup), Drive (search, read, upload, share, rename, move, delete files and folders), Docs and Sheets (create, read, append, write, replace text, manage tabs), Tasks (task lists and tasks), Forms (create forms, read forms and responses), and Keep (list, read, create notes).
Provides tools for creating and editing Google Slides presentations: read presentation contents, create new presentations, add slides with text, update slide text, and delete slides.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Google Workspace MCPsend an email to sarah@acme.com about tomorrow's 10am sync"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Google Workspace MCP
A Model Context Protocol server that exposes 55 tools across 9 Google Workspace services — Calendar, Gmail, Drive, Docs, Sheets, Slides, Tasks, Forms, and Keep.
Authentication uses a service account with domain-wide delegation, impersonating a Workspace user. No interactive OAuth flow is needed at runtime — ideal for headless agents and automation.
Tool inventory
Service | Tools | Examples |
Calendar (7) |
| Create/update events, free/busy lookup |
Gmail (11) |
| Full mail workflow incl. attachments & "Send mail as" aliases |
Drive (8) |
| Upload text via |
Docs (5) |
| |
Sheets (6) |
| |
Slides (5) |
| |
Tasks (7) |
| |
Forms (3) |
| |
Keep (3) |
|
Related MCP server: GAM MCP Server
Setup
1. Google Cloud service account + domain-wide delegation
This server impersonates a real Workspace user through a service account:
Create a GCP project and enable the APIs you need: Calendar, Gmail, Drive, Docs, Sheets, Slides, Tasks, Forms, Keep.
Create a service account and enable domain-wide delegation on it (copy its Client ID).
In Google Workspace Admin → Security → Access and data control → API controls → Domain-wide delegation, authorize the Client ID with these scopes:
https://www.googleapis.com/auth/calendar https://www.googleapis.com/auth/calendar.events https://www.googleapis.com/auth/gmail.modify https://www.googleapis.com/auth/gmail.send https://www.googleapis.com/auth/drive https://www.googleapis.com/auth/documents https://www.googleapis.com/auth/spreadsheets https://www.googleapis.com/auth/presentations https://www.googleapis.com/auth/forms.body https://www.googleapis.com/auth/keep https://www.googleapis.com/auth/tasksDownload the service account's JSON key.
Note: this auth model requires Google Workspace with admin access (domain-wide delegation). It does not work with consumer @gmail.com accounts.
2. Install
python3 -m venv .venv
.venv/bin/pip install -r requirements.txt3. Configure environment
Variable | Required | Description |
| yes* | Path to the service account key JSON. Defaults to |
| yes | The Workspace user to impersonate (e.g. |
Verify everything works:
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service_account.json
export WORKSPACE_USER_EMAIL=you@yourdomain.com
.venv/bin/python verify_access.py4. Wire up your MCP client
{
"mcpServers": {
"google-workspace": {
"command": "/path/to/google-workspace-mcp/.venv/bin/python",
"args": ["/path/to/google-workspace-mcp/workspace_mcp_server.py"],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "/path/to/service_account.json",
"WORKSPACE_USER_EMAIL": "you@yourdomain.com"
}
}
}
}Testing tools without a client
mcp_cli.py calls any tool over real MCP JSON-RPC:
.venv/bin/python mcp_cli.py list_calendars
.venv/bin/python mcp_cli.py upload_drive_file '{"file_name": "logo.psd", "local_path": "/tmp/logo.psd", "mime_type": "image/vnd.adobe.photoshop"}'Tests
.venv/bin/pytest tests/ -vtest_workspace_access.py makes live API calls and is skipped unless WORKSPACE_USER_EMAIL and a key file are configured.
Requirements
Python 3.10+. Deps: fastmcp, google-api-python-client, google-auth, google-auth-httplib2, google-auth-oauthlib (see requirements.txt).
License
MIT — see LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
Read and edit GA4, Search Console and Google Tag Manager from any MCP client. 29 tools.
Hosted MCP server with managed OAuth for 15+ toolkits: Google Workspace, Fitbit, Oura, Kalshi, etc.
Hosted MCP for Google Workspace, Atlassian and Notion: one OAuth, per-user accounts, write access.
MCP server connecting AI agents to 100+ apps (Gmail, Slack, Notion, GitHub) via one-click OAuth.
Related MCP Servers
- AlicenseBqualityDmaintenanceProduction-ready MCP server for Google Workspace providing broad coverage across Gmail, Drive, Calendar, Docs, Sheets, and more, with safe-by-default write operations and markdown-to-Google-Docs support.10047 PyPIMIT
- FlicenseAqualityDmaintenanceEnables Google Workspace administration (Directory, Gmail, Drive, Sheets) via MCP using Domain-Wide Delegation for secure, schema-validated tool operations.131-
- FlicenseNot gradedqualityBmaintenanceEnables AI assistants to access and manage Google Workspace services such as Gmail, Drive, Docs, Sheets, Calendar, and Slides through the MCP protocol, with built-in OAuth 2.0 authentication and read/write tool support.-
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to read, write, and manage Google Docs, Sheets, and Drive files through structured MCP tools using service-account authentication, without requiring an OAuth consent screen.MIT