What it does

Register a new site. privacy_mode is chosen at creation and cannot be changed later; it defaults to 'balanced' when omitted. The modes trade visitor metrics against privacy posture (see the privacy_mode parameter for specifics) — surface that trade-off to the user before creating the site rather than silently accepting the default.

Example prompts

Ask:

"Add example.com to my mcp-analytics account in strict privacy mode."
"Set up tracking for newsite.com in balanced mode."
"Add mysecondsite.com."

A typical response (after Claude requests your approval to call this write tool):

Added example.com to your account.

  site_id:       abc12345
  privacy_mode:  strict (no cookies, daily-rotating salt)
  created_at:    2026-05-19T14:33:21Z

Paste this snippet into the <head> of every page you want
tracked:

  <script defer
    data-site="abc12345"
    src="https://t.mcp-analytics.com/script.js"></script>

That's it. No further configuration needed.

Returns the new site object plus the tracking snippet. The site_id is permanent and public. The privacy_mode is set once at creation and cannot be changed later. Choose carefully:

  • balanced (default): no cookies, same-day visitor dedup via a daily-rotating salted hash. Daily uniques are exact, multi-day uniques overcount. The industry-standard cookieless model (Plausible and Fathom work the same way); no banner needed.
  • strict: no cookies and no visitor IDs at all, unique_visitors stays 0. The most conservative option; no banner needed.
  • all: persistent cookie, exact cross-session tracking. You handle the consent banner.

This is the write tool you'll call during onboarding, so Claude will prompt for your approval before invoking it on the first call. If you lose the snippet later, get_tracking_snippet returns it again; that one is read-only and changes nothing.

Free tier allows unlimited sites. The 100k hits/month cap is account-wide across all sites combined.

Arguments

Name Type Required Description / Default
domain string required Site hostname without scheme. Examples: 'mysite.com', 'blog.example.org'.
privacy_mode string
enum: strict, balanced, all
optional strict: no cookies, no visitor IDs ever computed — unique_visitors is permanently 0, sessions still work (daily-rotating server-side salt); the most conservative option. balanced (default): no cookies or client-side storage; visitors counted via a server-side hash of IP + user agent + a salt that is forgotten every UTC day — daily unique visitors are exact, multi-day uniques overcount (the industry-standard cookieless model, as used by Plausible/Fathom); respects Do-Not-Track, no consent banner needed. all: persistent cookie + localStorage visitor ID, exact cross-session visitor counts, ignores Do-Not-Track — fullest data, and the site owner is responsible for consent/GDPR.
default: balanced
timezone string optional IANA timezone identifier for the site's audience, e.g. 'Europe/Berlin', 'America/New_York'. Decides where the site's days and weeks start: period keywords, custom date ranges and get_timeseries buckets resolve in this zone. Rails-style names such as 'Berlin' or 'Eastern Time (US & Canada)' are rejected. Defaults to UTC when omitted; there is no tool to change it later (the account settings page can). Server-side identity still rotates at UTC midnight, so a visit spanning that instant counts as two sessions (and, on balanced sites, as two visitors within one local day).
default: UTC

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": "add_site",
    "arguments": {
      "domain": "example.com"
    }
  }
}'

Token comes from /settings after you sign up. Replace any required arguments above.

Related tools

  • top_pages: Most-viewed URL paths.
  • top_user_agents: Top User-Agent strings with their traffic_class.
  • list_events: All event names with counts (includes 'pageview' and custom events).
  • get_tracking_snippet: Return the HTML <script> snippet for a given site_id.
  • top_bots: Named-bot breakdown: which crawlers fetched the site, by canonical bot name (GPTBot, ClaudeBot, PerplexityBot, Googlebot, ...) with their traffic_class and hit counts.