Skip to main content
Glama
Google Growth MCP

Google Growth MCP

by kremnyi
README.md
# Google Growth MCP

One Node.js MCP server for four Google products. It has no npm dependencies.

| Tool prefix | Product | Access |
| --- | --- | --- |
| `ads_` | Google Ads Keyword Planner | Read-only |
| `ga4_` | Google Analytics 4 | Read-only |
| `search_console_` | Google Search Console | Read-only |
| `gtm_` | Google Tag Manager | Read and write |

The four services run in one process. Each service has its own OAuth token and its own scopes.

## Google Tag Manager safety

- Each GTM change needs an exact change summary and `user_confirmed: true`.
- Publishing needs a separate approval.
- There are no tools for account administration, user administration, or container deletion.

## Requirements

- Node.js 24 or later.
- A Google Cloud project with an OAuth client of the type "Desktop app".
- These APIs enabled in that project, for the services that you use: Google Analytics Data API, Google Analytics Admin API, Google Search Console API, Tag Manager API, Google Ads API.
- For Keyword Planner only: a Google Ads developer token.

## Install

**Claude Code.** Load the directory for one session:

```sh
claude --plugin-dir /path/to/google-growth-mcp
```

For a permanent installation, add the directory to a plugin marketplace.

**Codex.** The manifest is `.codex-plugin/plugin.json`. Add the directory to a Codex plugin marketplace.

**Other MCP clients.** Start the server on stdio:

```json
{
  "mcpServers": {
    "google_growth": {
      "command": "node",
      "args": ["/absolute/path/to/google-growth-mcp/scripts/server.mjs"]
    }
  }
}
```

The root `.mcp.json` uses a relative path for Codex. Claude Code replaces that entry with the `google_growth` entry in `.claude-plugin/plugin.json`, which uses `${CLAUDE_PLUGIN_ROOT}`. Keep the two entries under the same server name.

## Configuration

The source contains no account data. All settings come from one configuration directory or from environment variables.

The configuration directory is the first of these that is set:

1. `GOOGLE_GROWTH_CONFIG_DIR`
2. `$XDG_CONFIG_HOME/google-growth`
3. `~/.config/google-growth`

| File | Content | Source |
| --- | --- | --- |
| `oauth-client.json` | The OAuth client. Use the file that you download from Google Cloud, or `{"client_id": "...", "client_secret": "..."}`. | You |
| `google-ads-keyword-planner-api.json` | `{"developer_token": "...", "customer_id": "...", "login_customer_id": "..."}`. Necessary for Ads only. `login_customer_id` is optional. | You |
| `config.json` | Optional settings. See `config.example.json`. | You |
| `google-ads-keyword-planner.json`, `google-analytics.json`, `google-search-console.json`, `google-tag-manager.json` | OAuth tokens, one for each service. | The authorization scripts |

An environment variable overrides the value in a file.

| Variable | Replaces |
| --- | --- |
| `GOOGLE_GROWTH_CONFIG_DIR` | The configuration directory |
| `GOOGLE_GROWTH_CLIENT_ID`, `GOOGLE_GROWTH_CLIENT_SECRET` | `oauth-client.json` |
| `GOOGLE_GROWTH_LOGIN_HINT` | `login_hint` in `config.json`. The Google account that the consent screen selects. |
| `GOOGLE_GROWTH_SEARCH_CONSOLE_SITE` | `search_console_site_url` in `config.json`. The property that the tools use when a call has no `site_url`, for example `sc-domain:example.com`. |
| `GOOGLE_GROWTH_ADS_DEVELOPER_TOKEN`, `GOOGLE_GROWTH_ADS_CUSTOMER_ID`, `GOOGLE_GROWTH_ADS_LOGIN_CUSTOMER_ID` | `google-ads-keyword-planner-api.json` |

Set the variables in the environment of the server process, for example in the `env` block of your MCP client configuration.

## Authorization

Authorize each service that you use:

```sh
node services/ads/auth.mjs
node services/ga4/auth.mjs
node services/search_console/auth.mjs
node services/gtm/auth.mjs
```

Each script prints a Google URL. Open the URL in a browser and approve the request. The script then saves the token in the configuration directory.

| Service | Scopes |
| --- | --- |
| Ads | `adwords` |
| GA4 | `analytics.readonly` |
| Search Console | `webmasters.readonly` |
| GTM | `tagmanager.readonly`, `tagmanager.edit.containers`, `tagmanager.edit.containerversions`, `tagmanager.publish` |

Each `<prefix>_auth_status` tool shows if its service is connected.

## Tests

```sh
npm test                                # tools, protocol, and GTM guards; no credentials necessary
node scripts/test.mjs --live            # read-only requests to the Google APIs
node scripts/test.mjs --live --refresh  # also tests the refresh token of each service
```

## Security

- The token files have mode `0600`, in a directory with mode `0700`.
- Do not put the configuration directory in a repository.
- The `auth_status` tools do not show secrets.

## License

MIT. See `LICENSE`.

TDQS

A3.5/5.0

Scored across 30 tools

Disambiguation4/5

Tools are grouped by product prefix and mostly target distinct resources or actions, so an agent can usually choose correctly. Minor ambiguity exists across repeated auth-status tools and the two Keyword Planner tools (keyword ideas vs. historical metrics), but descriptions clarify them well.

Naming Consistency5/5

All tools use snake_case with a consistent product-prefixed pattern such as ads_, gtm_, ga4_, and search_console_. Actions are predictable within each group (list_, get_, create_, update_, delete_, run_, auth_status), making names easy to scan and infer.

Tool Count4/5

Thirty tools is heavy for a single MCP server, but the surface spans four distinct Google products, each with its own auth and resource lifecycle. The count is above the ideal 3–15 range but defensible given the multi-product scope, with only GTM feeling somewhat expansive.

Completeness4/5

The surface covers core workflows across all four products: Ads auth and keyword research, GTM full lifecycle from workspace creation to publishing, GA4 reporting, and Search Console analytics and inspection. Gaps are minor by comparison, such as no Ads campaign management or Search Console sitemap submission, but these are outside the mostly read-only/GTM-operational scope.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues