Provider REST API

Analytics

Connect Claude to Google Analytics

Query GA4 properties, reports, audiences, and events. Toolspoke puts 12 of its actions behind one MCP endpoint that Claude, Cursor, and Codex all speak.

Connection
Provider REST API
Authentication
Sign in with Google
Actions exposed
12
Cost per call (typical)
1 credit
Adapter
Maintained by Toolspoke

Connected in three steps

  1. 1

    Install Google Analytics

    Open the marketplace in your workspace, add Google Analytics to the project your agents work in, and it appears on the gateway immediately.

  2. 2

    Connect the credential

    Sign in to Google Analytics. Toolspoke holds the token encrypted and refreshes it when it expires.

  3. 3

    Point your agent at the gateway

    Give your client one address, https://toolspoke.com/mcp. Claude Code takes it as a command, Claude and Claude Desktop add it as a custom connector, and Cursor, Codex and VS Code each read it from a config file of their own.

.mcp.json
{
  "mcpServers": {
    "toolspoke": {
      "type": "http",
      "url": "https://toolspoke.com/mcp"
    }
  }
}

One block covers every tool you have installed. Google Analytics shows up in the client as soon as your policy allows it, and so does everything else you install later.

Where the address goes, per client

Claude Code

Run it in your project, then /mcp to sign in

claude mcp add --transport http toolspoke https://toolspoke.com/mcp
Claude and Claude Desktop

Settings, then Connectors, then Add custom connector

https://toolspoke.com/mcp
Cursor

~/.cursor/mcp.json, or .cursor/mcp.json for one project

{ "mcpServers": { "toolspoke": { "url": "https://toolspoke.com/mcp" } } }
Codex

~/.codex/config.toml

[mcp_servers.toolspoke]
url = "https://toolspoke.com/mcp"
VS Code

.vscode/mcp.json, or the MCP: Add Server command

{ "servers": { "toolspoke": { "type": "http", "url": "https://toolspoke.com/mcp" } } }

What Google Analytics asks for

Press connect and sign in to Google Analytics. Toolspoke keeps the token encrypted and refreshes it when it expires, so there is nothing to copy and nothing to rotate by hand.

Default GA4 property IDOptional
Used whenever an action is called without an explicit property_id. Admin → Property Settings in GA4.
123456789

The scopes it asks for

  • https://www.googleapis.com/auth/analytics.readonly

What Claude can do in Google Analytics

12 actions, each one declared and named by the connector rather than discovered at runtime. A workspace policy grants a person all of them, a hand-picked selection, everything on the read side, everything on the write side, or none.

Reads
12Reads
Writes
0Writes
Destructive
0Destructive

Reads

12

Fetches data and changes nothing.

  • list_accounts

    List the Google Analytics accounts the connected user can reach, each with the GA4 properties underneath it. Call this first when you do not know which property ID to report on.

  • list_properties

    List GA4 properties. Pass account_id to list only the properties under one account; omit it to flatten every property from every account the user can reach. Returns the numeric property IDs the reporting actions need.

  • get_property

    Fetch the configuration of one GA4 property - display name, time zone, reporting currency, industry category and creation time. Read the time zone and currency from here before interpreting date ranges or revenue metrics.

  • list_data_streams

    List the web, iOS and Android data streams feeding a GA4 property, including the web measurement ID and stream URLs. Use it to confirm which site or app a property actually collects data from.

  • list_custom_dimensions

    List the custom dimensions and custom metrics registered on a property, with the API names to use in run_report (customEvent:name, customUser:name). Check here before assuming a business-specific field is reportable.

  • list_custom_metrics

    List a property's custom metrics. Call list_custom_dimensions for its custom dimensions.

  • list_dimensions_and_metrics

    Look up the dimension and metric API names a property supports, including its custom definitions. Call this when run_report rejects a field name, or to discover the exact spelling of a field before building a report. Results are searchable and capped, so pass a search term rather than fetching the whole catalogue.

  • run_report

    Run an arbitrary GA4 report: pick dimensions, metrics, a date range, sorting and an optional filter. This is the general-purpose reporting action - use it for anything the top_pages and traffic_sources presets do not cover. Field names must be GA4 Data API names (activeUsers, sessions, pagePath, sessionDefaultChannelGroup); look them up with list_dimensions_and_metrics if a name is rejected. Rows come back as flat objects keyed by field name.

  • realtime_report

    Report on activity in the last 30 minutes. Only the realtime schema is available: metrics activeUsers, screenPageViews, eventCount, keyEvents; dimensions country, city, deviceCategory, platform, eventName, unifiedScreenName, audienceName, streamId, minutesAgo. Use it for 'who is on the site right now' questions.

  • top_pages

    Rank the most-viewed pages or screens over a date range with views, active users and engagement time. A preset over run_report for the common 'what content is performing' question.

  • traffic_sources

    Break traffic down by acquisition channel, source/medium or campaign over a date range, with sessions, users, engagement and revenue. A preset over run_report for 'where are visitors coming from' questions.

  • check_compatibility

    Check whether a set of dimensions and metrics can appear in the same GA4 report before running it. Call this when run_report fails with an incompatibility error - the response says which fields clash and which remain usable.

What it will not do

Enforced by the gateway rather than left to convention, which is why each of these can be stated flatly.

It cannot call anything else
The 12 actions above are the whole of it. A call to any other name is refused before it reaches Google Analytics rather than forwarded on, and connecting your account does not add to the list: it is fixed by the connector, not discovered at run time.
It only reads
Every action here reads. Nothing this connector can do changes anything in Google Analytics.
It reaches no further than your credential
Toolspoke holds no access to Google Analytics of its own. Every call carries the credential you stored and nothing besides, so whatever that credential cannot reach, this connector cannot reach either.
It never hears from Google Analytics
Nothing is pushed to it. There is no webhook, no subscription and no polling, so this connector cannot notice by itself that something changed in Google Analytics. An agent has to ask.
It does not smooth over provider limits
Toolspoke does not retry, queue or back off around Google Analytics's own rate limits. A call that Google Analytics refuses comes back to the agent as a failed call.

Before you connect it

What can Claude do in Google Analytics?

12 named actions: 12 that only read. They include list_accounts, list_properties and get_property. Nothing outside that list is reachable: the connector declares each operation by name rather than proxying whatever an agent asks for.

What credentials does the Google Analytics connector need?

Nothing to paste. You sign in to Google Analytics over OAuth 2.0 and Toolspoke keeps the resulting token encrypted, refreshing it when it expires. It asks for https://www.googleapis.com/auth/analytics.readonly, and can do nothing outside them.

Does the Google Analytics connector work with Cursor and Codex, or only Claude?

Any client that speaks MCP, and every one of them gets the same 12 actions. There is a single address, https://toolspoke.com/mcp. Claude Code adds it with claude mcp add --transport http, Claude and Claude Desktop take it as a custom connector in settings, Cursor reads it from .cursor/mcp.json, Codex from ~/.codex/config.toml, and VS Code from .vscode/mcp.json. Each of them signs in to the gateway itself, so there is no key to paste.

What does the Google Analytics connector not do?

The 12 actions above are the whole of it. A call to any other name is refused before it reaches Google Analytics rather than forwarded on, and connecting your account does not add to the list: it is fixed by the connector, not discovered at run time. Every action here reads. Nothing this connector can do changes anything in Google Analytics. Toolspoke holds no access to Google Analytics of its own. Every call carries the credential you stored and nothing besides, so whatever that credential cannot reach, this connector cannot reach either. Nothing is pushed to it. There is no webhook, no subscription and no polling, so this connector cannot notice by itself that something changed in Google Analytics. An agent has to ask. Toolspoke does not retry, queue or back off around Google Analytics's own rate limits. A call that Google Analytics refuses comes back to the agent as a failed call.

Can I limit which actions an agent can call?

Yes, in two places. The project switches Google Analytics's actions on and off one at a time, for everyone in the project at once, and the screen groups them by read, write and destructive so turning off everything that deletes is one click. An individual agent key can then be narrowed further, to particular toolkits in a project and to particular actions in a toolkit. Whatever it was granted, a key never reaches a project its owner cannot.

What gets recorded when an agent calls Google Analytics?

Every attempt, with the agent that made it and the person that agent belongs to, the full request payload, the response payload, the status, the duration, and the credits spent. Values whose key names a secret are masked out before the record is shown to anyone. An operation the connector marks as not retained never has its response body written at all, so the gateway keeps no second copy of what was read.