home / mcp / google workspace mcp server
A production-ready MCP server that integrates Google Workspace services with multi-user OAuth 2.1 support for automation and AI-assisted tooling.
Configuration
View docs{
"mcpServers": {
"taylorwilsdon-google_workspace_mcp": {
"url": "http://localhost:8000/mcp",
"headers": {
"USER_GOOGLE_EMAIL": "[email protected]",
"GOOGLE_PSE_API_KEY": "AIza...",
"MCP_ENABLE_OAUTH21": "true",
"WORKSPACE_MCP_PORT": "8000",
"GOOGLE_PSE_ENGINE_ID": "0123456789",
"GOOGLE_OAUTH_CLIENT_ID": "your-client-id",
"WORKSPACE_EXTERNAL_URL": "https://your-domain.com",
"WORKSPACE_MCP_BASE_URI": "http://localhost",
"EXTERNAL_OAUTH21_PROVIDER": "true",
"GOOGLE_OAUTH_REDIRECT_URI": "https://your-domain.com/oauth2callback",
"GOOGLE_OAUTH_CLIENT_SECRET": "your-client-secret",
"OAUTHLIB_INSECURE_TRANSPORT": "1",
"WORKSPACE_MCP_STATELESS_MODE": "true"
}
}
}
}You can run and integrate Google Workspace services through a dedicated MCP server that exposes Google Calendar, Drive, Gmail, Docs, Sheets, Slides, Forms, Tasks, and Chat APIs to your applications. It supports single-user and multi-user authentication, plus flexible tool loading and OAuth 2.1 bearer token flows for secure, scalable usage across clients.
Start by selecting the startup method that fits your environment. For quick local testing, run the server with standard Python tooling and load the specific Google Workspace tools you need. For development or multi-user deployments, you can enable OAuth 2.1 and run the server in a transport mode suitable for your frontend.
Prerequisites include Python 3.10 or newer and a runtime like uvx for instant installation or uv for development. You also need a Google Cloud Project with OAuth 2.0 credentials enabled for the Google Workspace APIs you plan to use.
Step-by-step commands to get started locally:
# Prerequisites
# Ensure Python 3.10+ is installed
# Install uvx (or use uv in development)
# Configure credentials (examples shown; replace with real values)
export GOOGLE_OAUTH_CLIENT_ID="your-client-id"
export GOOGLE_OAUTH_CLIENT_SECRET="your-secret"
# Start the server (core tooling)
uv run main.py --tools gmail drive calendar
# Alternative single-tool start (example):
uv run main.py --tools docs sheetsYou can also run the server through a higher-level orchestrator (uvx) to specify tool tiers or multiple tools at once. For example:
- Start with core tools only
- Start with core + extended features
- Start with all available tools
If you plan to expose the server behind a reverse proxy, consider setting external URLs so OAuth endpoints are reachable from clients using the public domain.OAuth 2.1 bearer token support enables multi-user sessions and bearer-based authentication. To enable OAuth 2.1, set MCP_ENABLE_OAUTH21 to true and start the server in a transport mode that supports HTTP-based clients if needed. You can also opt into external OAuth providers or stateless container-friendly modes for deployment.
Store credentials securely and avoid embedding secret values in source control. Use environment variables or dedicated secret stores. When operating in stateless mode, remember that tokens are handled per request and no persistent state is stored on disk.
List accessible calendars for a user or account in the Calendar service.
Retrieve events within a specified time range from calendars.
Create events with options for attachments and reminders.
Update properties of existing calendar events.
Remove events from calendars.
Search Google Drive files using query syntax.
Read contents of Drive files, including Office formats.
Get a download URL for a Drive file.
Create new files in Drive or fetch from external URLs.
Share a Drive file with users, groups, or make it public.
Obtain a public or shareable link for a Drive file.
List items within a Drive folder.
Update metadata or move files between folders.
Share multiple files with several recipients in a batch operation.
Modify file permission roles.
Revoke access to a Drive file.
Transfer file ownership to another user.
Retrieve detailed permissions for a Drive file.
Check if a Drive file is publicly accessible.
Search Gmail messages using advanced operators.
Retrieve content of a Gmail message.
Batch retrieve content for multiple messages.
Send an email via Gmail.
Retrieve full thread content.
Modify labels on Gmail messages.
List available Gmail labels.
Create, update, or delete Gmail labels.
Create email drafts in Gmail.
Batch retrieve thread content.
Batch modify labels on multiple messages.
Initialize Google authentication flow.
Extract text from Google Docs.
Create new Google Docs.
Modify text within a Google Doc.
Find documents by name or content.
Find and replace text within documents.
List documents in a Drive/Docs folder.
Insert tables, lists, or pages into Docs.
Insert images into Docs from Drive or URLs.
Modify headers and footers in Docs.
Execute multiple operations in a single call.
Analyze document structure and metadata.
Export Docs to PDF.
Create tables populated with data in Docs.
Diagnose table structure issues in Docs.
Read, reply, create, or resolve comments in Docs.
Read cell ranges in Google Sheets.
Write, update, or clear cells in Sheets.
Create new Google Sheets files.
List accessible spreadsheets.
Get metadata for a spreadsheet.
Add new sheets to an existing spreadsheet.
Read, create, reply, or resolve comments on sheets.
Create new Google Slides presentations.
Retrieve presentation details.
Apply multiple updates to a presentation.
Get information about a specific slide.
Generate a thumbnail for a slide.
Read, create, reply, or resolve comments on presentations.
Create new Google Forms.
Retrieve form details and access URLs.
Configure form publish settings.
Retrieve individual form responses.
List all form responses with pagination.
List Google Tasks with filtering.
Retrieve details for a Google Task.
Create tasks with hierarchical structure.
Modify task properties.
Remove tasks.
Reposition tasks to re-order lists.
Hide or clear completed tasks.
List/get/create/update/delete task lists.
List Google Chat spaces.
Retrieve messages from a chat space.
Send a message to a chat space.
Search across chat history.
Perform web searches via Custom Search API.
Retrieve metadata for the search engine.
Search within specific sites or domains.
List Apps Script projects.
Get a full Apps Script project.
Retrieve a script file's content.
Create a new Apps Script project.
Update Apps Script project files.
Execute a function in Apps Script with parameters.
Create a new Apps Script deployment.
List deployments for a project.
Update deployment configuration.
Remove a deployment.
View recent script executions and status.