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.

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. 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

  • top_pages: Most-viewed URL paths.
  • top_timezones: Top IANA timezones (Europe/Berlin, America/New_York, ...) of visitors.
  • get_started_guide: Markdown walkthrough of the mcp-analytics workflow: adding sites, installing the tracker, querying analytics, custom events.
  • top_movers: What changed between two periods: the rows of one dimension that grew or shrank the most, in one call instead of diffing two list calls.
  • add_site: Register a new site.