Get the FREE Ultimate OpenClaw Setup Guide →

google-workspace -with-script

MCP server from AnkitOhlan/google-workspace-mcp-with-script

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio ankitohlan-google-workspace-mcp-with-script node server.js \
  --env CLAUDE_API_KEY="your Claude Code CLI API key" \
  --env GOOGLE_DELEGATE="optional-delegate-email" \
  --env GOOGLE_CLIENT_ID="your-google-client-id" \
  --env GOOGLE_CLIENT_SECRET="your-google-client-secret"

How to use

This MCP server integrates Google Workspace capabilities with Claude Code CLI, enabling you to automate and manage Docs, Sheets, Drive, Gmail, Calendar, and Apps Script from your workflow. Once the server is running, you can connect Claude Code CLI to the MCP endpoint to issue commands that read, create, or modify Google Workspace resources. The included script-based tooling abstracts authentication and API calls, so you can focus on building automations and integrations.

With the tools exposed by this MCP, you can edit documents in Google Docs, manipulate spreadsheets in Sheets, manage files in Drive, send and read Gmail messages, schedule and adjust events in Calendar, and automate tasks via Apps Script. The deployment is designed to work as a pass-through layer between Claude Code CLI and Google Workspace APIs, providing a unified interface for common operations across multiple Google services.

How to install

Prerequisites:

  • Node.js (v14 or newer) installed on your system
  • npm or yarn for package installation
  • A Google Cloud project with OAuth credentials for a desktop or web application
  • Claude Code CLI access and API key if required by your setup

Installation steps:

  1. Download and extract the MCP package (zip) from the project repository or release page.
  2. Open a terminal and navigate to the extracted folder.
  3. Install dependencies:
    • npm install
    • or yarn install
  4. Create or configure environment variables for Google OAuth and Claude integration. Example:
    • GOOGLED_CLIENT_ID=your-client-id
    • GOOGLE_CLIENT_SECRET=your-client-secret
    • CLAUDE_API_KEY=your-claude-api-key
  5. Start the MCP server:
    • npm run start
    • or node server.js
  6. Verify the server is listening on the expected port (default 3000 or as configured).
  7. In Claude Code CLI, point to the MCP endpoint and authorize with the provided OAuth flow if prompted.

Additional notes

Notes and tips:

  • Ensure Google API scopes include Drive, Docs, Sheets, Gmail, Calendar, and Admin SDK if required by your workflows.
  • Set up OAuth credentials with the appropriate redirect URIs for local development and production as needed.
  • If you encounter authentication issues, re-run the OAuth flow to refresh tokens.
  • You can customize the environment variables to tailor how the MCP interacts with Google Workspace and Claude Code CLI.
  • Check firewall settings to ensure the MCP server can be reached by Claude Code CLI and any cloud-based components.
  • Review rate limits for Google APIs and implement backoff logic in your automations if you plan high-frequency requests.

Related MCP Servers

Sponsor this space

Reach thousands of developers