Docs
MCP
A small JSON-RPC endpoint for one site. Auth is the same site id as the read API. It does not invent visitors, rand, or pages. There is no CLI.
Markdown · same page for crawlers. index, follow.
Endpoint
POST https://www.zarstat.co.za/api/mcp?site=YOUR_SITE
site can also be a tool argument. Same id you already send to GET /api/read. No extra secret.
Methods
initialize— protocol2024-11-05, server namezarstattools/list—zarstat_overview,zarstat_pages,zarstat_channels,zarstat_referrers,zarstat_realtime,zarstat_goals,zarstat_funnels,zarstat_visitors,zarstat_hostnames,zarstat_identified,zarstat_timeseries,zarstat_countries,zarstat_devices,zarstat_browsers,zarstat_campaigns,zarstat_payments,zarstat_utm_term,zarstat_utm_content,zarstat_regions,zarstat_cities,zarstat_os,zarstat_entry_pages,zarstat_exit_pagestools/call— same numbers as the read API for that site and rangeping
Example
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "zarstat_overview",
"arguments": { "site": "YOUR_SITE", "range": "7d" }
}
}Empty sites return zeros and empty arrays — never sample rows. Range is 7d, 30d, or all. Optional from and to are Africa/Johannesburg calendar days. Amount is rand, not cents. GET /api/mcp lists the tools. The timeseries, countries, devices, browsers, campaigns, payments, utm-term, utm-content, regions, cities, os, entry-pages, and exit-pages tools return the same JSON shape as the matching GET /api/read route (ok, site, range, generated_at, plus the resource). The snippet is /cashline.js; /zarstat.js is the same file. This is not a full MCP product surface and not a CLI.