How to Use the Google Analytics MCP in Claude Code
Query GA4 metrics, run funnel reports, and build terminal dashboards directly from Claude Code.
Works with every AI agent you already use
…and any MCP-compatible client
Connect Google Analytics MCP to Claude Code
Create your Vinkius account to connect Google Analytics to Claude Code and route execution through our secure gateway. The platform manages server hosting, runtime updates, and security layers. Configuration requires no manual server provisioning.
Terminal-based GA4 reporting and automation
Claude Code queries `run_report` and `batch_run_reports` directly from your terminal, piping the raw JSON output into jq or local files. This terminal-first setup makes it easy to write shell scripts that fetch daily metrics. You get direct access to your database without leaving your command line. It bypasses the slow web UI entirely.
Automate audience exports via this MCP Server
This MCP Server lets your agent trigger and monitor exports using `list_audience_exports` and `get_audience_export` straight from the command line. You can script these tools to run on a cron job, pulling fresh user lists directly into your backend. No manual CSV downloads are required. It handles the extraction in the background.
Instant real-time site monitoring
By running `run_realtime_report` and `get_user_activity`, Claude Code lets you monitor your site's health during a major product launch. The agent instantly pulls active user counts and event streams to your terminal. If anomalies appear, you get immediate answers without loading heavy browser dashboards. You see the live traffic patterns instantly.
Set up Google Analytics MCP in Claude Code
Prerequisites
- Claude Code CLI installed (
npm install -g @anthropic-ai/claude-code) - Active Vinkius subscription with a valid endpoint token
- 1
Run the add command
Open your terminal and run the command shown on the right. Replace
[YOUR_TOKEN_HERE]with your endpoint token from cloud.vinkius.com. Use--scope userto make it available across all projects. - 2
Verify the connection
Start a Claude Code session and type
/mcpto list connected servers. You should seegoogle-analytics-mcpwith a green status indicator. - 3
Start using tools
Ask Claude Code something like "Check my latest Google Analytics transactions." It will automatically discover and invoke the available Google Analytics tools.
claude mcp add --transport http google-analytics-mcp https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp Why Choose Vinkius
Vinkius connects your tools to AI with real-time monitoring and automatic cost savings — all from one dashboard.
Real-time monitoring
Live
visibility into every interaction
Connect your favorite tools to your AI and see exactly what's happening — every request, every response, in real time.
Built-in savings
60%
lower AI costs
Vinkius compresses data between your apps and your AI automatically. Lower bills every month — no configuration required.
Single dashboard
One
place for every integration
Every tool your AI connects to, managed from a single screen. One account, complete control.
Common questions about Google Analytics MCP in Claude Code
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the Google Analytics MCP today
We host it, we monitor it, we maintain it. You just paste one token.