Use MCP to connect TopStat to Cursor, Claude Code or Codex — or call it from any terminal CLI. Ask in plain English to analyze traffic, understand revenue and manage your account.
TopStat exposes a standard MCP server over HTTP (JSON-RPC 2.0). Point any MCP client at the URL below — no SDK required.
https://topstat.top/api/mcp
Authentication: sign in to TopStat in your browser for session-based access, or use a read-only token from one of your public share links as a Bearer token.
Works with every MCP-capable client. Pick your tool below and paste the config.
In the dashboard, open Public sharing and create a share link for your site — the token after ?token= is your read-only MCP key. Signed-in browser sessions also work.
Paste the config into Cursor, Claude Code, Codex or any MCP client. Replace YOUR_TOKEN with the token from step 1.
In your editor or terminal, ask things like “How is traffic this week vs last week?” — the agent calls TopStat tools and answers with real numbers.
{
"mcpServers": {
"topstat": {
"url": "https://topstat.top/api/mcp",
"transport": "http",
"headers": {
"Authorization": "Bearer YOUR_TOKEN"
}
}
}
}
claude mcp add --transport http topstat \ https://topstat.top/api/mcp \ --header "Authorization: Bearer YOUR_TOKEN"
[mcp_servers.topstat] url = "https://topstat.top/api/mcp" http_headers = { Authorization = "Bearer YOUR_TOKEN" }
https://topstat.top/api/mcp
Claude Desktop connects to remote MCP servers via custom connectors. Add the URL above, then sign in to TopStat in your browser so the session cookie can be used.
Five tools are exposed over MCP — everything needed for day-to-day analytics questions.
| Tool | What it returns |
|---|---|
topstat_list_sites | All websites tracked in your account, with event counts. |
topstat_get_stats | Visitors, pageviews, channels, countries, devices and top pages for a period. |
topstat_get_funnels | Funnels with step-by-step conversion analysis. |
topstat_get_revenue | Revenue totals and attribution by channel and country. |
topstat_get_journey | A visitor's pageview replay, or the most active sessions. |
Create your first share token, connect your editor, and start asking.
Open dashboard