Google Workspace Mcp

io.github.aringad由 GitHub 帳號 aringad 發布v1.0.0更新於 Oct 24, 2026

Google Workspace Admin via MCP. Manage users, groups, aliases, org units.

概覽

AI 產生的概覽

讓助理透過自然語言對話管理 Google Workspace 的使用者、群組、別名與組織單位。

可以做什麼
將 Google Workspace Admin SDK 包裝成 MCP 工具。可列出與查詢使用者、建立使用者並自動產生密碼、刪除或停用及恢復帳號、重設密碼、管理電子郵件別名、列出群組並新增或移除群組成員,以及列出組織單位或在單位之間移動使用者。刪除等破壞性操作需要明確確認。
適用情境
適合想用對話方式完成日常目錄管理工作的 Google Workspace 管理員,例如到職、離職、重設密碼、別名與群組調整、組織單位搬移,而不必開啟管理控制台。它是僅限桌面的本機伺服器,適合個人管理作業,而非共用或託管部署。
執行需求
需要 Python 3.10+,並在本機安裝 PyPI 套件或原始碼。需要具備管理員權限的 Google Workspace 帳號、已啟用 Admin SDK API 的 Google Cloud 專案、服務帳戶 JSON 金鑰,並為該服務帳戶的 Client ID 設定網域層級委派。環境變數:GOOGLE_ADMIN_EMAIL(必填)、GOOGLE_SERVICE_ACCOUNT_FILE(必填,JSON 金鑰路徑),以及選用的 GOOGLE_CUSTOMER_ID。還需要 Claude Desktop 等 MCP 用戶端。
安裝前請注意
GOOGLE_SERVICE_ACCOUNT_FILE 所指的金鑰檔案屬於憑證,切勿提交到程式碼儲存庫。網域層級委派會賦予此伺服器對整個網域目錄的廣泛權限,包括建立、停用與刪除使用者以及重設密碼,因此請仔細審核所授權的 OAuth 範圍。刪除操作需要明確確認,但其他寫入操作不需要。README 表示伺服器不儲存任何資料。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Google Workspace Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

🔧 Google Workspace MCP Server

🇮🇹 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.gitcd google-workspace-mcppip 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:
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": "[email protected]"      }    }  }}

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": "[email protected]"      }    },    "gw_cliente_beta": {      "command": "/percorso/venv/bin/python",      "args": ["server.py"],      "env": {        "GOOGLE_SERVICE_ACCOUNT_FILE": "/percorso/credentials-beta.json",        "GOOGLE_ADMIN_EMAIL": "[email protected]"      }    }  }}

💬 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 partapython server.py --help
# Test con MCP Inspectornpx @modelcontextprotocol/inspector python server.py

English

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.gitcd google-workspace-mcppip 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:
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": "[email protected]"      }    }  }}

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 startspython server.py --help
# Test with MCP Inspectornpx @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

來源:README.md,提交 1fd8367

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分