Get the FREE Ultimate OpenClaw Setup Guide →

Google-Workspace

🧠🤖 MCP-compliant AI agent server in TypeScript 🚀 — Extend Claude & others with 📊 Google Drive, Sheets, Docs superpowers! Pre-built executables available for easy installation

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio chayan-1906-google-workspace-mcp node dist/server.js \
  --env OAUTH_SCOPES="Required Google APIs scopes (e.g., https://www.googleapis.com/auth/drive, https://www.googleapis.com/auth/spreadsheets, https://www.googleapis.com/auth/documes)" \
  --env GOOGLE_CLIENT_ID="Your Google Cloud OAuth Client ID" \
  --env OAUTH_CALLBACK_URL="Your OAuth redirect/callback URL" \
  --env GOOGLE_CLIENT_SECRET="Your Google Cloud OAuth Client Secret" \
  --env GOOGLE_DELEGATE_ACCOUNTS="Optional: delegate user accounts"

How to use

This Google Workspace MCP Server provides a TypeScript-based integration that exposes 76 tools to AI agents for automating Google Drive, Sheets, and Docs operations. The server is OAuth 2.0 authenticated and validates inputs with Zod to ensure type safety. After starting, you can query and execute tools through the MCP interface, enabling agents like Claude to perform tasks such as creating documents, managing folders, manipulating spreadsheets, and reading or updating file metadata within a Google Workspace tenant. The included toolset spans profile data, Google Drive file and folder operations, spreadsheet management, and Docs handling, making it possible to automate end-to-end workflows—from generating a structured report in Docs to updating a complex workbook in Sheets, all driven by natural language intents expressed to the MCP server.

How to install

Prerequisites: Node.js (LTS) and npm installed on your machine; access to a Google Cloud project with OAuth 2.0 credentials configured for Drive, Sheets, and Docs APIs; network access to Google APIs.

  1. Clone the repository:

    git clone https://github.com/chayan-1906/Google-Workspace-MCP.git cd Google-Workspace-MCP

  2. Install dependencies:

    npm install

  3. Configure OAuth credentials:

    • Create or use an existing Google Cloud project.
    • Enable Drive, Sheets, and Docs APIs.
    • Create OAuth 2.0 Client IDs and set the redirect URI to your deployed server's callback URL.
    • Collect the client ID and client secret and place them in your environment or configuration file as described in the User Guide linked in the repository.
  4. Run the server in development mode:

    npm run dev

    Optional: build and package for production:

    npm run package

  5. Verify the server starts and is reachable by your MCP client and that OAuth flow can be completed for a test account.

Additional notes

Tips and common issues:

  • Ensure OAuth credentials have the correct redirect URI configured and that the Google Cloud project has Drive, Sheets, and Docs APIs enabled.
  • Store sensitive credentials securely; use environment variables or a secrets manager as supported by your deployment target.
  • If you encounter scope or consent prompts, re-authenticate the account to refresh tokens.
  • For production deployments, consider containerization or a packaging step and review the dist/server.js entry point to ensure correct startup paths.
  • The MCP server exposes a broad toolkit; if you experience slow responses, check API quotas and enable batching or rate limiting as needed.
  • Environment variables such as GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, and OAUTH_CALLBACK_URL are essential for authentication and should be documented in your deployment configuration.

Related MCP Servers

Sponsor this space

Reach thousands of developers