JUHE API Marketplace
aaronsb avatar
MCP Server

Google Workspace MCP Server

Provides authenticated access to Google Workspace APIs with a focus on Gmail operations and planned Calendar support, featuring secure OAuth authentication and multi-account management with detailed error handling.

128
GitHub Stars
3/16/2026
Last Updated
MCP Server Configuration
1{
2 "name": "google-workspace",
3 "command": "npx",
4 "args": [
5 "@aaronsb/google-workspace-mcp"
6 ],
7 "env": {
8 "GOOGLE_CLIENT_ID": "your-client-id",
9 "GOOGLE_CLIENT_SECRET": "your-client-secret"
10 }
11}
JSON11 lines
  1. Home
  2. MCP Servers
  3. google-workspace-mcp

README Documentation

Google Workspace MCP Server

An MCP server for Google Workspace that gives AI agents access to Gmail, Calendar, and Drive through a clean, operation-based interface with multi-account support.

Built on top of Google's official @googleworkspace/cli (gws) — all API coverage comes from Google's own tooling, dynamically discovered and always up to date.

What It Does

5 tools, 17 operations:

ToolOperationsDescription
manage_accountslist, authenticate, removeMulti-account management
manage_emailsearch, read, send, reply, triageGmail with search syntax
manage_calendarlist, agenda, create, get, deleteCalendar management
manage_drivesearch, upload, get, downloadDrive file operations
queue_operations—Chain operations with $N.field result references

Each response includes contextual next-steps guidance, helping agents discover follow-up actions naturally.

Install

npm install @aaronsb/google-workspace-mcp

Or run directly:

npx @aaronsb/google-workspace-mcp

This installs everything — the gws Rust CLI binary comes along as a dependency.

Prerequisites

  1. Node.js 18+

  2. Google Cloud OAuth credentials — create at console.cloud.google.com/apis/credentials:

    • Create an OAuth 2.0 Client ID (Desktop application)
    • Enable Gmail, Calendar, and Drive APIs
  3. Set environment variables:

    export GOOGLE_CLIENT_ID="your-client-id"
    export GOOGLE_CLIENT_SECRET="your-client-secret"
    

MCP Client Configuration

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "google-workspace": {
      "command": "npx",
      "args": ["@aaronsb/google-workspace-mcp"],
      "env": {
        "GOOGLE_CLIENT_ID": "your-client-id",
        "GOOGLE_CLIENT_SECRET": "your-client-secret"
      }
    }
  }
}

Claude Code

Add to .mcp.json:

{
  "mcpServers": {
    "google-workspace": {
      "command": "npx",
      "args": ["@aaronsb/google-workspace-mcp"],
      "env": {
        "GOOGLE_CLIENT_ID": "your-client-id",
        "GOOGLE_CLIENT_SECRET": "your-client-secret"
      }
    }
  }
}

Usage

Start by listing accounts:

manage_accounts { "operation": "list" }

Add an account (opens browser for OAuth):

manage_accounts { "operation": "authenticate" }

Then use any tool with your account email:

manage_email { "operation": "triage", "email": "you@gmail.com" }
manage_calendar { "operation": "agenda", "email": "you@gmail.com" }
manage_drive { "operation": "search", "email": "you@gmail.com", "query": "quarterly report" }

Queue Operations

Chain multiple operations in one call with result references:

{
  "operations": [
    { "tool": "manage_email", "args": { "operation": "search", "email": "you@gmail.com", "query": "from:boss subject:review" } },
    { "tool": "manage_calendar", "args": { "operation": "agenda", "email": "you@gmail.com" } }
  ]
}

Architecture

MCP Client → stdio → Server → Handler → gws CLI → Google APIs
                                  ↓
                          Account Registry (multi-account credential routing)
  • Executor — spawns gws as a subprocess with per-account credential routing
  • Credential bridge — exports from gws encrypted store to per-account files in XDG-compliant paths
  • Formatting — shapes raw API responses for AI context efficiency
  • Next-steps — contextual follow-up suggestions in every response

Data Storage

Follows XDG Base Directory Specification:

DataLocation
Account registry~/.config/google-workspace-mcp/accounts.json
Credentials~/.local/share/google-workspace-mcp/credentials/

Development

npm install
make build        # Compile TypeScript
make typecheck    # Type checking only
make test-unit    # Run unit tests (60 tests)
make test         # Same as test-unit

License

MIT

Quick Install

Quick Actions

View on GitHubView All Servers

Key Features

Model Context Protocol
Secure Communication
Real-time Updates
Open Source

Boost your projects with Wisdom Gate LLM API

Supporting GPT-5, Claude-4, DeepSeek v3, Gemini and more.

Enjoy a free trial and save 20%+ compared to official pricing.

Learn More
JUHE API Marketplace

Accelerate development, innovate faster, and transform your business with our comprehensive API ecosystem.

JUHE API VS

  • vs. RapidAPI
  • vs. API Layer
  • API Platforms 2025
  • API Marketplaces 2025
  • Best Alternatives to RapidAPI

For Developers

  • Console
  • Collections
  • Documentation
  • MCP Servers
  • Free APIs
  • Temp Mail Demo

Product

  • Browse APIs
  • Suggest an API
  • Wisdom Gate LLM
  • Global SMS Messaging
  • Temp Mail API

Company

  • What's New
  • Welcome
  • About Us
  • Contact Support
  • Terms of Service
  • Privacy Policy
Featured on Startup FameFeatured on Twelve ToolsFazier badgeJuheAPI Marketplace - Connect smarter, beyond APIs | Product Huntai tools code.marketDang.aiFeatured on ShowMeBestAI
Copyright © 2026 JUHEDATA HK LIMITED - All rights reserved