LabscoMCP early access ↗
rafaljanickiMCP SERVER

Goatcounter

Queries Goatcounter analytics — hits, referrers, browsers, locations — with rate-limit retries built in.

by rafaljanicki ↗SEO, Web & Product AnalyticsCommunity

LABSCO SUMMARY

The rate-limit handling is why it survives a real question.

Analytics questions turn into several calls — totals, then paths, then referrers for the interesting ones — which is exactly the pattern that trips an API limit and leaves the assistant with a half-answer. Retrying on 429 while respecting the reset header means the chain finishes instead of failing midway. Goatcounter's own privacy stance is the other reason to use it: the numbers come from a service that is not tracking your visitors individually.

What it is

A client for Goatcounter, the privacy-focused web analytics service, covering most of its API. It reads totals and hit series, and breaks traffic down by referrer, browser, operating system, screen size and location. The client initialises lazily, so tools can be listed before credentials are configured.

What you get

  • Goatcounter_get_stats_total and Goatcounter_get_stats_hits return overall totals and the hit series
  • Goatcounter_get_stats_refs breaks traffic down by referrer
  • Goatcounter_get_stats_browsers and Goatcounter_get_stats_systems break it down by browser and operating system
  • Goatcounter_get_stats_sizes and Goatcounter_get_stats_locations cover screen size and geography
  • Goatcounter_list_paths lists the pages being counted, and Goatcounter_list_sites the sites on the account
  • Goatcounter_get_me reports the authenticated account
  • Automatic retries on HTTP 429, honouring X-Rate-Limit-Reset when present and falling back to exponential backoff with jitter, up to 5 attempts

Requirements

A Goatcounter site and an API token generated under Settings then API tokens, with the permissions matching what you plan to call. Set GOATCOUNTER_CODE to your site code — the subdomain part — and GOATCOUNTER_API_KEY to the token. Install with pip install goatcounter-mcp-server (package goatcounter-mcp-server, version 0.2.4) and run the goatcounter-mcp-server command.

Setup effort

One command plus a key — pip install goatcounter-mcp-server, then supply credentials