MCP server for Google Workspace security auditing β login audit, external sharing, daily brief
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
English | ζ₯ζ¬θͺ
Google Workspace security-audit MCP (Model Context Protocol) server β read-only visibility into account locks, suspicious logins, and external file sharing, built on the Admin SDK Reports API (audit activities).
Named after the admin-console viewpoint (gwsadm = Google Workspace admin),
sibling of boxadm-mcp. This is
not a general-purpose Workspace MCP: it surfaces risk, it never mutates
anything.
| Tool | Description |
|---|---|
health_check | Server version, config path, and per-domain auth probe β call at session start or after a timeout |
login_audit | Reports API login β accounts auto-disabled by Google (account_disabled_*: leaked password, hijacked, spamming), suspicious logins, failure top-N |
gmail_usage_report | Reports API customerUsageReports β daily Gmail send/receive counts per domain, one date at a time, ending yesterday (the API's own UTC-8:00/PST date anchor). Requires the separate admin.reports.usage.readonly DWD scope (see Auth model below) β a DIFFERENT grant from admin.reports.audit.readonly even though both are Reports API |
suspended_accounts | Directory API β current snapshot of suspended accounts (isSuspended=true); cross-reference against a downstream IdP (e.g. KeyCloak) to find suspended-but-still-enabled accounts |
get_user | Directory API users().get β one named account's current state: suspended (with reason and time), archived, last_login, 2SV enrolled/enforced, org unit, creation time, pending password change. The "why can't this person sign in" lookup: one request, no pagination, for an address you already know β unlike suspended_accounts, which lists only accounts that ARE suspended, so it can never confirm that a given address is not suspended (and once that list exceeds its page cap, absence stops being evidence either way). Needs no scope beyond the one suspended_accounts already uses |
user_oauth_tokens | Directory API tokens().list β third-party OAuth app grants for one user; a compromise vector login_audit is blind to, since a previously-granted token needs no fresh login. Domain resolved from the username's suffix, with an optional domain override for alias/secondary-domain addresses |
drive_external_sharing | Reports API drive β ACL grants to external addresses or domains (revocations reported separately) and visibility transitions into link/public exposure |
drive_doc_activity | Reports API drive with a server-side doc_id filter β one document's owner, ACL changes, and lifecycle events. Triage companion to drive_external_sharing: the owner (an individual vs. a shared drive's name) disambiguates the shared-drive false-positive class, where files created inside a shared drive propagate member ACLs and read as bulk external sharing |
shared_drive_membership_changes | Reports API drive (shared_drive_membership_change) β who added/removed/re-roled shared-drive members and when, with external classification of the affected member and a client-side drive-name filter |
gmail_message_trace | Gmail API β did a known Message-ID reach specific mailboxes, and where (inbox/spam/trash/archived)? For each recipient it impersonates that user via DWD and searches their own mailbox. Requires the separate gmail.readonly DWD scope (see Auth model below); a domain missing that grant reports a per-recipient error, never a false "not found" |
dmarc_rua_summary | Gmail API β DMARC aggregate (RUA) report pass/fail summary and top reject-candidate source IPs, per domain. Impersonates the domain's configured dmarc_rua_mailbox (a real user; default postmaster@<domain>), searches it for mail addressed to dmarc_rua_recipient (the published rua= address, e.g. postmaster+rua@; default: the mailbox) and reads the compressed report attachments those messages carry. Shares gmail_message_trace's gmail.readonly DWD scope, but unlike that tool this one DOES read attachment content (the report XML), not just metadata β see Auth model below |
group_delivery_policy | Groups Settings API β a Google Group's own posting/delivery policy (who_can_post, allow_external_members, moderation levels). A group's access control sits in front of Gmail delivery: a domain-only posting policy silently drops an external sender's mail before it generates any Gmail delivery event at all, indistinguishable from a delivery failure without reading the policy directly. Requires the separate apps.groups.settings DWD scope (see Auth model below) |
list_group_members | Directory API β a Google Group's basic metadata and member roster, resolved directly rather than inferred from who happened to receive one particular message. Requires the separate admin.directory.group.readonly and admin.directory.group.member.readonly DWD scopes (see Auth model below) |
daily_brief | One-call summary across all configured domains |
daily_brief_start / daily_brief_result | Same as daily_brief, run in the background: start returns a job_id immediately, then poll result(job_id) until done. Use on large tenants where the synchronous call risks the client's ~60s tool-call timeout |
Planned: dlp_events (Reports rules; requires a Workspace edition with DLP),
token_events, admin_events.
Service account with domain-wide delegation (DWD) impersonating an audit-capable admin. Fully non-interactive β no browser, no token refresh rotation β so the server runs unattended (cron, MCP gateway, CI).
Grant all of the following DWD scopes on the same service-account client ID up front, in one setup pass. Adding them one at a time as each tool gets built is how a scope goes missing until the one tool that needed it starts degrading β one place, one pass, avoids the trap:
| Scope | Needed by | Missing it |
|---|---|---|
https://www.googleapis.com/auth/admin.reports.audit.readonly | login_audit, drive_external_sharing, drive_doc_activity, shared_drive_membership_changes, daily_brief* | those tools degrade to a per-domain error |
https://www.googleapis.com/auth/admin.directory.user.readonly | suspended_accounts, get_user | those two tools degrade to an error (per-domain for suspended_accounts); everything else keeps working |
https://www.googleapis.com/auth/admin.directory.user.security | user_oauth_tokens | that tool degrades to a per-domain error; everything else keeps working |
health_check needs no scope at all to respond: it is the tool to call when
a grant might be missing β it probes each domain and reports the failing
auth in a structured per-domain result instead of failing itself.
gmail_usage_report needs its own separate scope too, despite living under
the same Admin SDK Reports API as the base pass above β the "Usage report"
family (customerUsageReports) and the "Audit" activity stream
(activities().list, everything else in the base pass) are gated by two
different scopes, and having one does not imply the other:
| Scope | Needed by | Missing it |
|---|---|---|
https://www.googleapis.com/auth/admin.reports.usage.readonly | gmail_usage_report | that tool degrades to a per-domain error; everything else keeps working |
gmail_message_trace and dmarc_rua_summary need one more scope, granted as
a separate step β it is intentionally not bundled into the pass above:
| Scope | Needed by | Missing it |
|---|---|---|
https://www.googleapis.com/auth/gmail.readonly | gmail_message_trace, dmarc_rua_summary | those tools report a per-recipient/per-domain error; everything else keeps working |
This is a materially broader grant than the three above: it allows reading
message content for any user the service account impersonates, not just
metadata. gmail_message_trace only ever requests format="metadata" β it
never reads a message body β but dmarc_rua_summary DOES read content: it
fetches the compressed DMARC report attachment each RUA message carries
(format="full" plus attachments().get()) and parses it. Both stay within
what the grant allows either way, but only gmail_message_trace stays inside
the narrower "metadata only" habit; the narrower gmail.metadata scope was
considered and rejected for both tools because it does not support the q=
search parameter the rfc822msgid:/RUA-mailbox lookups need. Grant it on the
same service-account client ID as the other scopes (Admin console β
Security β API controls β Domain-wide delegation β find the existing client
ID β add this scope to its list), and weigh that broader exposure against how
much you actually need message-trace/DMARC reporting before turning it on for
a given domain.
group_delivery_policy and list_group_members each need their own
separate scope too β three more grants beyond the base pass, none bundled
with each other or with gmail.readonly above:
| Scope | Needed by | Missing it |
|---|---|---|
https://www.googleapis.com/auth/apps.groups.settings | group_delivery_policy | that tool degrades to an error; everything else keeps working |
https://www.googleapis.com/auth/admin.directory.group.readonly | list_group_members (group metadata half) | that half reports its own error; the member roster half still works independently if its own scope below is granted |
https://www.googleapis.com/auth/admin.directory.group.member.readonly | list_group_members (member roster half) | same, independent of the metadata half above β the two calls never gate each other |
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/google-workspace-admin-security-audit-mcp)<a href="https://allmcps.com/mcp/google-workspace-admin-security-audit-mcp"><img src="https://allmcps.com/api/badge/google-workspace-admin-security-audit-mcp?style=directory" alt="Google Workspace Admin Security Audit MCP on AllMCPs" /></a>