How much traffic?
Count MCP requests over time and by method. Notifications are counted separately, so they do not inflate request totals.
MCP Analytics for GA4
See which tools get called, which AI assistants use them, and how often. Add an open source Java library to your server. The reports live in your own GA4 account.
Keep MCP activity alongside the rest of your analytics, without running another dashboard or hosted collector.
Count MCP requests over time and by method. Notifications are counted separately, so they do not inflate request totals.
Break down tool calls by name. Track outcomes and duration to understand what gets used and where calls fail.
Compare reported agents such as Claude, ChatGPT and Cursor, with recognized bots and health checks identified separately.
Record explicit source and campaign tags or available referrer evidence. When discovery information is missing, it stays unknown.
Agent names are reported metadata, not verified identities or visitor counts. Optional application hooks also record searches, link opens and attributed orders. See metric coverage.
Use your existing Java MCP server. Events leave through a bounded background queue, keeping network calls off the request thread.
Follow the Google Analytics setup guideInstall with Gradle
repositories { mavenCentral() }
dependencies {
implementation 'io.github.shanifdhanani:mcp-analytics-ga4:0.1.1'
}