io.github.aringad/google-workspace-mcp

编码与调试

by aringad

通过 MCP 管理 Google Workspace Admin,可维护 users、groups、aliases 与 org units 等资源。

什么是 io.github.aringad/google-workspace-mcp

通过 MCP 管理 Google Workspace Admin,可维护 users、groups、aliases 与 org units 等资源。

README

🔧 Google Workspace MCP Server

<!-- mcp-name: io.github.aringad/google-workspace-mcp -->

🇮🇹 Italiano | 🇬🇧 English


Italiano

Server MCP (Model Context Protocol) per gestire Google Workspace tramite Claude AI e altri assistenti compatibili. Permette di amministrare utenti, gruppi, alias e unità organizzative tramite conversazione naturale.

✨ Funzionalità

ToolDescrizione
gw_list_usersLista utenti con ricerca e filtri
gw_get_userDettaglio completo di un utente
gw_create_userCrea nuovo utente con password auto-generata
gw_delete_userElimina utente (con conferma obbligatoria)
gw_suspend_userSospendi o riattiva un utente
gw_reset_passwordReset password con generazione automatica
gw_manage_aliasAggiungi, rimuovi, elenca alias email
gw_list_groupsLista gruppi del dominio o di un utente
gw_manage_group_memberAggiungi/rimuovi membri dai gruppi
gw_list_org_unitsLista unità organizzative
gw_move_user_orgSposta utente tra unità organizzative

📋 Prerequisiti

  • Python 3.10+
  • Account Google Workspace con accesso admin
  • Progetto Google Cloud con Admin SDK API abilitata
  • Claude Desktop o altro client MCP

🚀 Installazione

bash
pip install google-workspace-mcp

Oppure da sorgente:

bash
git clone https://github.com/aringad/google-workspace-mcp.git
cd google-workspace-mcp
pip install -r requirements.txt

🔑 Configurazione Google Cloud

1. Crea progetto e abilita API

  1. Vai su console.cloud.google.com
  2. Crea un nuovo progetto (o usa quello esistente)
  3. Vai su API e servizi → Libreria
  4. Cerca e abilita: Admin SDK API

2. Crea Service Account

  1. Vai su API e servizi → Credenziali
  2. Crea credenziali → Account di servizio
  3. Dai un nome (es. mcp-workspace-admin)
  4. Vai nel Service Account → Chiavi → Aggiungi chiave → JSON
  5. Scarica il file JSON (queste sono le tue credenziali)
  6. Annota il Client ID (numero lungo nei dettagli del Service Account)

⚠️ Non serve assegnare ruoli IAM al Service Account. I permessi vengono dalla delega domain-wide.

3. Delega Domain-Wide

  1. Vai su admin.google.com
  2. Sicurezza → Accesso e controllo dati → Controlli API → Gestisci delega a livello di dominio
  3. Clicca Aggiungi nuovo
  4. Inserisci il Client ID del Service Account
  5. Come ambiti OAuth, inserisci:
code
https://www.googleapis.com/auth/admin.directory.user,https://www.googleapis.com/auth/admin.directory.group,https://www.googleapis.com/auth/admin.directory.orgunit,https://www.googleapis.com/auth/admin.directory.user.alias
  1. Autorizza

⚙️ Variabili d'ambiente

VariabileDescrizioneDefault
GOOGLE_SERVICE_ACCOUNT_FILEPath al file JSON delle credenziali./credentials.json
GOOGLE_ADMIN_EMAILEmail del super admin con delega(obbligatorio)
GOOGLE_CUSTOMER_IDCustomer ID del dominiomy_customer

🔌 Configurazione Claude Desktop

Aggiungi al file di configurazione:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
json
{
  "mcpServers": {
    "google_workspace": {
      "command": "/percorso/completo/google-workspace-mcp/venv/bin/python",
      "args": ["/percorso/completo/google-workspace-mcp/server.py"],
      "env": {
        "GOOGLE_SERVICE_ACCOUNT_FILE": "/percorso/completo/credentials.json",
        "GOOGLE_ADMIN_EMAIL": "admin@tuodominio.it"
      }
    }
  }
}

Chiudi completamente Claude Desktop (Cmd+Q su Mac) e riaprilo.

🏢 Configurazione multi-cliente

Puoi gestire più domini aggiungendo istanze separate:

json
{
  "mcpServers": {
    "gw_cliente_alfa": {
      "command": "/percorso/venv/bin/python",
      "args": ["server.py"],
      "env": {
        "GOOGLE_SERVICE_ACCOUNT_FILE": "/percorso/credentials-alfa.json",
        "GOOGLE_ADMIN_EMAIL": "admin@alfa.it"
      }
    },
    "gw_cliente_beta": {
      "command": "/percorso/venv/bin/python",
      "args": ["server.py"],
      "env": {
        "GOOGLE_SERVICE_ACCOUNT_FILE": "/percorso/credentials-beta.json",
        "GOOGLE_ADMIN_EMAIL": "admin@beta.it"
      }
    }
  }
}

💬 Esempi d'uso

Una volta configurato, puoi dire a Claude:

Puoi anche copiare direttamente l'email del cliente con la richiesta e Claude interpreterà automaticamente le operazioni da eseguire.

🔒 Sicurezza

  • Le credenziali del Service Account non vanno mai committate nel repository
  • Le password temporanee generate sono di 16 caratteri con lettere, numeri e simboli
  • Le operazioni distruttive (eliminazione) richiedono conferma esplicita
  • Il Service Account opera con i soli permessi strettamente necessari
  • Nessun dato viene memorizzato dal server MCP

🧪 Test

bash
# Verifica che il server parta
python server.py --help

# Test con MCP Inspector
npx @modelcontextprotocol/inspector python server.py

English

<a name="english"></a>

MCP (Model Context Protocol) Server to integrate Google Workspace Admin with Claude AI and other compatible assistants. Manage users, groups, aliases and organizational units through natural conversation.

✨ Features

ToolDescription
gw_list_usersList users with search and filters
gw_get_userFull user details
gw_create_userCreate new user with auto-generated password
gw_delete_userDelete user (requires explicit confirmation)
gw_suspend_userSuspend or reactivate a user
gw_reset_passwordReset password with automatic generation
gw_manage_aliasAdd, remove, list email aliases
gw_list_groupsList domain or user groups
gw_manage_group_memberAdd/remove group members
gw_list_org_unitsList organizational units
gw_move_user_orgMove user between organizational units

📋 Prerequisites

  • Python 3.10+
  • Google Workspace account with admin access
  • Google Cloud project with Admin SDK API enabled
  • Claude Desktop or another MCP client

🚀 Installation

bash
pip install google-workspace-mcp

Or from source:

bash
git clone https://github.com/aringad/google-workspace-mcp.git
cd google-workspace-mcp
pip install -r requirements.txt

🔑 Google Cloud Setup

1. Create project and enable API

  1. Go to console.cloud.google.com
  2. Create a new project (or use existing one)
  3. Go to APIs & Services → Library
  4. Search and enable: Admin SDK API

2. Create Service Account

  1. Go to APIs & Services → Credentials
  2. Create Credentials → Service Account
  3. Name it (e.g., mcp-workspace-admin)
  4. Go to the Service Account → Keys → Add Key → JSON
  5. Download the JSON file (these are your credentials)
  6. Note the Client ID (long number in Service Account details)

⚠️ No IAM roles needed on the Service Account. Permissions come from domain-wide delegation.

3. Domain-Wide Delegation

  1. Go to admin.google.com
  2. Security → Access and data control → API controls → Manage Domain Wide Delegation
  3. Click Add new
  4. Enter the Service Account Client ID
  5. For OAuth scopes, enter:
code
https://www.googleapis.com/auth/admin.directory.user,https://www.googleapis.com/auth/admin.directory.group,https://www.googleapis.com/auth/admin.directory.orgunit,https://www.googleapis.com/auth/admin.directory.user.alias
  1. Authorize

⚙️ Environment Variables

VariableDescriptionDefault
GOOGLE_SERVICE_ACCOUNT_FILEPath to credentials JSON file./credentials.json
GOOGLE_ADMIN_EMAILSuper admin email with delegation(required)
GOOGLE_CUSTOMER_IDDomain customer IDmy_customer

🔌 Claude Desktop Configuration

Add to config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
json
{
  "mcpServers": {
    "google_workspace": {
      "command": "/full/path/to/google-workspace-mcp/venv/bin/python",
      "args": ["/full/path/to/google-workspace-mcp/server.py"],
      "env": {
        "GOOGLE_SERVICE_ACCOUNT_FILE": "/full/path/to/credentials.json",
        "GOOGLE_ADMIN_EMAIL": "admin@yourdomain.com"
      }
    }
  }
}

Fully quit Claude Desktop (Cmd+Q on Mac) and reopen it.

💬 Usage Examples

Once configured, you can tell Claude:

You can also paste client emails with requests directly — Claude will automatically interpret the operations to perform.

🔒 Security

  • Service Account credentials must never be committed to the repository
  • Temporary passwords are 16 characters with letters, numbers, and symbols
  • Destructive operations (deletion) require explicit confirmation
  • The Service Account operates with minimum necessary permissions
  • No data is stored by the MCP server

🧪 Testing

bash
# Verify server starts
python server.py --help

# Test with MCP Inspector
npx @modelcontextprotocol/inspector python server.py

📄 License

MIT License — See LICENSE for details.

👨‍💻 Author

Developed by Mediaform s.c.r.l. — Genova, Italy


Built with MCP and Google Admin SDK

常见问题

io.github.aringad/google-workspace-mcp 是什么?

通过 MCP 管理 Google Workspace Admin,可维护 users、groups、aliases 与 org units 等资源。

相关 Skills

网页构建器

by anthropics

Universal
热门

面向复杂 claude.ai HTML artifact 开发,快速初始化 React + Tailwind CSS + shadcn/ui 项目并打包为单文件 HTML,适合需要状态管理、路由或多组件交互的页面。

在 claude.ai 里做复杂网页 Artifact 很省心,多组件、状态和路由都能顺手搭起来,React、Tailwind 与 shadcn/ui 组合效率高、成品也更精致。

编码与调试
未扫描176.4k

网页应用测试

by anthropics

Universal
热门

用 Playwright 为本地 Web 应用编写自动化测试,支持启动开发服务器、校验前端交互、排查 UI 异常、抓取截图与浏览器日志,适合调试动态页面和回归验证。

借助 Playwright 一站式验证本地 Web 应用前端功能,调 UI 时还能同步查看日志和截图,定位问题更快。

编码与调试
未扫描176.4k

前端设计

by anthropics

Universal
热门

面向组件、页面、海报和 Web 应用开发,按鲜明视觉方向生成可直接落地的前端代码与高质感 UI,适合做 landing page、Dashboard 或美化现有界面,避开千篇一律的 AI 审美。

想把页面做得既能上线又有设计感,就用前端设计:组件到整站都能产出,难得的是能避开千篇一律的 AI 味。

编码与调试
未扫描176.4k

相关 MCP Server

GitHub

编辑精选

by GitHub

热门

GitHub 是 MCP 官方参考服务器,让 Claude 直接读写你的代码仓库和 Issues。

这个参考服务器解决了开发者想让 AI 安全访问 GitHub 数据的问题,适合需要自动化代码审查或 Issue 管理的团队。但注意它只是参考实现,生产环境得自己加固安全。

编码与调试
89.7k

by Context7

热门

Context7 是实时拉取最新文档和代码示例的智能助手,让你告别过时资料。

它能解决开发者查找文档时信息滞后的问题,特别适合快速上手新库或跟进更新。不过,依赖外部源可能导致偶尔的数据延迟,建议结合官方文档使用。

编码与调试
60.2k

by tldraw

热门

tldraw 是让 AI 助手直接在无限画布上绘图和协作的 MCP 服务器。

这解决了 AI 只能输出文本、无法视觉化协作的痛点——想象让 Claude 帮你画流程图或白板讨论。最适合需要快速原型设计或头脑风暴的开发者。不过,目前它只是个基础连接器,你得自己搭建画布应用才能发挥全部潜力。

编码与调试
49.9k

评论