Skip to main content
Glama
Google Workspace MCP Server

Google Workspace MCP Server

by aaronsb

MCP-сервер Google Workspace

Предоставьте ИИ-агентам полный доступ к Google Workspace — Gmail, Календарю, Диску и другим сервисам — через единый MCP-сервер, который управляет маршрутизацией учетных данных для нескольких аккаунтов, форматированием ответов для ИИ и контекстными подсказками.

Построен на базе официального CLI Google Workspace (gws), что означает, что покрытие API расширяется вместе с Google. Сервер использует фабрику на основе манифеста, которая превращает декларативный YAML в полноценные инструменты MCP — добавление новой операции Google API требует изменения конфигурации, а не кода.

Почему именно этот MCP-сервер

Для пользователей: Одна установка дает вашему ИИ-агенту реальный, аутентифицированный доступ к вашим аккаунтам Google. Ищите письма, проверяйте календарь, управляйте файлами на Диске, выстраивайте многошаговые рабочие процессы — и все это через естественный диалог.

Для команд: Поддержка нескольких аккаунтов означает, что ваш агент может работать одновременно с личными и рабочими учетными записями, с изоляцией учетных данных для каждого аккаунта и хранилищем, соответствующим стандарту XDG.

Для разработчиков: Архитектура фабрики позволяет быстро расширять покрытие. CLI Google Workspace уже поддерживает более 15 сервисов и сотни операций API. Манифест определяет, какие из них будут доступны, патчи добавляют специфическое для домена форматирование, а настройки по умолчанию обрабатывают все остальное.

Related MCP server: google-mcp

Что доступно

5 инструментов, более 32 операций в 3 основных сервисах:

Инструмент

Операции

Что он делает

manage_email

search, read, send, reply, replyAll, forward, triage, trash, untrash, modify, labels, threads, getThread

Полноценный Gmail — поиск, чтение, создание писем, управление цепочками и метками

manage_calendar

list, agenda, get, create, quickAdd, update, delete, calendars, freebusy

CRUD Календаря, создание событий на естественном языке, проверка доступности

manage_drive

search, get, upload, download, copy, delete, export, listPermissions, share, unshare

Управление файлами, экспорт Google Документов, общий доступ и права

manage_accounts

list, authenticate, remove, status, refresh, scopes

Жизненный цикл нескольких аккаунтов — добавление, управление учетными данными и областями доступа

queue_operations

—

Последовательное выполнение операций со ссылками на результаты $N.field

Каждый ответ включает подсказки о следующих шагах — агент всегда знает, что он может сделать дальше.

Как это работает

                          ┌─────────────────────────┐
MCP Client ──stdio──▶     │  manifest.yaml           │
                          │  (52 operations declared) │
                          └────────┬────────────────┘
                                   │
                          ┌────────▼────────────────┐
                          │  Factory Generator       │
                          │  schemas + handlers      │
                          └────────┬────────────────┘
                                   │
                    ┌──────────────┼──────────────┐
                    ▼              ▼              ▼
              ┌──────────┐  ┌──────────┐  ┌──────────┐
              │  Gmail   │  │ Calendar │  │  Drive   │
              │  Patch   │  │  Patch   │  │  Patch   │
              └────┬─────┘  └────┬─────┘  └────┬─────┘
                   │             │             │
                   └──────┬──────┘──────┬──────┘
                          ▼             ▼
                    Account Router ──▶ gws CLI ──▶ Google APIs

Фабрика считывает YAML-манифест и генерирует схемы инструментов MCP и обработчики запросов при запуске. Патчи добавляют специфическое для домена поведение там, где это необходимо — гидратация поиска Gmail, форматирование календаря, определение типа файлов Диска. Операции без патчей автоматически получают разумные значения по умолчанию.

Базовым движком является @googleworkspace/cli от Google — бинарный файл на Rust, который охватывает всю поверхность API Google Workspace. MCP-сервер определяет, какие операции предоставить, и формирует ответы для использования ИИ.

Установка

Пакет MCPB (Claude Desktop и другие MCP-клиенты)

Загрузите пакет .mcpb для вашей платформы из последнего релиза:

Платформа

Файл

macOS (Apple Silicon)

google-workspace-mcp-darwin-arm64.mcpb

macOS (Intel)

google-workspace-mcp-darwin-x64.mcpb

Linux x64

google-workspace-mcp-linux-x64.mcpb

Linux ARM64

google-workspace-mcp-linux-arm64.mcpb

Windows x64

google-workspace-mcp-windows-x64.mcpb

В Claude Desktop перетащите файл .mcpb в приложение — оно запросит ваши учетные данные Google OAuth, после чего все будет готово к работе. Другие MCP-клиенты, поддерживающие расширения .mcpb, могут установить его таким же образом. Пакет включает в себя все необходимое: сервер, бинарный файл gws и все зависимости.

Claude Code / npm

npm install @aaronsb/google-workspace-mcp

Или запустите напрямую:

npx @aaronsb/google-workspace-mcp

Предварительные требования

  1. Node.js 18+

  2. Учетные данные Google Cloud OAuth — создайте их на console.cloud.google.com/apis/credentials:

    • Создайте идентификатор клиента OAuth 2.0 (приложение для настольных ПК)

    • Включите нужные API (Gmail, Календарь, Диск, Таблицы и т. д.)

  3. Установите переменные окружения:

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

Конфигурация MCP-клиента

Claude Desktop

Добавьте в 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

Добавьте в .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"
      }
    }
  }
}

Использование

Добавьте аккаунт (откроется браузер для OAuth):

manage_accounts { "operation": "authenticate" }

Затем используйте любой инструмент с адресом электронной почты вашего аккаунта:

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" }

Многошаговые рабочие процессы

Связывайте операции с помощью ссылок на результаты — вывод одного шага передается в следующий:

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

Расширение покрытия

Сервер обнаруживает операции из CLI gws, который уже поддерживает более 15 сервисов Google (Таблицы, Документы, Задачи, Контакты, Чат и другие). Добавление покрытия — это редактирование манифеста:

make manifest-discover   # Find all 287+ available operations
make manifest-lint       # Validate the curated manifest
make test                # Verify everything works

Новые операции автоматически получают форматирование по умолчанию. Добавляйте патч только тогда, когда вам нужно специфическое для домена представление.

Хранение данных

Следует спецификации XDG Base Directory:

Данные

Расположение

Реестр аккаунтов

~/.config/google-workspace-mcp/accounts.json

Учетные данные

~/.local/share/google-workspace-mcp/credentials/

Учетные данные представляют собой файлы для каждого аккаунта со стандартными токенами OAuth. Никакие секреты не хранятся в директории проекта.

Лицензия

MIT

Available Tools

13 tools
bulk_operationsA

Do many things in one call, two ways. mode:'queue' (default) runs different operations in sequence, chaining results with $N.field — works for every tool. mode:'batch' does ONE operation across many resources in a single Google request — far fewer round trips, but only where Google publishes a batch method.

Inputs: mode, tool, email, items, +3 more.

manage_accountsA

Manage Google Workspace account lifecycle: list, authenticate, check status, refresh credentials, update scopes, or remove accounts.

Inputs: operation (required), email, access, category, +3 more.

manage_calendarC

List events, view agenda, check availability, or manage calendar events.

Inputs: email (required), operation (required), end, days, +19 more.

manage_contactsA

Search, read, create, update and delete Google Contacts: your saved contacts, the addresses you have corresponded with but never saved, and your organization's directory.

Inputs: email (required), operation (required), name, notes, +9 more.

manage_docsC

Read, write, insert, and find-replace text in Google Docs documents.

Inputs: email (required), operation (required), text, index, +6 more.

manage_driveB

Search, upload, download, share, comment on, or manage files in Google Drive.

Inputs: email (required), operation (required), name, role, +20 more.

manage_emailC

Search, read, send, forward, or manage emails in a Google Workspace account. Supports Gmail search syntax.

Inputs: email (required), operation (required), cc, to, +34 more.

manage_meetB

Browse past Google Meet conferences, participants, transcripts, recordings, and AI-generated smart notes. Requires Workspace Business Standard+ for transcripts/recordings.

Inputs: email (required), operation (required), space, filter, +8 more.

manage_scratchpadA

Compose, edit, and deliver text content. Use for any multi-line content: emails, documents, descriptions. Compose in the scratchpad, edit by line or JSON path, attach files, then send to any target. For short one-liners, use the service tool directly instead.

Inputs: operation (required), keep, path, email, +16 more.

manage_sheetsB

Read, write, and manage Google Sheets spreadsheets.

Inputs: email (required), operation (required), index, range, +9 more.

manage_tasksC

Manage task lists and tasks in Google Tasks.

Inputs: email (required), operation (required), due, notes, +6 more.

manage_workspaceB

Manage files and directories in the workspace sandbox. Supports nested paths (e.g. "reports/q1/summary.csv"). The workspace is the exchange point for file operations (attachments, downloads, exports).

Inputs: operation (required), path, source, content, +2 more.

queue_operationsA

RENAMED to bulk_operations, which does the same thing. This name still works and will be removed in a future release. Do many things in one call, two ways. mode:'queue' (default) runs different operations in sequence, chaining results with $N.field — works for every tool. mode:'batch' does ONE operation across many resources in a single Google request — far fewer round trips, but only where Google publishes a batch method.

Inputs: mode, tool, email, items, +3 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 13 tools

    Disambiguation4/5

    Each manage_* tool maps to a distinct Google service (Contacts, Email, Drive, Meet, Accounts, Calendar, Docs, Sheets, Tasks), so boundaries are mostly clear. The only real confusion is queue_operations being an exact duplicate alias of bulk_operations, and mild overlap between manage_workspace (sandbox files) and manage_drive, which the descriptions do resolve.

    Naming Consistency4/5

    Twelve of thirteen tools follow a clean manage_<resource> pattern, which is very predictable. bulk_operations/queue_operations deviate from the verb_noun convention, but they are a coherent pair and still readable.

    Tool Count5/5

    13 tools is squarely in the well-scoped range for a multi-service Workspace server, with roughly one tool per major product plus two cross-cutting orchestration tools. No tool feels redundant except the deliberate deprecated alias.

    Completeness4/5

    Coverage spans the core Workspace surface: mail, calendar, contacts, drive, docs, sheets, tasks, meet, and account lifecycle, plus bulk orchestration. Notable gaps remain—no Slides, Chat, Forms, or Keep—but core workflows are fully reachable.

    Maintenance

    ActivityActive
    ResponsivenessUsually handled

    Related MCP Connectors

    Related MCP Servers

    • -
      license
      Not graded
      quality
      Not graded
      maintenance
      Enables AI assistants to securely manage Google Workspace services (Gmail, Calendar, Drive, Sheets, Contacts) with persistent multi-account OAuth. Uses OS keychain for credential storage with health monitoring and granular business rules for enterprise security.
      -
    • A
      license
      B
      quality
      C
      maintenance
      Multi-account Google MCP server providing read access to Gmail and Calendar via stdio. Supports secure authentication for personal and work accounts with OAuth and keychain token storage.
      4
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables natural language control over Google Workspace (Gmail, Drive, Calendar, Sheets, Slides, Tasks) through secure OAuth 2.1 authentication, with vault-level security and multi-user isolation.
      7
      -