Google Workspace MCP Server
Provides tools for managing Gmail messages, drafts, labels, filters, forwarding, delegates, S/MIME, CSE, and mailbox settings.
Provides tools for managing Google Calendar events, recurring instances, free/busy queries, ACL, and calendar settings.
Provides tools for creating, reading, and updating Google Docs documents, including inserting text, tables, images, and batch updates.
Provides tools for Google Drive file management, including search, CRUD, upload/download, sharing, permissions, revisions, comments, and labels.
Provides tools for interacting with Google Sheets, including reading, writing, creating, appending, clearing, and managing data filters and developer metadata.
Provides tools for Google Slides presentations, including creating, reading, adding slides, inserting text, replacing text, and batch updates.
Provides tools for managing Google Tasks and task lists, including CRUD operations, completing tasks, moving/reordering, and clearing lists.
Click on "Install 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 MCP Serversend an email to john@example.com saying meeting tomorrow at 3pm"
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 Server
A Model Context Protocol (MCP) server providing 240 tools for Google Workspace: Gmail, Drive, Docs, Slides, Sheets, Calendar, Contacts, and Tasks.
Built with googleapis and @modelcontextprotocol/sdk.
Features
Service | Tools | Highlights |
Gmail | 75 | Send/read/reply/forward, drafts, labels, threads, attachments, filters, settings, S/MIME, CSE, delegates, watch, HTML link extraction |
Drive | 47 | Search, CRUD, upload/download, export, trash, share, permissions, revisions, comments, replies, shared drives, labels, access proposals |
Calendar | 30 | Events CRUD, search, quick add, import, recurring instances, free/busy, ACL, calendar management, watch, settings |
Sheets | 17 | Read, write, create, append, clear, batch operations, data filters, developer metadata, copy sheet |
Contacts | 22 | CRUD, batch operations, photos, contact groups, other contacts, directory search |
Tasks | 14 | Tasks and task lists CRUD, complete, move/reorder, clear |
Docs | 7 | Create, read, insert text/tables/images, batch update, find & replace |
Slides | 8 | Create, read, add slides, get page, thumbnails, insert text, replace text, batch update |
Related MCP server: google-connections-mcp
Prerequisites
Node.js 18+
A Google Cloud Platform project with OAuth 2.0 credentials (Desktop app type)
The following APIs enabled:
Gmail API
Google Drive API
Google Docs API
Google Slides API
Google Sheets API
Google Calendar API
People API (Contacts)
Tasks API
Quick Install
git clone https://github.com/salviz/google-mcp-server.git
cd google-mcp-server
npm installRegister with Claude Code
CLI:
claude mcp add google-workspace -- node /path/to/google-mcp-server/index.jsOr add to your MCP config (~/.claude/claude_desktop_config.json or .mcp.json):
{
"mcpServers": {
"google-workspace": {
"type": "stdio",
"command": "node",
"args": ["/path/to/google-mcp-server/index.js"],
"env": {
"GOOGLE_CLIENT_ID": "your-client-id.apps.googleusercontent.com",
"GOOGLE_CLIENT_SECRET": "your-client-secret",
"GOOGLE_TOKEN_PATH": "/path/to/credentials.json"
}
}
}
}Environment Variables
Variable | Required | Description |
| Yes | OAuth 2.0 client ID |
| Yes | OAuth 2.0 client secret |
| No | Path to token JSON file (default: |
| No | Google Secret Manager secret name for token fallback (default: |
Token File Format
{
"access_token": "ya29...",
"refresh_token": "1//...",
"token_type": "Bearer",
"expiry_date": 1700000000000
}The server automatically refreshes expired tokens and persists updates to disk. If Google Cloud Secret Manager is available, tokens are also stored there as a cross-session fallback.
Tools (240)
Gmail (75)
Tool | Description |
| Get Gmail profile info (email, messages/threads total, history ID) |
| Send a new email (plain text or HTML) |
| Read a message with full body text, HTML link extraction, and attachment info |
| Reply to a message (keeps thread) |
| Forward a message to another recipient |
| List recent messages |
| Search messages using Gmail query syntax |
| Mark a message as read |
| Mark a message as unread |
| Add or remove labels from a message |
| Move a message to trash |
| Remove a message from trash |
| Permanently delete a message |
| Modify labels on multiple messages at once |
| Permanently delete multiple messages |
| Insert a message directly into the mailbox |
| Import a message (similar to receiving via SMTP) |
| Download an attachment from a message |
| List message threads |
| Get all messages in a thread |
| Modify labels on a thread |
| Move a thread to trash |
| Restore a thread from trash |
| Permanently delete a thread |
| Create a new draft |
| List all drafts |
| Get a specific draft |
| Update an existing draft |
| Delete a draft |
| Send a draft |
| List all labels |
| Get a specific label |
| Create a new label |
| Update a label |
| Delete a label |
| List mailbox changes since a history ID |
| Get auto-forwarding settings |
| Update auto-forwarding settings |
| Get IMAP settings |
| Update IMAP settings |
| Get POP settings |
| Update POP settings |
| Get language settings |
| Update language settings |
| Get vacation responder settings |
| Update vacation responder settings |
| List send-as aliases |
| Get a send-as alias |
| Create a send-as alias |
| Update a send-as alias |
| Delete a send-as alias |
| Send verification for a send-as alias |
| List email filters |
| Get a specific filter |
| Create a new filter |
| Delete a filter |
| List forwarding addresses |
| Get a forwarding address |
| Create a forwarding address |
| Delete a forwarding address |
| List mail delegates |
| Get a mail delegate |
| Create a mail delegate |
| Delete a mail delegate |
| List S/MIME certificates |
| Get an S/MIME certificate |
| Insert an S/MIME certificate |
| Delete an S/MIME certificate |
| Set default S/MIME certificate |
| List CSE identities |
| Get a CSE identity |
| Create a CSE identity |
| Patch a CSE identity |
| Delete a CSE identity |
| List CSE key pairs |
| Get a CSE key pair |
| Create a CSE key pair |
| Enable a CSE key pair |
| Disable a CSE key pair |
| Permanently delete a CSE key pair |
| Set up push notifications via Pub/Sub |
| Stop push notifications |
Google Drive (47)
Tool | Description |
| Search files using Drive query syntax |
| Read file content (detects binary, suggests download) |
| List files in a folder |
| Get detailed file metadata |
| Create a new folder |
| Create a new text file |
| Update file name, content, or description |
| Permanently delete a file |
| Move a file to trash |
| Restore a file from trash |
| Copy a file |
| Move a file to a different folder |
| Share a file (user, group, domain, or anyone) |
| List sharing permissions |
| Get a specific permission |
| Update a sharing permission |
| Remove a sharing permission |
| Get storage quota and user info |
| Upload a binary file from local filesystem |
| Download a file to local filesystem |
| List comments on a file |
| Get a specific comment |
| Add a comment to a file |
| Update a comment |
| Delete a comment |
| Reply to a comment |
| List replies to a comment |
| Get a specific reply |
| Update a reply |
| Delete a reply |
| Export Google Workspace files (PDF, DOCX, CSV, etc.) |
| List file revision history |
| Get a specific revision |
| Update revision metadata |
| Delete a revision |
| Permanently empty all trash |
| Get starting page token for changes |
| List file changes since a page token |
| Watch a file for changes (webhook) |
| Watch for file changes (webhook) |
| Stop a watch channel |
| Generate file IDs for uploads |
| List labels on a file |
| Modify labels on a file |
| List access proposals for a file |
| Get a specific access proposal |
| Accept or deny an access proposal |
| List installed Drive apps |
| Get a specific Drive app |
| Get a long-running operation status |
| Create a shared drive |
| List shared drives |
| Get a shared drive |
| Update a shared drive |
| Hide a shared drive |
| Unhide a shared drive |
| Delete a shared drive |
Google Calendar (30)
Tool | Description |
| List upcoming events with optional time range |
| Search events by text |
| Create an event (supports all-day) |
| Update an existing event |
| Delete an event |
| Get detailed event info |
| Move event between calendars |
| Create event from natural language |
| Import an event by iCal UID |
| List instances of a recurring event |
| Check free/busy time for calendars |
| List all accessible calendars |
| Create a new calendar |
| Get calendar details |
| Update calendar properties |
| Delete a calendar |
| Clear all events from a calendar |
| Get calendar list entry |
| Update calendar list entry |
| Subscribe to a calendar |
| Unsubscribe from a calendar |
| List calendar access control rules |
| Get a specific ACL rule |
| Add an ACL rule |
| Update an ACL rule |
| Delete an ACL rule |
| Get available calendar/event colors |
| List all user settings |
| Get a specific setting |
| Watch ACL changes (webhook) |
| Watch event changes (webhook) |
| Watch calendar list changes (webhook) |
| Watch settings changes (webhook) |
| Stop a watch channel |
Google Sheets (17)
Tool | Description |
| Read data from a spreadsheet range |
| Write data to a range |
| Create a new spreadsheet |
| Append rows after existing data |
| Clear values from a range |
| Clear multiple ranges at once |
| Read multiple ranges at once |
| Structural operations (add sheets, merge cells, charts) |
| Write to multiple ranges at once |
| Get spreadsheet metadata |
| Copy a sheet to another spreadsheet |
| Get spreadsheet data using data filters |
| Get values using data filters |
| Update values using data filters |
| Clear ranges using data filters |
| Search developer metadata |
| Get developer metadata by ID |
Google Contacts (22)
Tool | Description |
| List contacts with optional search |
| Get a specific contact |
| Create a new contact |
| Update an existing contact |
| Delete a contact |
| Create multiple contacts at once |
| Update multiple contacts at once |
| Get multiple contacts at once |
| Delete multiple contacts at once |
| Upload a contact photo |
| Delete a contact photo |
| List contact groups |
| Create a contact group |
| Get a contact group |
| Update a contact group |
| Delete a contact group |
| Get multiple contact groups |
| Add or remove members from a group |
| List "other contacts" (auto-saved) |
| Search other contacts |
| Copy an other contact to my contacts |
| Search organization directory (Workspace) |
| List directory contacts (Workspace) |
Google Tasks (14)
Tool | Description |
| List all task lists |
| Get a specific task list |
| Create a new task list |
| Delete a task list |
| List tasks in a task list |
| Get a specific task |
| Create a new task |
| Update a task |
| Mark a task as completed |
| Delete a task |
| Move or reorder a task |
| Clear completed tasks from a list |
Google Docs (7)
Tool | Description |
| Create a new document with optional content and folder |
| Read full document content as plain text |
| Insert text at a position |
| Apply batch update requests |
| Insert a table |
| Insert an inline image from a URL |
| Find and replace text |
Google Slides (8)
Tool | Description |
| Create a new presentation |
| Read all slide content |
| Add a new slide |
| Get details of a specific slide |
| Generate a thumbnail image URL for a slide |
| Insert text into a shape or text box |
| Find and replace text across all slides |
| Apply batch update requests |
Setup Guide
1. Create a Google Cloud Project
Go to the Google Cloud Console and create or select a project.
2. Enable APIs
In APIs & Services > Library, enable: Gmail, Drive, Docs, Slides, Sheets, Calendar, People, and Tasks APIs.
3. Create OAuth 2.0 Credentials
Navigate to APIs & Services > Credentials
Click Create Credentials > OAuth client ID
Select Desktop app
Note the
client_idandclient_secret
4. Obtain Tokens
Use the included re-authorization helper:
GOOGLE_CLIENT_ID=your-client-id GOOGLE_CLIENT_SECRET=your-client-secret node reauth.jsThis starts a local server, opens an auth URL, and saves tokens after you authorize.
Required OAuth scopes:
https://www.googleapis.com/auth/gmail.modifyhttps://www.googleapis.com/auth/gmail.settings.basichttps://www.googleapis.com/auth/gmail.settings.sharinghttps://www.googleapis.com/auth/drivehttps://www.googleapis.com/auth/calendarhttps://www.googleapis.com/auth/contactshttps://www.googleapis.com/auth/taskshttps://www.googleapis.com/auth/documentshttps://www.googleapis.com/auth/spreadsheetshttps://www.googleapis.com/auth/presentations
5. Save Tokens
mkdir -p ~/.google-mcp
# Tokens are automatically saved to ~/.google-mcp/credentials.json by reauth.jsTesting
Run the comprehensive test suite (tests all 240 tools):
GOOGLE_CLIENT_ID=your-id GOOGLE_CLIENT_SECRET=your-secret node test-all.jsProject Structure
google-mcp-server/
index.js # Server entry point, registers all tool modules
auth.js # OAuth 2.0 client, token management, Secret Manager fallback
reauth.js # OAuth re-authorization helper
test-all.js # Comprehensive test suite for all 240 tools
tools/
gmail.js # 75 Gmail tools
drive.js # 47 Google Drive tools
docs.js # 7 Google Docs tools
slides.js # 8 Google Slides tools
calendar.js # 30 Google Calendar tools
extras.js # 36 tools: Contacts (22), Tasks (14), Sheets (17 - in sheets section)
package.jsonSecurity
No hardcoded credentials -- all secrets via environment variables
Tokens stored locally -- never transmitted except to Google's OAuth APIs
Automatic token refresh -- expired tokens refreshed silently
Secret Manager fallback -- optionally stores tokens in Google Cloud Secret Manager for resilience
Stdio transport only -- no network server exposed
Token file parsing wrapped in try-catch for resilience
Dependencies
Package | Purpose |
| MCP server framework |
| Official Google APIs client |
| Schema validation for tool parameters |
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/salviz/google-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server