How to Use the Google Analytics 4 MCP in VS Code Copilot
Query live Google Analytics 4 traffic reports directly inside VS Code Copilot with this MCP Server.
Works with every AI agent you already use
…and any MCP-compatible client
Connect Google Analytics 4 MCP to VS Code Copilot
Create your Vinkius account to connect Google Analytics 4 to VS Code Copilot and route execution through our secure gateway. The platform manages server hosting, runtime updates, and security layers. Configuration requires no manual server provisioning.
Team-wide analytics access inside VS Code Copilot
`run_report` allows your entire engineering team to pull live traffic metrics directly within VS Code Copilot using a shared configuration. By saving the MCP config in `.vscode/mcp.json`, every developer on the team can query the same GA4 property instantly. If you need to build cross-functional dashboards, `batch_run_reports` lets Copilot pull multiple metrics in a single pass. This ensures your team builds features backed by actual user behavior data instead of guesswork.
Check tracking schemas with an enterprise MCP Server
`check_compatibility` checks your custom dimension and metric combinations inside the VS Code Copilot chat interface. This prevents developers from deploying broken analytics tracking code that mismatches the GA4 API schema. For deeper integration, `get_metadata` exposes the exact analytical fields available for your property. VS Code Copilot references this metadata to help developers write clean, bug-free event tracking code that matches your live production configuration.
Monitor production deployments in real-time
`run_realtime_report` pulls active visitor counts and real-time event triggers directly into VS Code Copilot. When your team deploys a new feature, you can monitor the immediate impact on user engagement without leaving your editor. To analyze who is using the new features, `get_device_breakdown` separates traffic by mobile, desktop, and tablet. Copilot presents this data inline, helping you quickly identify platform-specific bugs immediately after a release.
Set up Google Analytics 4 MCP in VS Code Copilot
Prerequisites
- VS Code 1.99 or later with GitHub Copilot extension
- Active Vinkius subscription with a valid endpoint token
- 1
Open MCP configuration
Open the Command Palette (
Cmd+Shift+P/Ctrl+Shift+P) and run "MCP: Add Server". Select HTTP (Streamable) as the server type. VS Code will create.vscode/mcp.jsonin your workspace. - 2
Add the Google Analytics 4 MCP
Paste the JSON snippet shown on the right into your
.vscode/mcp.json. Replace[YOUR_TOKEN_HERE]with your endpoint token from cloud.vinkius.com. - 3
Switch to Agent mode
Open Copilot Chat (
Cmd+Shift+I/Ctrl+Shift+I) and switch to Agent mode using the dropdown. MCP tools are only available in Agent mode — they do not appear in Edit or Ask modes. - 4
Verify the connection
In the Copilot Chat input, type
#to list available tools. You should see the Google Analytics 4 tools listed. Try asking: "List my recent Google Analytics 4 transactions" and Copilot will invoke them automatically.
{
"mcpServers": {
"google-analytics-4-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 4 MCP in VS Code Copilot
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the Google Analytics 4 MCP today
We host it, we monitor it, we maintain it. You just paste one token.