by dguido
Provides Claude access to Google Drive, Docs, Sheets, Slides, Calendar, Gmail, and Contacts via an MCP server.
Enables Claude (or other LLMs) to interact directly with Google Workspace services—Drive, Docs, Sheets, Slides, Calendar, Gmail, and Contacts—through a local Model Context Protocol (MCP) server, allowing natural‑language commands to create, read, update, and organize workspace data.
npx @dguido/google-workspace-mcp with the appropriate environment variables.~/.config/google-workspace-mcp).GOOGLE_WORKSPACE_SERVICES to limit OAuth scopes and reduce permission surface.~/.config/google-workspace-mcp/ as credentials.json and tokens.json (0600 permissions).GOOGLE_WORKSPACE_SERVICES to a comma‑separated list (e.g., drive,gmail,calendar). Re‑authenticate after changing the list.npx @dguido/google-workspace-mcp starts the server; add auth sub‑command (npx @dguido/google-workspace-mcp auth) to perform manual authentication.MCP server providing Claude access to Google Drive, Docs, Sheets, Slides, Calendar, Gmail, and Contacts.
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"google-workspace": {
"command": "npx",
"args": ["@dguido/google-workspace-mcp"],
"env": {
"GOOGLE_CLIENT_ID": "YOUR_CLIENT_ID.apps.googleusercontent.com",
"GOOGLE_CLIENT_SECRET": "YOUR_CLIENT_SECRET",
"GOOGLE_WORKSPACE_SERVICES": "drive,gmail,calendar"
}
}
}
}
That's it. On first tool call, a browser window opens for Google OAuth consent. Tokens are saved automatically.
Download the credentials JSON from Google Cloud Console and save to ~/.config/google-workspace-mcp/credentials.json, then authenticate manually:
npx @dguido/google-workspace-mcp auth
See Advanced Configuration for file-based setup, named profiles, and multi-account setup.
Create a Google Doc called "Project Plan" in /Work/Projects with an outline for Q1.
Search for files containing "budget" and organize them into the Finance folder.
Create a presentation called "Product Roadmap" with slides for Q1 milestones.
drive.file, documents, spreadsheets, presentations, drive, drive.readonly, calendar, gmail.modify, gmail.labels, contactsBoth credentials and tokens are stored in ~/.config/google-workspace-mcp/ by default:
| File | Default Path |
|---|---|
| OAuth credentials | ~/.config/google-workspace-mcp/credentials.json |
| Auth tokens | ~/.config/google-workspace-mcp/tokens.json |
| Variable | Description |
|---|---|
GOOGLE_CLIENT_ID |
OAuth Client ID (simplest setup — no credentials file needed) |
GOOGLE_CLIENT_SECRET |
OAuth Client Secret (used with GOOGLE_CLIENT_ID) |
GOOGLE_WORKSPACE_MCP_TOKEN_PATH |
Custom token storage location |
GOOGLE_WORKSPACE_MCP_PROFILE |
Named profile for credential isolation |
GOOGLE_WORKSPACE_SERVICES |
Comma-separated list of services to enable |
For LLM-optimized responses that reduce token usage by 20-50%, enable TOON format:
{
"mcpServers": {
"google-workspace": {
"command": "npx",
"args": ["@dguido/google-workspace-mcp"],
"env": {
"GOOGLE_WORKSPACE_SERVICES": "drive,gmail,calendar",
"GOOGLE_WORKSPACE_TOON_FORMAT": "true"
}
}
}
}
TOON (Token-Oriented Object Notation) encodes structured responses more compactly than JSON by eliminating repeated field names. Savings are highest for list operations (calendars, events, emails, filters).
By default, we recommend enabling only the core services (drive,gmail,calendar) as shown in Quick Start. This provides file management, email, and calendar capabilities without the complexity of document editing tools.
To enable additional services, add them to GOOGLE_WORKSPACE_SERVICES:
{
"mcpServers": {
"google-workspace": {
"command": "npx",
"args": ["@dguido/google-workspace-mcp"],
"env": {
"GOOGLE_WORKSPACE_SERVICES": "drive,gmail,calendar,docs,sheets,slides"
}
}
}
}
Available services: drive, docs, sheets, slides, calendar, gmail, contacts
GOOGLE_WORKSPACE_SERVICES entirely to enable all servicescreate_file, update_file, get_file_content) require drive, docs, sheets, and slidesSee Advanced Configuration for named profiles, multi-account setup, and environment variables.
search listFolder createFolder createTextFile updateTextFile deleteItem renameItem moveItem copyFile getFileMetadata exportFile shareFile getSharing removePermission listRevisions restoreRevision downloadFile uploadFile getStorageQuota starFile resolveFilePath batchDelete batchRestore batchMove batchShare listTrash restoreFromTrash emptyTrash getFolderTree
createGoogleDoc updateGoogleDoc getGoogleDocContent appendToDoc insertTextInDoc deleteTextInDoc replaceTextInDoc formatGoogleDocRange
createGoogleSheet updateGoogleSheet getGoogleSheetContent formatGoogleSheetCells mergeGoogleSheetCells addGoogleSheetConditionalFormat sheetTabs
createGoogleSlides updateGoogleSlides getGoogleSlidesContent formatSlidesText formatSlidesShape formatSlideBackground createGoogleSlidesTextBox createGoogleSlidesShape slidesSpeakerNotes listSlidePages
listCalendars listEvents getEvent createEvent updateEvent deleteEvent findFreeTime
sendEmail draftEmail readEmail searchEmails deleteEmail modifyEmail downloadAttachment listLabels getOrCreateLabel updateLabel deleteLabel createFilter listFilters deleteFilter
listContacts getContact searchContacts createContact updateContact deleteContact
createFile updateFile getFileContent
Set GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET env vars in your MCP config, or save your credentials file to ~/.config/google-workspace-mcp/credentials.json.
Ensure credential type is "Desktop app" (not "Web application"). The server uses an ephemeral port assigned by the OS, so no specific ports need to be available.
Apps in "Testing" status expire tokens after 7 days. Re-authenticate:
rm ~/.config/google-workspace-mcp/tokens.json
npx @dguido/google-workspace-mcp auth
To avoid weekly re-authentication: Publish your OAuth app (see Avoiding Token Expiry below).
Enable the missing API in Google Cloud Console > APIs & Services > Library.
Revoke app access at Google Account Permissions, clear tokens, and re-authenticate.
OAuth apps in "Testing" status automatically expire tokens after 7 days. To avoid weekly re-authentication:
Note: Publishing makes your app available to any Google user, but since you control the OAuth credentials, only you can authenticate.
If you have a Google Workspace account:
Use get_status to check token age. Tokens older than 6 days show a warning automatically.
npm install
npm run build # Compile TypeScript
npm run check # typecheck + lint + format check
npm test # Run tests
See Contributing Guide for project structure and development workflow.
This project is a substantial rewrite of piotr-agier/google-drive-mcp, originally created by Piotr Agier.
MIT - See LICENSE file for details.
Please log in to share your review and rating for this MCP.
Explore related MCPs that share similar capabilities and solve comparable challenges
by modelcontextprotocol
A Model Context Protocol server for Git repository interaction and automation.
by zed-industries
A high‑performance, multiplayer code editor designed for speed and collaboration.
by modelcontextprotocol
Model Context Protocol Servers
by modelcontextprotocol
A Model Context Protocol server that provides time and timezone conversion capabilities.
by cline
An autonomous coding assistant that can create and edit files, execute terminal commands, and interact with a browser directly from your IDE, operating step‑by‑step with explicit user permission.
by upstash
Provides up-to-date, version‑specific library documentation and code examples directly inside LLM prompts, eliminating outdated information and hallucinated APIs.
by daytonaio
Provides a secure, elastic infrastructure that creates isolated sandboxes for running AI‑generated code with sub‑90 ms startup, unlimited persistence, and OCI/Docker compatibility.
by continuedev
Enables faster shipping of code by integrating continuous AI agents across IDEs, terminals, and CI pipelines, offering chat, edit, autocomplete, and customizable agent workflows.
by github
Connects AI tools directly to GitHub, enabling natural‑language interactions for repository browsing, issue and pull‑request management, CI/CD monitoring, code‑security analysis, and team collaboration.
{
"mcpServers": {
"google-workspace": {
"command": "npx",
"args": [
"@dguido/google-workspace-mcp"
],
"env": {
"GOOGLE_CLIENT_ID": "<YOUR_CLIENT_ID>",
"GOOGLE_CLIENT_SECRET": "<YOUR_CLIENT_SECRET>",
"GOOGLE_WORKSPACE_SERVICES": "drive,gmail,calendar"
}
}
}
}claude mcp add google-workspace npx @dguido/google-workspace-mcp