GA4 numbers, next to the code that produced them
Analytics is downstream of a decision somebody made in a file. Every session, every event and every conversion in a property exists because a line of code fired, named something, and passed along whatever it was given. That is why reading the numbers in one window while the code that generates them sits in another is a worse arrangement than it looks. When you connect google analytics 4 to claude code the two halves finally occupy the same session, and the question stops being what the chart says and becomes what the chart says compared with what we told it to record.
The connector URL
https://api.mevnix.com/mcp
The same URL for every source. Add it once in Claude Code; it carries whichever accounts you have connected.
A property only reports what it was instructed to collect
GA4 is often read as though it observed your website. It did not. It received a stream of events under names something in your code chose, and everything downstream is arithmetic over that stream. A funnel with a hole in it is frequently a property that was never sent the middle step, and a conversion count of zero is much more often a missing mark than a business nobody buys from. None of those distinctions are visible in the interface, because from inside the property an event that never arrived and an event that never happened look exactly the same.
Asking beats configuring, and the terminal is where you already are
Getting a non-standard answer out of the interface means building an exploration: choosing dimensions, choosing metrics, applying a filter, then discovering the combination is not permitted. Pulling ga4 from the terminal replaces that with a sentence, and more importantly with a second sentence — the follow-up that would have meant rebuilding the whole thing. For anyone whose day is mostly spent in a shell, the winning feature is not intelligence but proximity: the question gets asked because asking it costs nothing, where opening a reporting tool costs enough that you usually decide you did not need to know.
When a number is wrong, the bug is in a file you have open
Here is the case that justifies an analytics mcp for claude code over any other way of reading a property. Your form fires an event the code calls one thing; the property is marking a key event under a slightly different spelling; the two never meet, and the report says nobody enquired. In a browser that is an afternoon of suspicion. In a session holding both, it is two questions: which event names has the property actually received this month, and which names does this repository send. The answer is a diff, and it is the single most common analytics fault there is.
Setting it up
- Authorise Google once
Connect your Google account on this site. A single consent screen covers Analytics and Search Console together, and you decide afterwards which properties are readable, so an account with a dozen of them exposes only the ones you choose.
- Register the address on the command line
Add the address above as an HTTP MCP server in Claude Code under a name of your choosing. One command, written into your Claude Code configuration, with nothing installed locally and no key on disk.
- Sign in, then ask where the code lives
Complete the browser sign-in from the MCP command inside a session. Start Claude Code in the project that serves the site and the assistant can read your property and your tracking code in the same breath.
Free covers one source of each type and three sources in total. $9/month removes the limits on one business; running several is $19 for the first and $9 for each one after it — see pricing.
Questions
- Why not use the official Google Analytics server instead?
- Often you should, and our guide comparing them says so plainly. It is free, first-party, and if GA4 is the only thing you need it is hard to argue with. The trade is setup and reach: it wants a Cloud project, credentials and a local process, it covers one platform, and it runs only on the machine you installed it on. This is hosted, works from any machine you sign in on, and carries Search Console and ad spend through the same connection.
- Can it change my property or my tracking setup?
- No. The Analytics grant is read-only, so creating a key event, editing a data stream or altering a filter are not available to it under any phrasing of the request. Changes to your tracking code are edits in your project, which your editor makes with your approval exactly as it would any other change.
- Does it work with several properties at once?
- Yes, and it will ask rather than guess. With one property connected it resolves silently and you never name it. With several it lists them and waits, because quietly picking the oldest one and reporting its numbers under a question about a different site is a failure you would not catch for weeks.
- Is the data current when I ask?
- Standard reports lag a few hours, which is how GA4 works rather than anything imposed here, and the realtime view covers roughly the last half hour. Responses are cached briefly so a run of follow-up questions does not become a run of upstream requests against your quota.