The suite has three layers, and the generated plugin folders are the join point. The marketplace lists the plugins; a plugin holds one MCP server, a consent hook, a tool map and a skill; the server calls Google with the credentials in the token directory.
The three layers
The layers of the suite
Layer
What it is
Example
Marketplace
The google-services-mcps catalogue in .claude-plugin/marketplace.json. It lists the 23 plugins.
claude plugin marketplace add
Plugin
One Google product, packaged for Claude Code. It holds the MCP server, a consent hook, a tool map and a skill.
gmail@google-services-mcps
MCP server
A local Node.js process. The agent starts it over stdio. It exposes the product's tools and calls Google's APIs.
servers/gmail.mjs
The same servers run in Claude Code, Codex, OpenCode and Antigravity. Claude Code installs whole plugins from the marketplace. The installer writes the other three agents' config files and copies each product's server files to ~/.google-services-mcps/runtime/<product>/. The hook exists only in Claude Code.
The 23 product folders, one MCP server each, and the four harnesses. Claude Code adds the consent hook; the other three have none.
The install flow
Every route runs the same installer. It checks the requirements of the agents you chose before it writes anything, then installs the plugin or writes the agent's config, then records the install. Logins and tokens are never touched.
From the npx command to the agent configuration: the requirements check, the two install paths, and the install record.
The auth model
There are three kinds of credential, and a product belongs to one login group that decides which kind it uses. A Desktop OAuth client gives a user token per group; a service account key covers Google Play and Merchant Center; an API key covers the public search and maps APIs. Tokens, the client file and the API key stay in the token directory; the suite has no server of its own and no telemetry path.
Three credential kinds feed the token directory, the server reads them, and the gate decides every change before it reaches Google.
The consent path
A tool call passes through the layers in order. The token scopes decide what Google will accept. The server lists a write or destructive tool only when Allow write tools is on. In Claude Code, the PreToolUse hook asks before a change and never allows a call, so your own permission rules still apply. A destructive action also shows an Approve this action? form with the exact action. The confirmation setting and the policy file decide whether a prompt is needed, and each gated action writes one line to audit.log.
Token scopes. A login asks only for the scopes of its profile. Google rejects any call outside them, whatever the plugin shows.
Tool registration. Write and destructive tools are hidden while Allow write tools is off.
Approval gate. The hook returns ask or deny, never allow. A destructive call also shows the exact action in a form.
Confirmation and policy.confirmation sets when to ask; policy.json holds allow, ask and deny rules, and a deny always wins.
Audit log. One JSON line per gated action, with a hash of the arguments, never the values.
The plugin folder
Every plugin folder has the same shape. The files are generated by the build, and the plugin's manifest points at the parts.
What a plugin folder holds
Path
What it is
.claude-plugin/plugin.json
the plugin manifest: name, display name, version, description, options
.mcp.json
how the agent starts the server, and which plugin options become environment variables
servers/<id>.mjs
the MCP server, bundled so it needs no node_modules
hooks/hooks.json
the PreToolUse matcher for this plugin's tools
bin/gsm-hook.mjs
the hook: it reads the tool map and the policy, and asks or denies
tool-map.json
every tool name, its safety class and its scopes
method-kinds.json
the safety class of the product's API methods
servers.json
the server, its APIs, its gateway APIs and its login group
scopes.json
the OAuth scopes of each API
skills/<id>/SKILL.md
the skill: when to use the product and the common tasks
Where the data goes
The servers call only Google's API and OAuth endpoints, and the code has no separate telemetry path. Tokens stay in the token directory on your machine. Anything a tool returns, such as mail text, becomes part of the agent's conversation, so it goes to that agent's model provider as usual.
The configuration page lists the settings and the environment variable names. The troubleshooting page covers the messages the suite prints when a layer refuses a call.