Skip to main content
Glama
jptb-google-tools

jptb-google-tools

by joomlapro

JP Agent Tracking Bridge MCP

The JP Agent Tracking Bridge MCP lets a compatible AI agent (Hermes, Claude, Codex) work with Google Analytics and Google Tag Manager through JP Agent Tracking Bridge — using your Google account, never a service account.

AI agent
   └─ jptb-google-tools (this MCP server)
        └─ HTTPS → JP Agent Tracking Bridge Google Tools gateway (jpro.studio)
                      ├─ validates your active Bridge session
                      ├─ uses YOUR Google OAuth connection (encrypted server-side)
                      └─ Google Analytics + Google Tag Manager

The agent never sees your Google tokens, your client secret, or any encryption key.

Requirements

  • A licensed, installed JP Agent Tracking Bridge site (WordPress or Joomla).

  • A Google account with access to the site's GA4 property and GTM container.

  • A compatible agent (Hermes, Claude Desktop, or Codex).

No service account, no JSON credentials, no Google Cloud setup.

Related MCP server: Google Analytics MCP Server

The 5-step customer story

  1. Install/register this MCP once (below).

  2. Connect Google in the site's JP Agent Tracking Bridge admin.

  3. Start Tagging to open a temporary agent connection.

  4. Give the agent the connection (connection id + session token).

  5. Talk to the agent normally — it inspects and configures tracking, and asks before publishing anything to GTM.

Start or install

This command downloads and starts the MCP server:

uvx --from 'git+https://github.com/joomlapro/jp-agent-tracking-bridge-mcp.git' jptb-google-tools

The process intentionally stays open while the server waits for its MCP client. If you run it manually to verify the setup, press Ctrl+C after the startup banner appears. Your MCP client normally starts and stops this command for you.

For a standalone installation that returns to the prompt, use:

uv tool install 'git+https://github.com/joomlapro/jp-agent-tracking-bridge-mcp.git'

Then register it in your agent. See docs/HERMES.md, docs/CLAUDE.md, or docs/CODEX.md for the exact per-agent setup.

Configuration

The server needs two values for a given job (also passable per tool call):

export JPTB_CONNECTION_ID="<connection id from 'Connect Google'>"
export JPTB_SESSION_TOKEN="<session token from 'Start Tagging'>"

Both are shown/generated in the site's JP Agent Tracking Bridge admin and via the Bridge API. The session_token is revoked by Stop Tagging, which immediately blocks all Google operations through the MCP.

What the agent can do

  • GTM read — list accounts/containers/workspaces/tags/triggers/variables/versions.

  • GTM write — create/update JPTB tags, triggers, variables; create a container version.

  • GTM publish — publish a prepared version (approval-gated; the agent asks first).

  • GA4 read-only — list accounts/properties, property details, realtime and standard reports.

Verification — GA4 realtime latency

GA4 realtime is minutes-slow, not seconds-slow. An empty realtime report is not proof an event was dropped. Before declaring an event "dropped":

  1. Wait at least 5 minutes after the last browser event you expect to see.

  2. Or calibrate with a unique direct /g/collect canary hit (this measures the current latency instead of guessing).

See docs/GA4-LATENCY.md for the full checklist and the "never do this" rules (no Custom HTML gtag('event', same-name) recursion, no dual GA4 loaders, no blaming consent before proving routing).

Security model

  • Session-bound — Google access is tied to an active Bridge session; Stop Tagging revokes it.

  • No secrets to the model — tokens, client secret, and the encryption key stay server-side.

  • No service account — the customer's own Google OAuth authorization is the only credential.

License

MIT.

Available Tools

24 tools
ga4_get_propertyA

Get a GA4 property's details (by numeric property id, not measurement id).

Inputs: property_id (required), connection_id, session_token.

ga4_list_accountsA

List GA4 account/property summaries accessible to the connected Google user.

Inputs: connection_id, session_token.

ga4_list_data_streamsC

List data streams for a GA4 property.

Inputs: property_id (required), connection_id, session_token.

ga4_resolveA

Resolve a GA4 measurement id (e.g. G-XXXX) to numeric property_id + stream. Defaults to the customer's configured measurement id.

Inputs: connection_id, session_token, measurement_id.

ga4_run_realtime_reportA

Run a GA4 realtime report (read-only). report = {dimensions:[{name}], metrics:[{name}], ...}.

IMPORTANT: realtime has minutes-scale ingestion latency. An empty result is NOT proof an event was dropped. Wait at least 5 minutes after the last event and/or calibrate with a unique direct /g/collect canary hit before concluding. See docs/GA4-LATENCY.md.

Inputs: report (required), property_id (required), connection_id, session_token.

ga4_run_reportA

Run a GA4 standard report (read-only). report = {dateRanges:[{startDate,endDate}], dimensions, metrics, ...}.

Inputs: report (required), property_id (required), connection_id, session_token.

gtm_create_tagB

Create a GTM tag (full tag object). Use predictable JPTB naming; reuse/update an equivalent existing JPTB tag instead of duplicating.

Inputs: tag (required), account_id (required), container_id (required), workspace_id (required), +2 more.

gtm_create_triggerB

Create a GTM trigger (full trigger object).

Inputs: trigger (required), account_id (required), container_id (required), workspace_id (required), +2 more.

gtm_create_variableC

Create a GTM variable (full variable object).

Inputs: variable (required), account_id (required), container_id (required), workspace_id (required), +2 more.

gtm_create_versionA

Create a GTM container version from a workspace (does NOT publish).

Inputs: account_id (required), container_id (required), workspace_id (required), name, +2 more.

gtm_get_containerB

Get a single GTM container's details.

Inputs: account_id (required), container_id (required), connection_id, session_token.

gtm_get_versionB

Get a single GTM container version's full content.

Inputs: account_id (required), version_id (required), container_id (required), connection_id, +1 more.

gtm_list_accountsC

List GTM accounts accessible to the connected Google user.

Inputs: connection_id, session_token.

gtm_list_containersC

List containers in a GTM account.

Inputs: account_id (required), connection_id, session_token.

gtm_list_tagsA

List tags in a GTM workspace (inspect-first; do not touch unrelated tags).

Inputs: account_id (required), container_id (required), workspace_id (required), connection_id, +1 more.

gtm_list_triggersC

List triggers in a GTM workspace.

Inputs: account_id (required), container_id (required), workspace_id (required), connection_id, +1 more.

gtm_list_variablesC

List variables in a GTM workspace.

Inputs: account_id (required), container_id (required), workspace_id (required), connection_id, +1 more.

gtm_list_versionsA

List version headers (published + drafts) of a GTM container.

Inputs: account_id (required), container_id (required), connection_id, session_token.

gtm_list_workspacesB

List workspaces in a GTM container.

Inputs: account_id (required), container_id (required), connection_id, session_token.

gtm_publish_versionB

Publish a prepared GTM version to live. PRIVILEGED: only call after explicit user approval.

Inputs: account_id (required), version_id (required), container_id (required), connection_id, +1 more.

gtm_resolveA

Resolve a GTM container publicId (e.g. GTM-XXXX) to account_id/container_id/workspace_id. Defaults to the customer's configured container.

Inputs: public_id, connection_id, session_token.

gtm_update_tagC

Update an existing GTM tag by id.

Inputs: tag (required), tag_id (required), account_id (required), container_id (required), +3 more.

gtm_update_triggerB

Update an existing GTM trigger by id.

Inputs: trigger (required), account_id (required), trigger_id (required), container_id (required), +3 more.

gtm_update_variableC

Update an existing GTM variable by id.

Inputs: variable (required), account_id (required), variable_id (required), container_id (required), +3 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 24 tools

    Disambiguation5/5

    Each tool is scoped by a clear product prefix (gtm_/ga4_) and a specific resource/action, so tags, triggers, variables, versions, and GA4 reporting tools are all easily distinguishable. The two resolve tools are also cleanly separated by domain. There is no meaningful overlap between tools.

    Naming Consistency4/5

    Tools overwhelmingly follow a product_verb_noun pattern in snake_case, such as gtm_list_tags, gtm_update_trigger, and ga4_run_report. The only minor deviation is gtm_resolve and ga4_resolve, which omit an explicit noun object, though they are still consistent with each other and easy to understand.

    Tool Count4/5

    24 tools is above the typical 3-15 sweet spot and feels slightly heavy, but the count is justified by covering two distinct Google products with multiple subresources. Each tool has a specific purpose, so the set is not bloated or redundant.

    Completeness4/5

    The GTM toolset covers the core tag/trigger/variable workflow through create, update, version, and publish, and the GA4 toolset covers property lookup and reporting. Minor gaps exist, such as no delete operations for GTM resources and no individual get for tags/triggers/variables, but these can generally be worked around with list operations.

    Maintenance

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to manage Google Tag Manager, Google Search Console, and Google Analytics (GA4) through unified access to tags, search performance data, URL inspection, sitemaps, and analytics reporting.
      7 npm
      ISC
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to interact with Google Analytics 4 data, providing tools for historical reporting, real-time activity monitoring, and property management. It supports secure service account authentication to access metrics like traffic summaries, user acquisition, and custom dimensions.
      MIT
    • A
      license
      B
      quality
      C
      maintenance
      Provides AI agents with hands-on control of Google SEO and analytics tools including Search Console, GA4, Tag Manager, Indexing API, and PageSpeed Insights, with self-configuring OAuth2.
      33
      14 npm
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI agents to read and write Google Analytics 4, Search Console, and Tag Manager data through MCP tools, with write operations gated behind an explicit flag for safety.
      20
      7 npm
      Apache 2.0