Get the FREE Ultimate OpenClaw Setup Guide →

google-workspace

MCP server for Google Drive, Docs, Sheets, Slides, Calendar, Gmail, and Contacts

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio dguido-google-workspace-mcp npx @dguido/google-workspace-mcp \
  --env GOOGLE_CLIENT_ID="YOUR_CLIENT_ID.apps.googleusercontent.com" \
  --env GOOGLE_CLIENT_SECRET="YOUR_CLIENT_SECRET" \
  --env GOOGLE_WORKSPACE_SERVICES="drive,gmail,calendar"

How to use

This MCP server exposes Google Drive, Docs, Sheets, Slides, Calendar, Gmail, and Contacts to Claude via a unified set of tools. By default it enables core services (drive, gmail, calendar) and authenticates with OAuth using the provided client ID and secret. When you run the MCP, Claude can perform file operations, create and edit Google Docs/Sheets/Slides, manage calendar events, send emails, and manage contacts through a cohesive API surface. You can enable additional services by adjusting the GOOGLE_WORKSPACE_SERVICES environment variable and re-authenticating to obtain the corresponding OAuth scopes. The integration is designed to open a browser window for consent on first use and securely persist tokens for subsequent calls.

How to install

Prerequisites:

  • Node.js (recommended) with npm/yarn installed
  • Access to Google Cloud Console to create an OAuth client ID and secret

Installation steps:

  1. Install Node.js (if not already installed).
  2. Install or run the MCP package using npx (no global install required):
# Quick run without local install
npx @dguido/google-workspace-mcp
  1. Configure environment for OAuth:
  • Obtain a Google OAuth client ID and client secret from the Google Cloud Console.
  • Provide them via environment variables when launching the MCP:
export GOOGLE_CLIENT_ID=YOUR_CLIENT_ID.apps.googleusercontent.com
export GOOGLE_CLIENT_SECRET=YOUR_CLIENT_SECRET
export GOOGLE_WORKSPACE_SERVICES=drive,gmail,calendar
npx @dguido/google-workspace-mcp
  1. Alternative: use a JSON config file with Claude Desktop integration as shown in the Quick Start section of the README. Save credentials and tokens under the default path (~/.config/google-workspace-mcp/ by default).

  2. If needed, authenticate manually or via the provided auth command as described in the documentation:

npx @dguido/google-workspace-mcp auth

Additional notes

Notes and tips:

  • By default, only core services are enabled. To enable more services (docs, sheets, slides, contacts, etc.), add them to GOOGLE_WORKSPACE_SERVICES and re-authenticate to grant additional scopes.
  • Tokens and credentials are stored under ~/.config/google-workspace-mcp/ by default; you can customize the path with GOOGLE_WORKSPACE_MCP_TOKEN_PATH and related variables.
  • If you switch enabled services, you may need to re-authenticate to update granted scopes.
  • For token-efficient responses (TOON), you can enable a compact output mode by setting GOOGLE_WORKSPACE_TOON_FORMAT=true in the environment.
  • If you encounter OAuth credential not found or scope issues, ensure the OAuth consent screen and scopes include the required permissions for the selected services and re-authenticate.

Related MCP Servers

Sponsor this space

Reach thousands of developers