What it does
Time-bucketed metric over a period. pageviews/visitors/sessions include AI-mediated human browsing (ai_user_action) — see traffic_class_breakdown to see the AI-vs-direct split.
Example prompts
Ask:
"Show me pageviews day-by-day for the last 30 days on mysite.com."
"Hourly visitor count for the last 24 hours."
"Weekly trend for sessions over the past quarter."
A typical response:
Pageviews, daily, last 30 days for mysite.com:
2026-04-20 1,847
2026-04-21 1,920
2026-04-22 2,114
2026-04-23 8,412 ← spike (HN thread)
...
2026-05-17 8,114
2026-05-18 7,420
2026-05-19 2,890
Returns an array of { ts, value } objects.
The metric argument controls what's measured:
pageviews, visitors, or sessions.
The granularity argument controls bucket size:
hour, day, or week. Long periods
at hour-granularity return a lot of rows. Consider day or week for
ranges over 30 days.
Counts include AI-mediated human browsing. See
traffic_class_breakdown
to see the AI-vs-direct split if it matters for your interpretation.
Pair with
compare_periods
for headline-style "is this up or down?" rather than the full
day-by-day list.
Arguments
| Name | Type | Required | Description / Default |
|---|---|---|---|
site_id |
string | required | Site identifier from list_sites (8-character base32, e.g. 'wjxayhdd'). |
metric |
string enum: pageviews, visitors, sessions |
required | Which metric to compute over the period. Volume metrics include AI-mediated human browsing. |
period |
string | optional |
Time window. Keywords: today, yesterday, last_7_days, last_30_days, last_90_days, last_12_months. Or a custom date range YYYY-MM-DD..YYYY-MM-DD (inclusive).
default: last_7_days
|
granularity |
string enum: hour, day, week |
optional |
Time bucket size for the series. Use 'hour' for last_24h analysis, 'day' for week/month views, 'week' for quarter+.
default: day
|
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": "get_timeseries",
"arguments": {
"site_id": "abc12345",
"metric": "pageviews"
}
}
}'
Token comes from /settings after you sign up. Replace any required arguments above.
Related tools
regenerate_api_token: Invalidate the current API token and issue a new one.list_sites: List all sites on the authenticated account.get_tracking_snippet: Return the HTML <script> snippet for a given site_id.color_scheme_breakdown: Share of visitors with prefers-color-scheme: dark vs light.breakdown: Breakdown of visits by browser, os, device_type, or country (country empty in MVP).