home / mcp / google workspace mcp server

Google Workspace MCP Server

MCP server enabling natural-language control over Google Workspace admin tasks via Claude or compatible assistants.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "aringad-google-workspace-mcp": {
      "command": "/percorso/completo/google-workspace-mcp/venv/bin/python",
      "args": [
        "/percorso/completo/google-workspace-mcp/server.py"
      ],
      "env": {
        "GOOGLE_ADMIN_EMAIL": "[email protected]",
        "GOOGLE_CUSTOMER_ID": "my_customer",
        "GOOGLE_SERVICE_ACCOUNT_FILE": "/percorso/completo/credentials.json"
      }
    }
  }
}

This MCP (Model Context Protocol) server lets you manage Google Workspace through Claude AI and compatible assistants via natural conversation. It covers users, groups, aliases, and organizational units, enabling practical admin actions from chat.

How to use

Once you have the server running, you can interact with Claude or another MCP client to perform Google Workspace admin tasks through natural language prompts. You can list users, view or modify user details, create or delete users, manage aliases, handle groups and group membership, and explore organizational units. The system converts your conversational requests into the appropriate Google Admin SDK actions and returns structured results.

How to install

Prerequisites: Python 3.10 or newer, a Google Workspace admin account, a Google Cloud project with Admin SDK API enabled, and Claude Desktop or another MCP client.

# Install the MCP package
pip install google-workspace-mcp
```

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

Configuration and runtime setup

Configure Google Cloud: create a project, enable Admin SDK API, and create a Service Account. Generate a JSON key file and record the Service Account Client ID. Enable domain-wide delegation and grant the required API scopes.

Environment variables you will use include the path to the credentials JSON, the super admin email, and the domain customer ID.

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

Claude Desktop configuration examples

Add the MCP server configuration to Claude Desktop’s config file so Claude can connect to the local MCP server.

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

Additional multi-domain setup

If you need to run multiple domains, you can define separate MCP server configurations for each domain in Claude Desktop.

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

Security considerations

Keep Service Account credentials out of code repositories. Use domain-wide delegation with the minimum permissions required. Generated temporary passwords are strong (16 characters) and destructive actions require explicit confirmation. The MCP server does not store data.

Usage examples and prompts

You can ask Claude to perform common admin tasks, such as listing users, creating or suspending users, resetting passwords, managing aliases, and handling group memberships or organizational units.

Test and validation

Verify that the server starts and is reachable from the MCP client, then perform basic operations to confirm correct behavior.

Notes

This server supports multiple domain configurations and can operate with both a single domain and multiple client domains by defining separate MCP server entries.

Available tools

gw_list_users

List users with search and filters

gw_get_user

Retrieve full details of a user

gw_create_user

Create a new user with an auto-generated password

gw_delete_user

Delete a user (requires explicit confirmation)

gw_suspend_user

Suspend or reactivate a user

gw_reset_password

Reset a user's password with automatic generation

gw_manage_alias

Manage email aliases for a user

gw_list_groups

List domain or user groups

gw_manage_group_member

Add or remove group members

gw_list_org_units

List organizational units

gw_move_user_org

Move a user between organizational units