google-admin-mcp is a small Rust stdio MCP for reducing Google auth friction
across downstream MCPs. It does not bypass Google authentication. It centralizes
the boring inspect/plan/verify steps so agents do not repeatedly ask an operator
to hand-feed tokens.
- Inspect local
gcloudand Application Default Credentials state. - Build safe
gcloud auth application-default logincommands for a dedicated OAuth client JSON. - Validate OAuth client JSON files without returning secrets.
- List visible Google Cloud projects through
gcloud. - Smoke-test GA4 account-summary access using the current ADC access token.
- Search tool metadata for OpenAI/GPT-5.5
tool_searchand deferred-loading clients withfind_tools. - Keep all tool responses in Contract V1 form:
ok/data/metaorok/error/meta.
- Default profile:
read_only. operatorprofile exists for future mutating tools, but v1 does not install or copy credentials to remote hosts.- Secrets are never returned in tool responses. Tokens are used only as in-memory bearer credentials for upstream Google API calls.
cargo fmt --all --check
cargo test
cargo run -- --print-toolscargo run --release --bin google-admin-mcpOptional:
export GOOGLE_ADMIN_MCP_PROFILE=read_only
export GOOGLE_ADMIN_MCP_DEFAULT_QUOTA_PROJECT=<YOUR_GCP_PROJECT_ID>google_auth_statusfind_toolswhen a client needs to discover the relevant auth/GA4 tools.google_oauth_client_file_validatewith a downloaded Desktop OAuth client JSON.google_adc_login_commandto get the exact command to run.- Run the command once outside the MCP and complete Google consent.
google_ga4_account_summaries_smoketo prove GA4 access works.
The Google Cloud SDK default OAuth app can be blocked for analytics.readonly.
When that happens, use a dedicated Desktop OAuth client JSON:
- Create or choose a Google Cloud project you control.
- Enable the Google Analytics Admin API and Google Analytics Data API.
- Configure the OAuth consent screen. If the app is External/testing, add your Google account as a test user.
- Create Credentials -> OAuth client ID -> Desktop app.
- Download the client JSON locally.
- Run:
gcloud auth application-default login \
--no-launch-browser \
--client-id-file /path/to/client.json \
--scopes=https://www.googleapis.com/auth/analytics.readonly,https://www.googleapis.com/auth/cloud-platformThe MCP can generate this command via google_adc_login_command and then verify
the result via google_ga4_account_summaries_smoke.
The next step after v1 is adding an operator-gated planner for downstream GA4 MCP credential installation, with apply still requiring an explicit profile gate.