mcp-google-multi CLAUDE.md

mcp-google-multi CLAUDE.md is an instructions file for Claude Code from bakissation/mcp-google-multi. It costs 2,948 tokens per session, scanned A, original, MIT.

Project instructions for developing mcp-google-multi, a local service that connects an AI assistant to selected Google services.

In plain words
What is it for?
Use them when adding a Google service or tool, changing the tool registry, or maintaining the project’s documentation and tests.
Why use it?
They give contributors the project structure and rules for changing services, tools, authentication, and generated code consistently.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md.

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 instructions/bakissation/mcp-google-multi/claude-md
Clone the repo
git clone --depth 1 https://github.com/bakissation/mcp-google-multi

Made for: Claude Code.

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 mcp-google-multi CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/bakissation/mcp-google-multi/claude-md.svg)](https://agentmods.dev/instructions/bakissation/mcp-google-multi/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/bakissation/mcp-google-multi/claude-md"><img src="https://agentmods.dev/badge/instructions/bakissation/mcp-google-multi/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,948 This file is loaded in full into every session.
When invoked 2,948 The same file — it is already loaded in full.
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.1 $0.02948 $0.02948
Opus 5 $0.01474 $0.01474
Sonnet 5 $0.00590 $0.00590
Haiku 4.5 $0.00295 $0.00295

Measured 6d ago against content hash b36d366afcc9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

mcp-google-multi CLAUDE.md 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 6d 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.

CLAUDE.md · 112 lines

How it starts

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

Working on mcp-google-multi

Conventions for AI assistants modifying this codebase. v5 is local, stdio, user-OAuth only. User-facing rationale for the big mechanisms (discover-first, fan-out, trimming, write-control, escape hatch) lives in docs/features.md; implementation rationale too long for a code comment (Windows rename retry, GET/HEAD body stripping, admin-scope gating) lives in docs/internals.md. Keep both in sync when behavior changes — comments stay one-line and point there.

Project shape

  • src/index.ts — entry. buildRegistry() registers every enabled service (the curated SERVICES table plus GENERATED_SERVICES, gates in src/services.ts, all filtered by GOOGLE_TOOLSETS), fails fast if registry.services() is empty (BEFORE meta tools register — escape tools would mask an empty service set), then registerDiscoverTools() + registerEscapeTools() + registerAccountTools(); main() installs the registry's custom tools/list handler and runs the stdio MCP server, or the auth / migrate-tokens / config check CLI commands.
  • src/registry.tsToolRegistry wraps the MCP server: records {name, service, cud, description, inputShape, meta} per tool, derives cud (read/create/update/delete) from the tool name via inferCud, enforces write-control by wrapping every CUD handler, injects computed annotations (readOnlyHint/destructiveHint), and owns discover-first visibility: all tools register eagerly (always callable — graceful dispatch), but the custom tools/list handler only advertises meta tools + reveal()ed services. installListHandler() must run after registration, before connect. Service files still call server.registerTool(...)server is now a ToolRegistry.
  • src/discover.tsregisterDiscoverTools(): one eager {service}_discover meta-tool per service; returns the catalog (registry.catalog), reveals the service, triggers tools/list_changed. Never emit tool_reference content blocks or top-level defer_loading fields — strict SDK clients reject/strip them (verified against SDK 1.29).
  • src/toolsets.tsGOOGLE_TOOLSETS parsing (all | CSV of service names).
  • src/discovery-client.ts — runtime Google API Discovery: loadMethodIndex(api) fetches https://www.googleapis.com/discovery/v1/apis/{id}/{version}/rest on demand, disk-caches 7 days (DISCOVERY_CACHE_PATH), stale-if-offline; cudFromMethod (HTTP verb → cud, POST read-verbs like batchGet → read), expandPath ({param} + {+param} templates), searchMethods. Deps injectable for tests — never hit the network in unit tests.
  • src/tools/google-api.tsregisterEscapeTools(): eager google_api_search + google_api_call. The call tool enforces write-control ITSELF (its registry cud is read, so the wrapper doesn't gate it) via isAllowed on the method's derived cud — keep that check when touching this file.
  • src/fanout.ts — cross-account fan-out: parseAccountSelector ("*" | CSV | single), runFanout (bounded 5, per-account isolation, merged {results, partial} envelope with parsed payloads — never embed raw JSON strings), fanoutAccountField (union schema: enum+* | CSV regex). Wired in registry.ts: read tools only, never meta (google_api_call infers cud=read but executes writes), never FANOUT_EXCLUDE (read tools that write local files). Fan-out wraps the raw handler INNERMOST so compaction runs once on the merged envelope.
  • src/tools/accounts-tool.ts — eager account_list meta tool + deriveAccountHealth (pure, deps-injectable). Reads the token store directly — NEVER getClient (would attach refresh listeners). readToken throws on decrypt failure (only returns null when missing) — keep the per-account try/catch. Never output token values.
  • src/trim.ts — response trimming: compactResult (registry re-serializes every JSON text output compactly; GOOGLE_TRIM=off opts out — compaction only, never the caps), capText (paging caps with truncated/totalChars), sliceClean (permanent caps — drops a trailing lone surrogate). Fat readers own their caps: drive_read maxChars/offset, gmail reads 50k body cap + full param, calendar_list_events AND calendar_list_instances list-mode formatEvent(e, {full:false}). New fat-payload tools should reuse these helpers.
  • src/write-control.tsresolvePolicy() (env → policy) + isAllowed() (deny-by-default verdict) + config check rendering.
  • src/token-store.ts — encrypted token store (AES-256-GCM, key from MASTER_KEY); readToken/writeToken/updateToken. The migrate-tokens CLI lives in src/migrate-tokens.ts.
  • src/auth.ts — OAuth flow + scope tiers (BASE_SCOPES always, OPTIONAL_SCOPE_BUNDLES env-gated, ADMIN_SCOPES per-account).
  • src/client.tsgetClient(account): fresh OAuth2Client per call from the encrypted token; its tokens listener re-encrypts on refresh (updateToken).
  • src/accounts.ts — parses GOOGLE_ACCOUNTS; token dir defaults to ~/.config/mcp-google-multi/tokens (override TOKEN_STORE_PATH).
  • src/tools/_errors.tsmapGoogleError typed taxonomy + handleGoogleApiError result wrapper; each service file defines its own handle<Service>Error shim over it (optionally with a service-specific 403 hint).
  • src/tools/_coerce.tscoerceArray/coerceJson/coerceBoolean for string-encoded client args.

Read the full file on GitHub · 112 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. 6d ago First seen · 112 lines · 2,948 tokens per session scan A b36d366afcc9

Subscribe to this mod's changes

mcp-google-multi CLAUDE.md is an instructions file published in the GitHub repository bakissation/mcp-google-multi (10 stars, last pushed yesterday), licensed MIT. It adds 2,948 tokens to every session, about $0.0147 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.

Related

Other instructions, from other repositories

google_workspace_mcp general.instructions.md

Instructions for taylorwilsdon/google_workspace_mcp, covering 📄 project context, 🎯 review goals & priorities, 🚦 low‑value feedback to skip, 🧭 review structure template and ✅ gmail.sendmessage – input schema issue.

taylorwilsdon/google_workspace_mcp · 1,129 tokens

google-mcp CLAUDE.md

Claude Code instructions for quinnjr/google-mcp, covering claude.md, commands, architecture, entry & server and auth.

quinnjr/google-mcp · 847 tokens

gws-mcp-server CLAUDE.md

Claude Code instructions for conorbronsdon/gws-mcp-server, covering gws-mcp-server, architecture, key constraints, development and testing.

conorbronsdon/gws-mcp-server · 512 tokens

artist-mcp CLAUDE.md

Claude Code instructions for ManudotaORG/artist-mcp, covering artist-mcp, verify on release; promote only to ship, layout and things that bite.

ManudotaORG/artist-mcp · 3,439 tokens

elnora-google-workspace AGENTS.md

AGENTS.md instructions for Elnora-AI/elnora-google-workspace, covering agents.md — using the gw google workspace cli, first run (setup), invoking the cli, auth (do not reinvent) and safety rules (must follow).

Elnora-AI/elnora-google-workspace · 790 tokens

artist-mcp AGENTS.md

AGENTS.md instructions for ManudotaORG/artist-mcp: Read the closest AGENTS.md to the code you are changing. This file is the repository root and deliberately holds almost nothing: the two apps have little in common beyond the language.

ManudotaORG/artist-mcp · 196 tokens