What it does
All event names with counts (includes 'pageview' and custom events). Each entry also carries `properties`: the custom-property names observed on that event in the period, most-frequently-sent first, capped at 50 — use it to pick a valid group_by_property for event_details instead of guessing. An empty list means the event carried no properties in this window. Volume metric — counts include AI-mediated human browsing (ai_user_action). `unique_sessions` counts browser sessions only, since server-side-ingested rows carry no session, so it can be 0 while `count` is not. With filters.event set it answers "what else do the people who fired X do".
Example prompts
Ask Claude (or any MCP client connected to mcp-analytics) something like:
What custom events fired on mysite.com last 14 days?
The client will pick list_events automatically based on the prompt and your account's available sites.
Arguments
| Name | Type | Required | Description / Default |
|---|---|---|---|
site_id |
string | required | Site identifier from list_sites (8-character base32, e.g. 'wjxayhdd'). |
period |
string | optional |
Time window. Keywords: today, yesterday, last_N_days (N from 1 to 730: today plus the N-1 days before, e.g. last_7_days, last_28_days), last_24_hours, this_week, last_week (weeks start on Monday), this_month, last_month, this_year, last_year, last_12_months. Or a custom date range YYYY-MM-DD..YYYY-MM-DD (inclusive). Days follow the site's timezone (list_sites; echoed as `timezone` in every response).
default: last_7_days
|
filters |
object | optional | Optional segment filter. All given keys must match (AND; no OR, no negation); an empty string means not set. Keys: path (exact) or path_prefix; device_type, browser, os (exact, case-sensitive); referrer_host, utm_source, utm_medium, utm_campaign (exact); channel (search, ai_assistant, social, email, paid, campaign, referral, direct; as top_referrers group_by: channel assigns it). path/path_prefix match rows: pageviews count rows on matching paths, sessions/visitors count those with at least one matching row, and bounce_rate/avg_session_duration_seconds use all rows of those sessions. referrer_host, utm_* and channel match the session's entry (its first pageview in the period) and then select every row of the matching sessions, in every privacy mode. In top_entry_pages, top_referrers, top_sources and get_overview's top_source, path/path_prefix also test the entry: path_prefix '/blog/' there means sessions that entered on /blog/. Source and device filters make every number browser-only: server-side-ingested rows (including AI-mediated ai_user_action) have no session and no device fields, so they never match; the response then adds a `filter_note`. In get_overview, bot_share is null under any key other than path/path_prefix. With conversion_event the filter narrows the units; the conversion itself still counts anywhere in the period. Event filter: `event` keeps only units (session; visitor on privacy_mode=all sites) that fired that custom event anywhere in the period (order not considered), then counts every row of them, e.g. the pages read by visitors who clicked an offer. `event_property` plus `event_value` (exact) or `event_value_prefix` narrows it to occurrences carrying that property value; values are strings (a number as "149"), case-sensitive. Unlike event_name (which event a metric counts) and conversion_event (adds a rate), `event` narrows who is counted; it makes every number browser-only, and filtering on the conversion event itself makes every rate 1.0. The applied filters are echoed back as `filters`. |
How to call it directly
If you're integrating from your own code rather than a chat client, this is the JSON-RPC payload:
curl -X POST https://mcp-analytics.com/mcp \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "list_events",
"arguments": {
"site_id": "abc12345"
}
}
}'
Token comes from /settings after you sign up. Replace any required arguments above.
Related tools
get_overview: TL;DR for the period: headline metrics (pageviews, visitors, sessions, bounce rate, avg session duration) plus pageviews_change_pct vs the previous equivalent window (same elapsed length; its bounds are returned in previous_period as local time with offset), top page, top traffic source, bot share, and top_events: the site's own events by count (up to 10; pageview and the engagement beacon are left out; list_events has them all).viewport_breakdown: Pageviews bucketed by viewport width: mobile_xs (<480), mobile (<768), tablet (<1024), desktop (<1440), desktop_xl (≥1440).remove_site: Soft-delete a site.engagement_overview: Real reading time + scroll depth from the engagement beacon (fired on pagehide).get_timeseries: Time-bucketed metric over a period.