Get the FREE Ultimate OpenClaw Setup Guide →

mcp -google-workspace

The most comprehensive MCP server for Google Workspace - Complete integration for Sheets, Docs, Calendar, Drive and more

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio alanse-inc-mcp-server-google-workspace node ./dist/index.js \
  --env CLIENT_ID="OAuth Client ID" \
  --env CLIENT_SECRET="OAuth Client Secret" \
  --env GWORKSPACE_CREDS_DIR="Path to Google credentials directory"

How to use

This MCP server provides programmatic access to a wide range of Google Workspace APIs, including Drive, Sheets, Docs, Gmail, Calendar, and Slides. It exposes 141 tools across these services, enabling you to search, read, create, update, and manage files and content, as well as perform batch operations and advanced actions like exporting, merging, and formatting. The server is designed to be controlled through the MCP interface, allowing you to automate workflows, build integrations, or create custom tooling that interacts with Google Workspace data. Start by authenticating with a Google Cloud project and enabling the necessary APIs, then connect to the server using the configured command so you can invoke the available tools from your applications or scripts.

How to install

Prerequisites:

  • Node.js and npm installed on your machine
  • Access to a Google Cloud project with Drive, Sheets, Docs, Gmail, Calendar, and Slides APIs enabled
  • A configured OAuth client (Desktop App) and credentials file
  1. Clone the repository or obtain the MCP server package for Google Workspace
  2. Install dependencies
npm install
  1. Build the server (choose one):
npm run build

or

npm run watch
  1. Prepare Google OAuth credentials:
  • Place your credentials JSON in a directory and set GWORKSPACE_CREDS_DIR to that path
  • Create a .env file in your project with CLIENT_ID and CLIENT_SECRET (and any other required configuration)
GWORKSPACE_CREDS_DIR=/path/to/credentials
CLIENT_ID=<CLIENT_ID>
CLIENT_SECRET=<CLIENT_SECRET>
  1. Run the server (authentication step will prompt you to sign in):
npx your-mcp-runner-command  // or the runtime command defined in mcp_config
  1. Access the MCP tools via your usual MCP client, ensuring the server is reachable at the configured entry point (dist/index.js in this setup).

Additional notes

Notes and tips:

  • Ensure you have the correct OAuth scopes enabled in your Google Cloud project (Drive, Sheets, Gmail, Presentations, etc.).
  • The server expects environment variables for credentials (CLIENT_ID, CLIENT_SECRET) and a credentials directory path (GWORKSPACE_CREDS_DIR).
  • Build artifacts are typically placed under dist/; the authentication flow runs via dist/index.js as shown in the README.
  • If you encounter authentication issues, verify that the OAuth client is of type Desktop App and that the redirected URI is allowed for installed applications.
  • For production deployments, consider mapping the mcp_config environment blocks to your container or orchestration system, and securely managing credentials and environment variables.
  • The server supports batch and advanced operations across all tool categories; refer to the tool documentation in the repository for specifics on each operation.

Related MCP Servers

Sponsor this space

Reach thousands of developers