Agent-operated web + product analytics. 79 tools + 14 prompts; answers provably match the dashboard.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent — or use 1-click editor setup below.
💡 Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
web + product analytics in one Go binary. no ClickHouse, no Kafka, no cluster. ask it in your editor.
Live demo · Docs · Cloud · Star this repo ★
self-hosting posthog means clickhouse, kafka, redis and a postgres. this is one binary.
If you want product analytics you can actually run yourself, the options are bad. PostHog is a stack: ClickHouse, Kafka, Redis, and a Postgres to babysit. Plausible and Umami install easily but stop at web analytics, so no funnels, no retention, no cohorts.
smolanalytics is the middle that didn't exist. One Go binary, one data file, no external database. It does web analytics (visitors, referrers, UTM, devices) and product analytics (funnels, retention, paths, cohorts) from the same events, plus feature flags, A/B testing, click heatmaps, in-product surveys, a session inspector, and deploy-impact. Cookieless mode means no consent banner. MIT, free forever, and your data never leaves your box.
It also answers in plain English, from the dashboard or from your editor over MCP, using your own model, so the AI part costs nothing.
go runOpen localhost:8080: a fully populated dashboard, a "what to fix" verdict up top, and an ask bar with your real events and pages as one-click chips. Nothing to configure. Prefer not to install? The live demo is the real product on demo data, running right now.
This is the point of the whole tool. smolanalytics is an MCP server, so your coding agent queries your real analytics without you leaving the editor. It has your codebase, your tracking plan, and smolanalytics over MCP, so it answers in your terms: ask "what's the MAU for the PQR page" and it knows PQR is the /pqr route from your code. Your model does the reasoning, so there are no API keys and nothing metered.
Your model gets 79 tools and 14 built-in prompts, and it runs the whole product, not just queries: ask reports, roll out a flag, read the A/B result, create a cohort, set an alert, verify instrumentation. Anything it creates shows up on the dashboard instantly.
| Assistant | command | Assistant | command |
|---|---|---|---|
| Claude Code | smolanalytics connect claude-code | Cursor | smolanalytics connect cursor |
| Claude Desktop | smolanalytics connect claude | Windsurf | smolanalytics connect windsurf |
| VS Code (Copilot) | smolanalytics connect vscode | Cline | smolanalytics connect cline |
Claude Code, HTTP: claude mcp add --transport http smolanalytics http://localhost:8080/mcp. Any MCP client works (stdio + Streamable HTTP). When a read key is set, add "headers": { "Authorization": "Bearer YOUR_KEY" }.
Testing the endpoint by hand? Streamable HTTP requires an Accept header naming both content types, or the request is rejected:
There is also a built-in dashboard ask bar (zero setup, no code lookup) for quick data questions like "visitors to /pricing" or "where do people drop off?".
The usual advice is "run Plausible for web, something heavier for product, and separate tools for flags, experiments, and surveys." smolanalytics is all of it, computed from one append-only event log, and every surface is askable in your editor.
| what you get | ask it, or hit the API | |
|---|---|---|
| Product analytics | funnels (ordered / strict / unordered, exclusions, per-step filters, breakdowns), retention (rolling + weekly buckets), trends (count / sum / avg / p90), paths, lifecycle, stickiness, cohorts, sequenced behavioral cohorts, B2B account groups | funnel retention trends paths lifecycle stickiness create_sequence_cohort groups |
| Web analytics | visitors, live-now, top pages, referrers, UTM, devices, the Plausible-shaped view | web_overview · /v1/web |
| Feature flags | boolean + multivariate, property targeting + percentage rollout, deterministic bucketing so the SDK and the agent always agree; smol.flag() in the browser SDK | create_flag evaluate_flag · /v1/flags/evaluate |
| A/B testing | flags measured on a goal event, per-variant conversion after first exposure, lift vs control, 95% two-proportion z-test | flag_impact · /v1/flags/{key}/measure |
| Click heatmaps | click-density grid + top clicked elements per page and viewport, from $click autocapture | heatmap · /v1/heatmap |
| In-product surveys | NPS / rating / choice / text, URL + sampling targeting, dependency-free SDK widget | create_survey survey_results · /v1/surveys/* |
| Session inspector | event-based journey replay: pages, clicks with positions, rage-clicks, ms timing | list_sessions session_timeline · /v1/sessions |
| Deploy impact | before/after metric attribution per commit: which ship moved the metric | deploy_impact · /v1/deploys?event= |
Full tool + prompt reference: docs/prompts.md · the plain-GET stats API: docs/api.md.
The agreement test asserts, on every build, that the MCP answer equals the /v1 HTTP API answer byte-for-byte for the same question across funnel, retention, trends, web_overview, paths, heatmap, flag_impact, survey_results, list_sessions, and more. The dashboard renders from those same reports, so it cannot drift either. There is no second query path to disagree with. This is the one thing an AI-answer layer built on generated SQL structurally cannot promise.
One snippet autocaptures pageviews + clicks. Add track() for the moments you care about.
Ingestion is one endpoint, so anything with an HTTP client works (curl -XPOST $HOST/v1/events ...). And there are published native SDKs with an offline-safe queue, batching, sessions, and lifecycle events:
| Platform | install |
|---|---|
| Swift (iOS) | SPM: github.com/Arjun0606/smolanalytics-swift |
| Kotlin / Android | JitPack: com.github.Arjun0606:smolanalytics-android |
| React Native / Expo | npm: smolanalytics-react-native |
| Flutter / Dart | pub.dev: smolanalytics |
Framework guides (2 minutes each): Next.js · React · Vue · Backend · Mobile. Or paste one line into Cursor / Claude Code and let it instrument the app: docs/agents.md.
Every other tool shows you the graph dropped. It cannot tell you which ship dropped it, because it does not have your commits. Record a marker in CI (smolanalytics deploy, one line) and ask your editor "did my last deploy move signups?" and you get a before/after read that leads with any regression, computed from the same reports (correlation, not proof, and the copy says so).
| smolanalytics | Plausible / Fathom | Mixpanel / Amplitude | PostHog | |
|---|---|---|---|---|
| Funnels · retention · paths · cohorts | ✅ | ⚠️ paid / partial | ✅ | ✅ |
| Flags · A/B · surveys · heatmaps · sessions | ✅ one binary | ❌ | ⚠️ separate / paid | ✅ |
| Ask in plain English | ✅ your AI, free | ❌ | 💲 their AI | 💲 their AI + MCP |
| AI numbers match the dashboard | ✅ CI-enforced | n/a | ⚠️ | ⚠️ "may not match the UI" |
| Which deploy moved the metric | ✅ | ❌ | ❌ | ❌ |
| Self-host | ✅ one binary | ✅ | ❌ | ⚠️ Kafka + ClickHouse |
| Own your data · export | ✅ | ✅ | ⚠️ | ✅ |
Three things they structurally cannot copy: the AI is yours (they meter theirs); answers come from exact reports with CI proving they match the dashboard; your data never leaves your box.
One static binary, no cgo, no cluster. It binds 127.0.0.1 by default and refuses to serve real data unauthenticated on a public interface. Two keys: a public write key (ingest only, ships in your HTML) and a secret read key (reports, export, MCP). Scale to billions of events on flat RAM with an optional S3 / R2 / Tigris cold tier, keep a SMOLANALYTICS_RETAIN_DAYS window, and cron smolanalytics brief for a morning digest. Full config, backups, and the storage design: Deploy guide · STABILITY.md.
DELETE /v1/users/{id}/data). The answer to "who can see this data?" is: you.GET /v1/export hands you everything as CSV or JSONL, and the JSONL round-trips back into /v1/events. Import from PostHog, Mixpanel, Amplitude, Umami, CSV, or JSONL with original timestamps.Self-hosting is the free tier, unlimited, forever. The hosted cloud adds an isolated instance per project, your whole team, the morning brief delivered, and scale with zero ops. 14-day full-product trial (no card), then Pro $49/mo (1M events) or Scale $149/mo (10M events), flat $8 per extra million. Overage never locks your dashboard.
Feature flags, A/B, heatmaps, surveys, a session inspector, cohorts: all ship, all from the same binary. The single deliberate exception is pixel-perfect DOM / video session replay (the screen-recording kind), which needs a heavy recorder and a separate blob store and would break the single-binary model. The event-based session inspector ships instead. Also by design: no multi-node / clustering / HA. Exactly one writer per instance is why it self-hosts in 30 seconds.
PRs welcome. Keep it small, correct, and dependency-free (CONTRIBUTING.md). Security: SECURITY.md.
MIT, forever. No CLA, no relicense: the business is the hosted cloud, never the license. Use it, fork it, host it, sell hosting of it.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/smolanalytics)<a href="https://allmcps.com/mcp/smolanalytics"><img src="https://allmcps.com/api/badge/smolanalytics?style=directory" alt="Smolanalytics on AllMCPs" /></a>