Home / MCP / Google Workspace MCP Server
Provides access to Gmail, Calendar, Drive, and Contacts via an MCP server with OAuth 2.0 authentication.
Configuration
View docs{
"mcpServers": {
"google-workspace-mcp": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-p",
"8080:8080",
"-v",
"~/.mcp/google-workspace-mcp:/app/config",
"-v",
"~/Documents/workspace-mcp-files:/app/workspace",
"-e",
"GOOGLE_CLIENT_ID",
"-e",
"GOOGLE_CLIENT_SECRET",
"-e",
"LOG_MODE=strict",
"ghcr.io/aaronsb/google-workspace-mcp:latest"
],
"env": {
"GOOGLE_CLIENT_ID": "your-client-id.apps.googleusercontent.com",
"GOOGLE_CLIENT_SECRET": "your-client-secret",
"LOG_MODE": "strict"
}
}
}
}This MCP server lets you securely connect and manage your Google Workspace data from Gmail, Calendar, Drive, and Contacts through a single, unified interface. After you connect your account—via a quick OAuth flow—the server handles token management and keeps the connection active so you can focus on your work.
Once the server is running, you interact with it through your MCP client. You can authenticate Google accounts, list and switch between multiple accounts, and perform common tasks across Gmail, Calendar, Drive, and Contacts without leaving your workflow.
Prerequisites include having Docker installed on your machine.
1) Create the local configuration directory for the Google Workspace MCP server.
2) Run the MCP server using Docker with your Google OAuth credentials.
You will configure the MCP client to load the Google Workspace MCP server so you can authenticate and use the service.
{
"mcpServers": {
"google-workspace-mcp": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-p", "8080:8080",
"-v", "~/.mcp/google-workspace-mcp:/app/config",
"-v", "~/Documents/workspace-mcp-files:/app/workspace",
"-e", "GOOGLE_CLIENT_ID",
"-e", "GOOGLE_CLIENT_SECRET",
"-e", "LOG_MODE=strict",
"ghcr.io/aaronsb/google-workspace-mcp:latest"
],
"env": {
"GOOGLE_CLIENT_ID": "your-client-id.apps.googleusercontent.com",
"GOOGLE_CLIENT_SECRET": "your-client-secret"
}
}
}
}1) Restart your MCP client after configuration. 2) Ask your AI assistant to add your Google account. 3) Open the authorization URL, sign in to Google, grant permissions, and copy the authorization code back to complete authentication.
OAuth 2.0 flow is implemented to securely authorize your Google accounts and manage tokens. A dedicated callback server on localhost handles redirects, and multiple accounts can be stored with isolated tokens.
Your workspace keeps downloaded and uploaded Drive files organized by account. A central shared area holds temporary files used during transfers.
list_workspace_accounts, authenticate_workspace_account, remove_workspace_account manage and authenticate Google accounts in the MCP workspace.
search_workspace_emails, send_workspace_email, manage_workspace_draft, manage_workspace_label, manage_workspace_label_assignment, manage_workspace_label_filter, get_workspace_gmail_settings perform email-related tasks.
list_workspace_calendar_events, get_workspace_calendar_event, create_workspace_calendar_event, manage_workspace_calendar_event, delete_workspace_calendar_event manage events and invitations.
list_drive_files, search_drive_files, upload_drive_file, download_drive_file, delete_drive_file, create_drive_folder, update_drive_permissions manage Drive content and sharing.
get_workspace_contacts retrieve contact details.