Goatcounter MCP Server
@rafaljanicki
About Goatcounter MCP Server
No overview available yet
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"goatcounter-mcp-server": {
"command": "npx",
"args": [
"-y",
"@smithery/cli",
"install",
"@rafaljanicki/goatcounter-mcp-server",
"--client",
"claude"
]
}
}
}Tools
No tools detected
Fetch the live tool list by running this server in a temporary sandbox using the button above.
Overview
What is Goatcounter MCP Server?
Goatcounter MCP Server is a Model Context Protocol server that exposes the Goatcounter web analytics API as standardized tools. It enables language models or other MCP clients to query site statistics, page data, referrers, browsers, operating systems, screen sizes, and locations.
How to use Goatcounter MCP Server?
Install via PyPI (pip install goatcounter-mcp-server) or from source. Set the GOATCOUNTER_CODE and GOATCOUNTER_API_KEY environment variables (in a .env file or directly). Run the server with the goatcounter-mcp-server command. For Claude Desktop, add a corresponding entry to claude_desktop_config.json.
Key features of Goatcounter MCP Server
- Provides tools for most Goatcounter API endpoints.
- Handles API key and site code configuration via environment variables.
- Lazy initialization: tools can be listed before credentials are set.
- Automatic retries with backoff on HTTP 429 rate limits (up to 5 retries).
- Runs directly using the
fastmcpcommand-line tool.
Use cases of Goatcounter MCP Server
- Query total pageviews and unique visitors over a custom date range.
- List most‑visited pages with optional path filtering.
- Analyze referrer, browser, operating system, screen size, and location statistics.
- Paginate through large sets of paths, stats, or referrers.
- Retrieve current user or API token information and list accessible sites.
FAQ from Goatcounter MCP Server
What environment variables are required?
The server requires GOATCOUNTER_CODE (your Goatcounter site subdomain) and GOATCOUNTER_API_KEY (an API token generated under Settings → API tokens).
How does rate limit handling work?
The server automatically retries requests that receive a 429 response. It first respects the X-Rate-Limit-Reset header, falling back to exponential backoff with random jitter starting at 1 second, up to 5 retries.
Can I list the available tools without an API key?
Yes. The server uses lazy initialization, so tools can be listed even if GOATCOUNTER_CODE or GOATCOUNTER_API_KEY are not yet configured.
How do I install Goatcounter MCP Server?
It can be installed via Smithery (npx -y @smithery/cli install @rafaljanicki/goatcounter-mcp-server --client claude), from PyPI (pip install goatcounter-mcp-server), or directly from the GitHub repository.
How do I configure it for Claude Desktop?
Edit claude_desktop_config.json to add a goatcounter-mcp-server entry with the command (e.g., goatcounter-mcp-server) and environment variables under env. Then restart Claude Desktop.
Frequently asked questions
What environment variables are required?
The server requires `GOATCOUNTER_CODE` (your Goatcounter site subdomain) and `GOATCOUNTER_API_KEY` (an API token generated under Settings → API tokens).
How does rate limit handling work?
The server automatically retries requests that receive a 429 response. It first respects the `X-Rate-Limit-Reset` header, falling back to exponential backoff with random jitter starting at 1 second, up to 5 retries.
Can I list the available tools without an API key?
Yes. The server uses lazy initialization, so tools can be listed even if `GOATCOUNTER_CODE` or `GOATCOUNTER_API_KEY` are not yet configured.
How do I install Goatcounter MCP Server?
It can be installed via Smithery (`npx -y @smithery/cli install @rafaljanicki/goatcounter-mcp-server --client claude`), from PyPI (`pip install goatcounter-mcp-server`), or directly from the GitHub repository.
How do I configure it for Claude Desktop?
Edit `claude_desktop_config.json` to add a `goatcounter-mcp-server` entry with the command (e.g., `goatcounter-mcp-server`) and environment variables under `env`. Then restart Claude Desktop.
Basic information
More Other MCP servers
IDA Pro MCP
mrexodiaAI-powered reverse engineering assistant that bridges IDA Pro with language models through MCP.

Lemon.io
lemon-ioRequest dedicated senior developers to work on your project, write job descriptions, and prep technical interviews — all without leaving your Claude chat. Just describe what you need, and Lemon.io MCP does the rest. 1–3

DeepMark
DeepMark helps teachers deliver rapid, consistent marking with meaningful feedback for every student — in a fraction of the time. What once took a week, now takes one free period.
ICSS
chokcoco不止于 CSS
Activepieces
activepiecesAI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
Comments