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.
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.
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).
- 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).
- 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.
- 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 Cloudhttps://cloud.anythingmcp.com/api/mcp-oauth/callback. - Paste the client ID into
GOOGLE_CLIENT_IDand the client secret intoGOOGLE_CLIENT_SECRET, then install the connector. - 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.
- 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. - 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
| Tool | What it does |
|---|---|
google_admin_get_customer | Read the Google Workspace account itself: customer id (starts with C), primary domain, organization name and postal address, language… |
google_admin_list_domains | List the domains of the Workspace account: the primary domain and every secondary domain, each with verified, isPrimary, creationTime… |
google_admin_get_domain | Read one domain of the account: whether it is verified and primary, when it was added, and its domain aliases |
google_admin_list_domain_aliases | List domain aliases (domains that mirror another domain, so every user also receives mail at user@alias-domain), with their parent domain… |
google_admin_list_users | List or search the users of the Workspace account (up to 500 per page): primaryEmail, name, id, orgUnitPath, isAdmin, suspended, archived… |
google_admin_get_user | Read one user's full admin view: name, primaryEmail, aliases, orgUnitPath, suspended and suspensionReason, isAdmin, isDelegatedAdmin… |
google_admin_create_user | Create a user account in Google Workspace |
google_admin_update_user | Change fields of an existing user; fields left out stay as they are |
google_admin_suspend_user | Suspend a user: they can no longer sign in and stop receiving mail, but the account, its data and licenses stay |
google_admin_unsuspend_user | Reactivate a suspended user so they can sign in again |
google_admin_sign_out_user | Sign 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_user | Restore a user deleted in the last 20 days (super admin only) |
google_admin_delete_user | Delete a user account |
google_admin_list_user_aliases | List a user's email aliases (extra addresses that deliver to the same mailbox) |
google_admin_add_user_alias | Add an email alias to a user, e.g. "[email protected]" |
google_admin_delete_user_alias | Remove an email alias from a user; mail to that address bounces afterwards |
google_admin_list_groups | List or search the groups of the Workspace account (up to 200 per page): email, name, description, directMembersCount, aliases, id |
google_admin_list_user_groups | List the groups one user (or one group) is a direct member of |
google_admin_get_group | Read one group: email, name, description, aliases, directMembersCount and whether an admin created it |
google_admin_create_group | Create a group (mailing list and access group) with an email on one of the account's domains |
google_admin_update_group | Change a group's email, name or description; fields left out stay as they are |
google_admin_delete_group | Delete a group with its membership list and archive; access granted through it to Drive files, calendars or apps ends |
google_admin_list_group_members | List 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_member | Read one member of a group: role, type, status and delivery setting. 404 means the address is not a direct member |
google_admin_has_group_member | Check whether a user is a member of a group, directly or through nested groups |
google_admin_add_group_member | Add a user, another group or an external address to a group. 409 "Member already exists" means it is already in |
google_admin_update_group_member | Change a group member's role (OWNER, MANAGER, MEMBER) or their mail delivery setting |
google_admin_remove_group_member | Remove a member from a group; access granted through the group ends at once |
google_admin_list_org_units | List organizational units (the tree that settings and policies apply to): name, orgUnitPath, orgUnitId, parentOrgUnitPath, description |
google_admin_get_org_unit | Read one organizational unit: name, path, id, parent and description |
google_admin_create_org_unit | Create an organizational unit under a parent unit, e.g. "EMEA" under "/Sales" |
google_admin_update_org_unit | Rename an organizational unit, change its description or move it under another parent (its users and sub-units move with it) |
google_admin_list_roles | List the admin roles of the account, prebuilt (Super Admin, Groups Admin, User Management Admin, Help Desk Admin...) and custom: roleId… |
google_admin_get_role | Read one admin role with its full list of privileges (serviceId and privilegeName) |
google_admin_list_role_assignments | List who holds which admin role: roleAssignmentId, roleId, assignedTo (a user or group id), assigneeType, scopeType (CUSTOMER = whole… |
google_admin_get_role_assignment | Read one admin role assignment by its id: role, assignee id and type, scope and org unit |
google_admin_assign_role | Give 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_assignment | Take an admin role away from a user or group by deleting the role assignment |
google_admin_list_chromeos_devices | List managed ChromeOS devices (Chromebooks, Chromeboxes, kiosks; up to 300 per page): deviceId, serialNumber, model, status (ACTIVE… |
google_admin_get_chromeos_device | Read one ChromeOS device by its deviceId: hardware, OS and firmware versions, enrolment, last sync and user, network addresses, auto-update… |
google_admin_list_mobile_devices | List 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_device | Read one mobile device by its resourceId: owner, model, OS version, status, compromised status, encryption, first and last sync and the… |
google_admin_list_activities | Audit log: who did what and when in one Google Workspace application, newest first (up to 1,000 per page) |
google_admin_get_customer_usage | Account-wide usage statistics for one day: active users, licenses, Gmail volume, Drive storage, Meet minutes, 2SV adoption, etc |
google_admin_get_user_usage | Per-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?