Betterlytics — Claude Code MCP server: web analytics in your agent
Hooks your coding agent up to a Betterlytics project so you can ask about traffic, funnels, errors and uptime without leaving the chat.
claude mcp add --transport http betterlytics https://betterlytics.io/api/mcpWhat Betterlytics does
Betterlytics is an open-source analytics stack built on Rust and ClickHouse. It covers page views, referrers, recorded sessions, funnels, client-side errors, Core Web Vitals and availability checks. Its MCP server exposes that data to an AI client, so a question about a number does not mean opening a browser tab.
The endpoint lives at https://betterlytics.io/api/mcp and speaks HTTP. Claude and Codex take a single add command; Cursor and GitHub Copilot want a JSON block in their config; Gemini CLI gets a line naming the http transport. Nothing runs on your machine.
Queries are scoped to your account, so an empty project returns nothing useful. Hosting is either the vendor's EU cloud or your own Docker install. Tracking itself sets no cookies.
What it helps with
- check last week's traffic and referrers from the chat
- see where a funnel drops visitors between steps
- group frequent client errors and jump to the matching session replay
- confirm uptime and SSL certificate expiry mid-task
- compare Core Web Vitals across two date ranges
Example prompts for the agent
- Show me traffic for the past seven days and where visitors came from
- Which site errors showed up most this week?
- Compare LCP and INP for last month against this one
How to install Betterlytics
Platform CLI: remote server
claude mcp add --transport http betterlytics https://betterlytics.io/api/mcpPlatform CLI: remote server
codex mcp add betterlytics --url https://betterlytics.io/api/mcpConfig file
{
"mcpServers": {
"betterlytics": {
"url": "https://betterlytics.io/api/mcp"
}
}
}Config file
{
"servers": {
"betterlytics": {
"type": "http",
"url": "https://betterlytics.io/api/mcp"
}
}
}Platform CLI: remote server
gemini mcp add -t http betterlytics https://betterlytics.io/api/mcpStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Betterlytics
How do I install Betterlytics in Claude Code?
Run claude mcp add --transport http betterlytics https://betterlytics.io/api/mcp. The server is remote, so there is nothing to install locally.
What does Betterlytics do?
It is AGPL-3.0 web analytics. The MCP side lets an agent read your traffic, funnels, user journeys, error groups and availability data.
Do I need to self-host Betterlytics?
No, but you do need an account with a project, since the server answers from your analytics. Deployment is either managed cloud in the EU or Docker on your own hardware.