SSyncDev

Goatcounter MCP Server

This project provides a Model Context Protocol (MCP) server for interacting with the [Goatcounter](https://www.goatcounter.com/) web analytics API.

Local serverstdioPython

What is the Goatcounter MCP Server?

This project provides a Model Context Protocol (MCP) server for interacting with the Goatcounter web analytics API. It allows

What it actually does

  • Provides tools for most Goatcounter API endpoints
  • Handles API key and site code configuration via environment variables (GOATCOUNTER_API_KEY, GOATCOUNTER_CODE)
  • Lazy initialization of the API client: Tools can be listed even if API credentials are not yet configured
  • Rate Limit Handling — Implements automatic retries with backoff when encountering API rate limits (HTTP 429)
  • Prioritizes the X-Rate-Limit-Reset header for waiting if provided by the API
  • Falls back to exponential backoff (starting at 1 second) with random jitter if the header is unavailable or invalid

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
Parametersstart (string, optional): Start date (YYYY-MM-DD or relative e.g., '7 days ago').
Returnsobject - A list of location statistics and pagination info.
afterinteger, optional): Pagination cursor.
endstring, optional): End date (YYYY-MM-DD or relative e.g., 'yesterday').
filterstring, optional): Filter paths (e.g., '/blog').
dailyboolean, optional): Show daily statistics instead of totals (default: false).
limitinteger, optional): Limit number of returned results (1-200, default 20).

How to install the Goatcounter MCP Server

{
  "mcpServers": {
    "goatcounter-mcp-server": {
      "command": "goatcounter-mcp-server",
      "args": [],
      "env": {
        "PYTHONUNBUFFERED": "1",
        "GOATCOUNTER_CODE": "goatcounter_code",
        "GOATCOUNTER_API_KEY": "YOUR_GOATCOUNTER_API_KEY"
      }
    }
  }
}

From the project documentation. Replace placeholders and example paths before connecting.

Configuration

VariableDescriptionRequired
PYTHONUNBUFFEREDDeclared in the maintainer’s client configuration.Check documentation
GOATCOUNTER_CODEDeclared in the maintainer’s client configuration.Check documentation
GOATCOUNTER_API_KEYDeclared in the maintainer’s client configuration.Check documentation

Frequently asked questions

This project provides a Model Context Protocol (MCP) server for interacting with the [Goatcounter](https://www.goatcounter.com/) web analytics API. It allows Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.