Connector guide12-minute read45 MCP tools7 languages

Google Workspace Admin to MCP: Users, Groups, Org Units, Admin Roles, Devices and Audit Logs in any AI Agent

Google Workspace administration for AI agents: users (create, update, suspend, sign out), aliases, groups and members, organizational units, admin roles and assignments, ChromeOS and mobile devices, domains, plus audit logs and usage reports. Admin SDK with OAuth2 and an admin account; deleting users, groups, members, aliases and role assignments installs switched off.

HCBy HelpCode teamUpdated 12 min read Open-source on GitHub

No credit card · 7-day trial · Self-host alternative available

Google Workspace Admin

Google Workspace Admin

Google Workspace administration for AI agents: users (create, update, suspend, sign out), aliases, groups and members, organizational units, admin roles and assignments, ChromeOS and mobile devices, domains, plus audit logs and usage reports. Admin SDK, OAuth2, admin account required.

tools

45

Region

INTL

Category

Productivity

Authentication

OAuth 2.0

Required env vars

GOOGLE_CLIENT_IDGOOGLE_CLIENT_SECRET
Install in one click on Cloud

7-day free trial · No credit card

  • 7-day free trial
    No credit card required
  • GDPR & SOC 2 ready
    EU data residency, audit logs
  • Open-source on GitHub
    Open source · AGPL-3.0
  • Works with ChatGPT, Claude, Gemini
    Any MCP-compatible client

Skip the install. Get this working in under 2 minutes.

Start a free trial on cloud.anythingmcp.com, add the Google Workspace Admin in one click, then point your AI client (Claude, ChatGPT, Copilot or Cursor) at the generated MCP endpoint. No Docker, no git clone, zero engineering experience required.

Start free trial

Summary

Google Workspace administration for AI agents: users (create, update, suspend, sign out), aliases, groups and members, organizational units, admin roles and assignments, ChromeOS and mobile devices, domains, plus audit logs and usage reports. Admin SDK with OAuth2 and an admin account; deleting users, groups, members, aliases and role assignments installs switched off.

Try asking

Example prompts for Google Workspace Admin

Click any prompt to copy it. Paste into Claude, ChatGPT, Cursor, Gemini, Copilot or OpenClaw to run it against this connector.

Google Workspace Admin · live via MCP
Share
Opus 4.7

Claude is AI and can make mistakes. Please double-check responses.

💡 No install? Use cloud.anythingmcp.com directly. Sign in, click Connectors → Google Workspace Admin, paste your credentials, mint an MCP API key and you're done. No Docker, no git clone, no local server.

Google Workspace Admin

Google Workspace administration for AI agents: users (create, update, suspend, sign out), aliases, groups and members, organizational units, admin roles and assignments, ChromeOS and mobile devices, domains, plus audit logs and usage reports. Admin SDK with OAuth2 and an admin account; deleting users, groups, members, aliases and role assignments installs switched off.

Setup

Setting up takes about 10 minutes. The Google account that authorizes the connector must be a Workspace administrator of a Google Workspace or Cloud Identity account; the connector always works on that account (my_customer).

  1. Open https://console.cloud.google.com, pick or create a project, then go to APIs & Services → Library and enable the Admin SDK API (it covers the Directory and Reports APIs).
  2. Open APIs & Services → OAuth consent screen and choose Internal; the project must belong to the same Google Workspace organization. For External, set the publishing status to In production: while an app is in Testing, Google revokes its refresh tokens after 7 days and the connector stops working every week.
  3. Open APIs & Services → Credentials → Create credentials → OAuth client ID, choose the application type Web application and add the authorized redirect URI <your AnythingMCP URL>/api/mcp-oauth/callback, on AnythingMCP Cloud https://cloud.anythingmcp.com/api/mcp-oauth/callback.
  4. Paste the client ID into GOOGLE_CLIENT_ID and the client secret into GOOGLE_CLIENT_SECRET, then install the connector.
  5. On the connector page click Authorize with Provider and sign in with the admin account. The refresh token is stored encrypted and access tokens are renewed automatically.
  6. If the Admin console restricts third-party apps (Security → Access and data control → API controls), mark this OAuth client as Trusted; otherwise the sign-in ends with admin_policy_enforced.
  7. Run google_admin_get_customer: it shows the customer id and the primary domain and confirms the connection.

One Google client for all Google connectors: the same Cloud project and OAuth client can serve every Google connector (Gmail, Google Calendar, Google Drive, Google Sheets, Search Console, Analytics, Ads, Admin). Enable each API in that project, reuse GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET and authorize each connector once; each one asks only for its own scopes.

Which admin account: a Super Admin can use every tool. A delegated admin works for the parts their role covers, as long as the role also has the matching Admin API privileges (Admin console → Account → Admin roles → the role → Privileges → Admin API): Users for user and alias tools, Groups for group and member tools, Organization Units for org unit tools, Reports for audit and usage, Services → Chrome OS and Mobile Device Management for devices, Domain Settings for domains. Roles and role assignments need Super Admin or the privilege Roles Management. A regular user gets 403 Not Authorized to access this resource/api on every call. Use a dedicated admin account with the smallest role that covers the work.

Scopes: admin.directory.user, admin.directory.user.security (sign-out), admin.directory.group, admin.directory.orgunit and admin.directory.rolemanagement, read-only scopes for ChromeOS devices, mobile devices, domains and the customer, and admin.reports.audit.readonly plus admin.reports.usage.readonly. For a read-only setup, replace the first five with admin.directory.user.readonly, admin.directory.group.readonly, admin.directory.orgunit.readonly and admin.directory.rolemanagement.readonly and drop admin.directory.user.security in the connector's OAuth settings, authorize again, and disable every create, update, add, assign, suspend, sign-out and undelete tool.

What it reads: the account itself, its domains and alias domains. Users with org unit, admin status, suspension, 2-Step Verification, last login, aliases, title, department and manager, searched with queries such as isSuspended=true, orgUnitPath='/Sales', isEnrolledIn2Sv=false, isAdmin=true or email:anna*. Groups and their members, the groups of one user, and whether a user belongs to a group directly or through nested groups. The organizational unit tree. Admin roles with their privileges and who holds which role. Managed ChromeOS and mobile devices, searched with status:provisioned, user:[email protected] or sync:..2026-06-01 (not synced since). Audit logs per application (login, admin, drive, token, groups, mobile, meet, gmail, calendar, chrome, saml, user_accounts and more), narrowed by user, time and event such as login_failure or suspicious_login. Daily usage statistics for the account and per user, such as accounts:last_login_time, accounts:used_quota_in_mb or gmail:num_emails_sent.

What it writes: creates users with an initial password and change_password_at_next_login, updates their fields, password, org unit and manager, suspends and reactivates them, signs them out of every web and device session, restores a user deleted in the last 20 days (Super Admin only), and adds aliases (up to 30 per user). Creates and updates groups, adds users, groups or external addresses as members and changes a member's role or mail delivery. Creates, renames and moves organizational units. Grants an admin role to a user or group for the whole account or one org unit; only a Super Admin can grant Super Admin.

Switched off at install: google_admin_delete_user, google_admin_delete_group, google_admin_remove_group_member, google_admin_delete_user_alias and google_admin_delete_role_assignment. They cannot be undone (a deleted user can be restored only for 20 days, a group never), so an admin switches them on when the team needs them.

Data formats: user_key takes the primary email, an alias or the immutable id. In tool paths an org unit is written without the leading slash (Sales/EMEA) or as id:<orgUnitId>; in user fields such as org_unit_path it keeps the slash (/Sales/EMEA). google_admin_assign_role and google_admin_undelete_user need immutable ids, not emails. google_admin_update_user changes only the fields it sends, but lists such as organizations, phones and relations replace the whole list, so the AI reads the user first. Times are RFC 3339 in UTC, and a lastLoginTime of 1970-01-01T00:00:00.000Z means never signed in; a domain's creationTime is epoch milliseconds. Usage reports take date as YYYY-MM-DD in Pacific Time and arrive 1-3 days late: a too recent date returns PARTIAL_DATA_AVAILABLE or DATA_NOT_AVAILABLE, so step back a day.

Paging and limits: list tools return nextPageToken; the AI calls again with page_token until it is missing. Pages hold up to 500 users, 200 groups or members, 300 ChromeOS devices, 100 mobile devices and 1,000 activities or user usage rows. Audit logs come newest first, most go back about 6 months, and events take minutes to hours to appear. Google limits queries per minute per project and per user: 403 quotaExceeded, rateLimitExceeded or 429 means wait a minute and retry. New users and groups can take a few minutes to become visible.

Common errors: 401 means the authorization expired or was revoked (always after 7 days while the consent screen is in Testing): click Authorize with Provider again. 403 Not Authorized to access this resource/api means the signed-in account is not an admin or its role lacks the Admin API privilege for this area. 403 Request had insufficient authentication scopes means authorize again after a scope change. 403 "Admin SDK API has not been used in project" means the API is not enabled (step 1). 404 Resource Not Found: userKey is an unknown user, alias or id. 409 Entity already exists means the email, alias or member is already taken. 400 Invalid Input usually means the email domain does not belong to the account or the password is too short or too long (8-100 characters).

The connector does not read Gmail or Drive content (the Gmail and Google Drive connectors do), change group settings such as who can post or join (Groups Settings API), manage licenses, block or wipe devices, or transfer data at offboarding. Deleting a user also removes their mail and files unless they were transferred first in the Admin console.

Prerequisites: GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET

Install the connector locally

curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d

Open http://localhost:3000/connectors/store, pick Google Workspace Admin and paste in the env vars listed under Prerequisites.

Available tools

ToolWhat it does
google_admin_get_customerRead the Google Workspace account itself: customer id (starts with C), primary domain, organization name and postal address, language…
google_admin_list_domainsList the domains of the Workspace account: the primary domain and every secondary domain, each with verified, isPrimary, creationTime…
google_admin_get_domainRead one domain of the account: whether it is verified and primary, when it was added, and its domain aliases
google_admin_list_domain_aliasesList domain aliases (domains that mirror another domain, so every user also receives mail at user@alias-domain), with their parent domain…
google_admin_list_usersList or search the users of the Workspace account (up to 500 per page): primaryEmail, name, id, orgUnitPath, isAdmin, suspended, archived…
google_admin_get_userRead one user's full admin view: name, primaryEmail, aliases, orgUnitPath, suspended and suspensionReason, isAdmin, isDelegatedAdmin…
google_admin_create_userCreate a user account in Google Workspace
google_admin_update_userChange fields of an existing user; fields left out stay as they are
google_admin_suspend_userSuspend a user: they can no longer sign in and stop receiving mail, but the account, its data and licenses stay
google_admin_unsuspend_userReactivate a suspended user so they can sign in again
google_admin_sign_out_userSign a user out of every web and device session and reset their sign-in cookies, e.g. after a lost laptop or a suspected compromise
google_admin_undelete_userRestore a user deleted in the last 20 days (super admin only)
google_admin_delete_userDelete a user account
google_admin_list_user_aliasesList a user's email aliases (extra addresses that deliver to the same mailbox)
google_admin_add_user_aliasAdd an email alias to a user, e.g. "[email protected]"
google_admin_delete_user_aliasRemove an email alias from a user; mail to that address bounces afterwards
google_admin_list_groupsList or search the groups of the Workspace account (up to 200 per page): email, name, description, directMembersCount, aliases, id
google_admin_list_user_groupsList the groups one user (or one group) is a direct member of
google_admin_get_groupRead one group: email, name, description, aliases, directMembersCount and whether an admin created it
google_admin_create_groupCreate a group (mailing list and access group) with an email on one of the account's domains
google_admin_update_groupChange a group's email, name or description; fields left out stay as they are
google_admin_delete_groupDelete a group with its membership list and archive; access granted through it to Drive files, calendars or apps ends
google_admin_list_group_membersList the members of a group (up to 200 per page): email, role (OWNER, MANAGER, MEMBER), type (USER, GROUP, CUSTOMER, EXTERNAL), status and…
google_admin_get_group_memberRead one member of a group: role, type, status and delivery setting. 404 means the address is not a direct member
google_admin_has_group_memberCheck whether a user is a member of a group, directly or through nested groups
google_admin_add_group_memberAdd a user, another group or an external address to a group. 409 "Member already exists" means it is already in
google_admin_update_group_memberChange a group member's role (OWNER, MANAGER, MEMBER) or their mail delivery setting
google_admin_remove_group_memberRemove a member from a group; access granted through the group ends at once
google_admin_list_org_unitsList organizational units (the tree that settings and policies apply to): name, orgUnitPath, orgUnitId, parentOrgUnitPath, description
google_admin_get_org_unitRead one organizational unit: name, path, id, parent and description
google_admin_create_org_unitCreate an organizational unit under a parent unit, e.g. "EMEA" under "/Sales"
google_admin_update_org_unitRename an organizational unit, change its description or move it under another parent (its users and sub-units move with it)
google_admin_list_rolesList the admin roles of the account, prebuilt (Super Admin, Groups Admin, User Management Admin, Help Desk Admin...) and custom: roleId…
google_admin_get_roleRead one admin role with its full list of privileges (serviceId and privilegeName)
google_admin_list_role_assignmentsList who holds which admin role: roleAssignmentId, roleId, assignedTo (a user or group id), assigneeType, scopeType (CUSTOMER = whole…
google_admin_get_role_assignmentRead one admin role assignment by its id: role, assignee id and type, scope and org unit
google_admin_assign_roleGive a user or group an admin role, for the whole account or one organizational unit. assigned_to is the user's or group's immutable id…
google_admin_delete_role_assignmentTake an admin role away from a user or group by deleting the role assignment
google_admin_list_chromeos_devicesList managed ChromeOS devices (Chromebooks, Chromeboxes, kiosks; up to 300 per page): deviceId, serialNumber, model, status (ACTIVE…
google_admin_get_chromeos_deviceRead one ChromeOS device by its deviceId: hardware, OS and firmware versions, enrolment, last sync and user, network addresses, auto-update…
google_admin_list_mobile_devicesList mobile devices (Android and iOS phones and tablets) that sync with Google Workspace (up to 100 per page): resourceId, email, name…
google_admin_get_mobile_deviceRead one mobile device by its resourceId: owner, model, OS version, status, compromised status, encryption, first and last sync and the…
google_admin_list_activitiesAudit log: who did what and when in one Google Workspace application, newest first (up to 1,000 per page)
google_admin_get_customer_usageAccount-wide usage statistics for one day: active users, licenses, Gmail volume, Drive storage, Meet minutes, 2SV adoption, etc
google_admin_get_user_usagePer-user usage statistics for one day: last login, emails sent and received, Drive storage used, 2SV enrolment, Meet calls, etc. user_key…

Example prompts

  • "Which users are not enrolled in 2-Step Verification? Group them by org unit."
  • "Create [email protected] for Jane Doe in /Sales/EMEA with a temporary password and add her to [email protected]."
  • "Who holds an admin role right now, and which role is it?"
  • "Show the failed and suspicious sign-ins of the last 7 days."
  • "Suspend [email protected] and sign him out of every session."

Next steps

Was this guide helpful?

Your Google Workspace Admin agent is one click away.

Install the connector, paste the key, prompt your AI client. Free for 7 days, no credit card.

Related guides

Connectors

How to Connect Google Workspace Admin to ChatGPT via MCP

Google Workspace administration for AI agents: users (create, update, suspend, sign out), aliases, groups and members, organizational units, admin roles and assignments, ChromeOS and mobile devices, domains, plus audit logs and usage reports. Admin SDK with OAuth2 and an admin account; deleting users, groups, members, aliases and role assignments installs switched off.

Connectors

How to Connect Google Workspace Admin to Claude via MCP

Google Workspace administration for AI agents: users (create, update, suspend, sign out), aliases, groups and members, organizational units, admin roles and assignments, ChromeOS and mobile devices, domains, plus audit logs and usage reports. Admin SDK with OAuth2 and an admin account; deleting users, groups, members, aliases and role assignments installs switched off.

Connectors

How to Connect Google Workspace Admin to Cursor via MCP

Google Workspace administration for AI agents: users (create, update, suspend, sign out), aliases, groups and members, organizational units, admin roles and assignments, ChromeOS and mobile devices, domains, plus audit logs and usage reports. Admin SDK with OAuth2 and an admin account; deleting users, groups, members, aliases and role assignments installs switched off.

Connectors

How to Connect Google Workspace Admin to Gemini via MCP

Google Workspace administration for AI agents: users (create, update, suspend, sign out), aliases, groups and members, organizational units, admin roles and assignments, ChromeOS and mobile devices, domains, plus audit logs and usage reports. Admin SDK with OAuth2 and an admin account; deleting users, groups, members, aliases and role assignments installs switched off.

Connectors

How to Connect Google Workspace Admin to Meta Muse via MCP

Google Workspace administration for AI agents: users (create, update, suspend, sign out), aliases, groups and members, organizational units, admin roles and assignments, ChromeOS and mobile devices, domains, plus audit logs and usage reports. Admin SDK with OAuth2 and an admin account; deleting users, groups, members, aliases and role assignments installs switched off.

Connectors

How to Connect Google Workspace Admin to Microsoft Copilot via MCP

Google Workspace administration for AI agents: users (create, update, suspend, sign out), aliases, groups and members, organizational units, admin roles and assignments, ChromeOS and mobile devices, domains, plus audit logs and usage reports. Admin SDK with OAuth2 and an admin account; deleting users, groups, members, aliases and role assignments installs switched off.