How to Use the Google Analytics MCP in Cursor
Feed live GA4 metrics directly into your codebase using Cursor to generate accurate components with real data.
Works with every AI agent you already use
…and any MCP-compatible client
Connect Google Analytics MCP to Cursor
Create your Vinkius account to connect Google Analytics to Cursor and route execution through our secure gateway. The platform manages server hosting, runtime updates, and security layers. Configuration requires no manual server provisioning.
Inject real analytics data into Cursor code
The `run_report` tool pulls live GA4 metrics directly into your editor so you can build dashboard components with real data. Instead of writing mock objects, your agent queries your property and writes React or Vue components using the actual JSON structure. This eliminates integration bugs before you commit your code. Using this MCP Server, your agent reads the exact schema of your property. You get working code that matches your actual tracking setup on the first try.
Verify API parameters before deploying
The `check_compatibility` tool validates your metric and dimension combinations before you write your API integration code. This prevents runtime errors in your production app by catching incompatible queries during the design phase. Your agent runs this check instantly inside the Chat pane. If you need to know what fields are available, the `get_metadata` tool lists every standard and custom dimension configured in your property. This metadata guide keeps your development focused on active tracking fields.
Build live monitoring widgets
The `run_realtime_report` tool pulls active user sessions and page path counts into your workspace to help you build live status widgets. Your agent uses these real-time data shapes to write reliable websocket or polling components. You see exactly how the UI handles traffic surges as you write the code. To manage large setups, the `list_properties` tool helps your agent discover and switch between different tracking IDs across your accounts. This makes it easy to test your code against staging and production environments.
Set up Google Analytics MCP in Cursor
Prerequisites
- Cursor installed (macOS, Windows, or Linux)
- Active Vinkius subscription with a valid endpoint token
- 1
Open MCP Settings
Go to Cursor Settings → MCP or open the Command Palette (
Cmd+Shift+P/Ctrl+Shift+P) and search for "MCP: Add Server". - 2
Add the Google Analytics MCP
Cursor will create or open
.cursor/mcp.jsonin your project root. Paste the JSON snippet on the right. Replace[YOUR_TOKEN_HERE]with your endpoint token from cloud.vinkius.com. - 3
Enable Agent mode
Open Composer (
Cmd+I/Ctrl+I) and switch to Agent mode using the dropdown at the top. MCP tools are only available in Agent mode. - 4
Verify the connection
Ask Cursor something like "List my recent Google Analytics transactions." If the MCP tools are loaded correctly, Cursor will call the Google Analytics tools automatically. You can also check Settings → MCP for a green status indicator.
{
"mcpServers": {
"google-analytics-mcp": {
"url": "https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp"
}
}
} Independent Platform Disclaimer: Vinkius is an independent platform and is not affiliated with, endorsed by, sponsored by, verified by, or otherwise authorized by Google Analytics 4. All third-party trademarks, logos, and brand names are the property of their respective owners. Their use on this website is strictly for informational purposes to identify service compatibility and interoperability.
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 Cursor
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.