setup

setup is a command for coding agents from ringo380/ga-mcp-full. It costs 24 tokens per session (717 once invoked), scanned A, original, MIT.

A first-run setup command for the ga-mcp-full server, which lets Claude Code query Google Analytics 4 (GA4), Google's web-analytics service.

In plain words
What is it for?
It helps install the command-line tool when needed, complete Google browser login, and confirm that GA4 access works.
Why use it?
It checks whether the required command-line tool and login are ready, so the user does not have to work out the setup sequence manually.

Command

Part of the ga-mcp-full plugin — 5 commands, 2 hooks, 1 MCP server shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/ringo380/ga-mcp-full/setup
Clone the repo
git clone --depth 1 https://github.com/ringo380/ga-mcp-full

Or install ga-mcp-full, the plugin that ships this one along with the rest of its 5 commands, 2 hooks, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for setup

README.md
[![agentmods](https://agentmods.dev/badge/commands/ringo380/ga-mcp-full/setup.svg)](https://agentmods.dev/commands/ringo380/ga-mcp-full/setup)
Your own site
<a href="https://agentmods.dev/commands/ringo380/ga-mcp-full/setup"><img src="https://agentmods.dev/badge/commands/ringo380/ga-mcp-full/setup.svg" alt="Measured on agentmods" height="20"></a>
Per session 24 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 717 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00024 $0.00717
Opus 5 $0.00012 $0.00358
Sonnet 5 $0.00005 $0.00143
Haiku 4.5 $0.00002 $0.00072

Measured 3d ago against content hash 3e92cb001960, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

setup scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/setup.md · 67 lines

How it starts

The opening of the file, as written. The whole thing — 67 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/ga-mcp-full:setup

Walk the user from "plugin enabled" to "running GA4 queries from Claude Code" in the smallest possible number of steps.

Happy path

  1. Verify the CLI is installed:

    command -v ga-mcp-full >/dev/null 2>&1 && echo OK || echo MISSING
    

    If the output is MISSING, tell the user to run:

    pip install ga-mcp-full
    

    (Or for a local dev checkout: pip install -e /path/to/ga-mcp-full.) Do not pip-install on their behalf without asking.

  2. Check existing auth state (skip login if already set up):

    ga-mcp-full auth status || true
    

    If the first line is Authenticated: yes, say so and stop — they're done. Point them at /ga-mcp-full:auth-status for details.

  3. Run the browser login:

    ga-mcp-full auth login
    

    This opens Google's consent screen, binds a local callback on 127.0.0.1 on a random free port, completes the PKCE-protected OAuth exchange, and caches a refresh token at ~/.config/ga-mcp/credentials.json (mode 0600).

  4. Confirm: run ga-mcp-full auth status once more. On Authenticated: yes, tell the user they can now ask Claude for things like "list my GA4 properties" and the MCP server will handle it. No Claude Code restart needed — the next tool call loads the new credentials from disk.

Troubleshooting

  • "GA auth required: run /ga-mcp-full:auth-login ..." appearing in a tool response — the user's cached refresh token was rejected or never existed. Run /ga-mcp-full:auth-login.
  • Browser did not open — the CLI prints the auth URL to stderr; paste that URL into any browser to continue.

Power users: use your own OAuth client

The server ships with a public Desktop OAuth client so most users never need to visit the Google Cloud Console. If you want to use your own client (e.g., for quota isolation, custom consent screen, or a different GCP project):

  1. Create an OAuth 2.0 Desktop client at https://console.cloud.google.com/apis/credentials in a project where the Google Analytics Admin API and Google Analytics Data API are enabled.
  2. Override the bundled defaults using either:
    • Env vars in your shell profile:
      export GA_MCP_CLIENT_ID="<your-client-id>"
      export GA_MCP_CLIENT_SECRET="<your-client-secret>"
      
    • Or drop the downloaded JSON at ~/.config/ga-mcp/client_secrets.json (mode 0600).
  3. Then run ga-mcp-full auth login as usual.

Read the full file on GitHub · 67 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 67 lines · 24 tokens per session scan A 3e92cb001960

Subscribe to this mod's changes

setup is a command published in the GitHub repository ringo380/ga-mcp-full (0 stars, last pushed 29d ago), licensed MIT. It adds 24 tokens to every session and 717 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.