google-workspace-mcp-advanced

google-workspace-mcp-advanced

Production-ready MCP server for Google Workspace providing broad coverage across Gmail, Drive, Calendar, Docs, Sheets, and more, with safe-by-default write operations and markdown-to-Google-Docs support.

Category
Visit Server

README

Google Workspace MCP Advanced

Production-ready MCP server for Google Workspace.

google-workspace-mcp-advanced gives MCP clients broad Google Workspace coverage with safe-by-default write operations, Markdown-to-Google-Docs support, and Drive sync workflows.

Why This Project

  • 11 service domains: Gmail, Drive, Calendar, Docs, Sheets, Chat, Forms, Slides, Tasks, Search, Apps Script
  • 100+ tools for read and write operations
  • Dry-run defaults for mutating operations
  • Strong Markdown rendering for Google Docs (kitchen-sink validated)
  • Persistent OAuth sessions and resilient auth storage

Quick Start

1. Install uv

# macOS (Homebrew)
brew install uv

# Windows (winget)
winget install --id=astral-sh.uv -e

# Windows (PowerShell installer)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

# Linux/macOS (official installer)
curl -LsSf https://astral.sh/uv/install.sh | sh

# Verify
uv --version

2. Run the MCP server from PyPI (recommended)

# Stable channel (latest release)
uvx google-workspace-mcp-advanced --transport stdio

# Pinned deterministic version (recommended for teams)
uvx google-workspace-mcp-advanced==1.0.10 --transport stdio

3. Add MCP client config

{
  "mcpServers": {
    "google-workspace": {
      "command": "uvx",
      "args": ["google-workspace-mcp-advanced==1.0.10", "--transport", "stdio"],
      "env": {
        "USER_GOOGLE_EMAIL": "your.email@company.com"
      }
    }
  }
}

4. Use client-specific setup guides

5. Authenticate on first run

  1. Start the server from your MCP client.
  2. Run any Google tool (for example, list calendars or list Drive files).
  3. In stdio mode (default), complete the device flow:
    • open the verification URL,
    • enter the user code,
    • retry your tool call.
    • if device flow is unsupported for your OAuth client type, the server falls back to callback flow automatically.
  4. In streamable-http, complete callback auth by opening the OAuth URL shown by the server.
    • for MCP-hosted/manual completion workflows, use complete_google_auth with the browser callback URL.
  5. Credentials are saved in ~/.config/google-workspace-mcp-advanced/credentials/.
  6. Legacy directory ~/.config/gws-mcp-advanced/ is still supported for migration.

Single-MCP Multi-Client Mode

Use one MCP entry with multiple OAuth clients (for example private + enterprise tenants) via:

  • auth_clients.json under WORKSPACE_MCP_CONFIG_DIR
  • deterministic routing by script_clients, account_clients, and domain_clients
  • setup tools: setup_google_auth_clients, import_google_auth_client
  • completion tool: complete_google_auth

Guide:

Local Development Mode

Use repository-local execution when building or testing unreleased changes.

{
  "mcpServers": {
    "google-workspace-dev": {
      "command": "uv",
      "args": [
        "run",
        "--project",
        "/path/to/google-workspace-mcp-advanced",
        "google-workspace-mcp-advanced",
        "--transport",
        "stdio"
      ],
      "env": {
        "USER_GOOGLE_EMAIL": "your.email@company.com"
      }
    }
  }
}

Service Coverage

Service Example Capabilities
Gmail search, read, draft, send, labels, filters
Drive search, read, upload, permissions, ownership transfer
Calendar list/create/modify/delete events
Docs create/update docs, markdown insertion, table and image handling
Sheets read/write ranges, formatting, conditional formatting
Chat list spaces, read/send messages
Forms create forms, read responses, update publish settings
Slides create presentations, batch updates
Tasks task lists and task lifecycle management
Search programmable search endpoint support
Apps Script project metadata/content, versions, deployments, processes, metrics, and safe-by-default mutators

Safety Model

  • Mutating tools default to dry_run=True.
  • You must pass dry_run=False to execute real changes.
  • This reduces accidental writes during assistant experimentation.

Common Runtime Commands

# Run locally from repo
uv run google-workspace-mcp-advanced --transport stdio

# HTTP transport
uv run google-workspace-mcp-advanced --transport streamable-http

# Single-user mode
uv run google-workspace-mcp-advanced --single-user

# Load specific service groups only
uv run google-workspace-mcp-advanced --tools gmail drive calendar

Required Environment Variables

Variable Required Description
USER_GOOGLE_EMAIL Yes Target Google account email
GOOGLE_OAUTH_CLIENT_ID Yes for legacy single-client mode OAuth client ID
GOOGLE_OAUTH_CLIENT_SECRET Yes for legacy single-client mode OAuth client secret
WORKSPACE_MCP_CONFIG_DIR No Config/credential directory override
WORKSPACE_MCP_AUTH_FLOW No Auth interaction mode: auto (default), device, or callback

Migration from Legacy Name

If you previously ran the project as gws-mcp-advanced, follow:

Documentation

Contributor docs live in AGENTS.md and agent-docs/.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured