Openanalytics

Analytics and monitoring

Open-source, privacy-first and cookieless web analytics with revenue attribution and an MCP server.

Your AI app calls the Openanalytics MCP server, which does the analytics and monitoring work and sends the result back to the chat.

About Openanalytics

Openanalytics is a community MCP server from OpenLabs-so, filed in our directory under analytics and monitoring. Open-source, privacy-first and cookieless web analytics with revenue attribution and an MCP server.

At a glance

Publisher
OpenLabs-so (community)
Runs
See the README for setup
Written in
TypeScript
License
AGPL-3.0
GitHub stars
654

How to set up Openanalytics

  1. Follow the install steps in the Openanalytics README; it is written in TypeScript, so have that toolchain ready.
  2. Check the Openanalytics README for keys or settings; the registry lists none that Openanalytics requires.
  3. Add Openanalytics to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Openanalytics tools to confirm the connection.
  5. Run one read-only task with Openanalytics first, and keep your app asking before each tool call until the results look right.

Openanalytics compared with similar servers

  • Marmot Data Catalog by marmotdata has fewer GitHub stars than Openanalytics (645 against 654); both are community servers, and both run locally.
  • Oxynote by oxynote has more GitHub stars than Openanalytics (721 against 654); both are community servers, and both run locally.
  • dbt by dbt-labs has fewer GitHub stars than Openanalytics (626 against 654); dbt is official while Openanalytics is a community server, and both run locally.

Before you connect Openanalytics

  • Give Openanalytics its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Openanalytics tool call until you trust what it does with them.
  • Treat text that Openanalytics fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Openanalytics on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Openanalytics

How marketing and sales teams put Openanalytics to work, by company size. Pick the size closest to yours and start Openanalytics on one use case.

Small business

  • A small business can ask Openanalytics where this month's customers came from and which channel is worth more budget.
  • Owners can use Openanalytics to get a weekly traffic and conversion summary in plain words, without learning the analytics tool.
  • Openanalytics runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Marketing teams can connect Openanalytics to answer attribution and funnel questions in a chat, then save the useful ones as reports.
  • Growth teams can have Openanalytics flag drops in signups or conversion the day they happen, with the page or source that changed.
  • Start Openanalytics on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprises can expose governed metrics through Openanalytics, so every team's AI answers use the same definitions as finance.
  • Large analytics teams can use Openanalytics to triage anomalies across regions and products before the weekly business review.
  • Openanalytics is a community server, so have security review the code and pin a version before Openanalytics touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Openanalytics README

From OpenLabs-so/openanalytics on GitHub, shared under its AGPL-3.0 license. Images are left out; the original has them.

README.md

OpenAnalytics

Privacy-first web analytics. One lightweight tracker script, no cookies, no cross-site profiles, aggregate-only reads, self-hostable on your own hardware under AGPL-3.0.

A hosted instance runs at getopen.so, operated by the authors: the same code, someone else's servers.

Sponsored by the Neon Open Source Program. Neon is the managed Postgres behind getopen.so and the one we recommend for self-hosting, see Deploying with Neon.

▶ Watch the dashboard in motion, a tour of these same screens on YouTube.

What is in this repository

The product, as one pnpm monorepo:

App Role
apps/tracker The browser snippet, a few KiB, with a byte budget CI enforces
apps/collector Ingest: validates, sanitizes, rate-limits, enqueues
apps/worker Drains the queue into ClickHouse; sessions, rollups, exports, mail, deletions
apps/api Control plane: auth, sites, keys, sharing, event definitions, funnels, widgets, revenue, AI assistant, MCP
apps/query-gateway The only process allowed to read ClickHouse; verifies signed query envelopes
apps/realtime The SSE stream behind the live dashboard
apps/web The dashboard (Next.js)
apps/cli oa, site setup, stats, device-flow login
packages/* domain, postgres (+migrations), clickhouse (+migrations), redis, auth, contracts (OpenAPI), observability, integrations, migrations, testkit

Stores: Postgres (control plane), ClickHouse (events and rollups), Valkey ×2 (one durable event queue, one losable realtime cache).

What it does, in one list: page views, custom and attribute-driven events, sessions, web vitals, funnels, per-site retention, embeddable widgets, public share links, revenue analytics from your Stripe account, CSV/JSON import and export, an MCP server, and a CLI.

Who is on the site now, from a presence cache rather than a table scan. Names are generated per visitor and mean nothing outside the day they were minted.

Where one visitor went, session by session. The identity behind a trail is a salted hash that rotates every night, so the trail is as long as a visit and never as long as a person.

Where they are, at city level and only when a site opts in. The lookup runs against a database on your own disk and never leaves the host.

Architecture rules CI enforces, not conventions:

  • apps/web may import only packages/contracts, the OpenAPI document is the single seam between frontend and backend.
  • ClickHouse is reachable only through the query gateway, which verifies Ed25519-signed query envelopes minted by the api.
  • The tracker has a hard byte budget; a change that exceeds it fails CI.
  • The Postgres schema this repository builds contains no billing tables, and a CI job asserts that against a real database rather than a file list.

Self-hosting

SELF-HOSTING.md is the guide: a generator script, one docker compose up -d, automatic TLS, and an explanation of every secret and every failure mode. Requirements are a Linux host with Docker, four DNS records, about 4 GB of RAM and 25 GB of free disk.

Installing is a pull, not a build. A release publishes ten images to ghcr.io/openlabs-so/openanalytics, so a fresh host is a few minutes and needs no toolchain on it.

Point four names at the host before you start. Certificates are issued on the first boot and issuance fails without them, half an hour later and nowhere near the cause:

app.example.com   api.example.com   c.example.com   rt.example.com
git clone https://github.com/OpenLabs-so/openanalytics
cd openanalytics
git checkout "$(git tag -l 'v*' --sort=-v:refname | sed '/-/d' | head -1)"   # newest release, not main
cd infra/selfhost
./generate-secrets.sh --domain example.com --email you@example.com --with-geoip
docker compose pull && docker compose up -d
# then open https://app.example.com and create the first account

The checkout is where the version is chosen, and it is chosen once. The generator reads the tag back out of the tree it is standing in and points .env at that release's images, printing which it picked and why; on a branch, on main, or with no git at all it writes the build defaults instead. That is not a convenience, the compose file, the env templates and the migrations ship with the images, so a release's images against another tree is a configuration nobody has tested.

Postgres can live on Neon instead of on the host. The stack bundles a Postgres container, and Neon is the managed option we recommend: four environment variables and one line in .env, and Postgres backups and point-in-time restore become Neon's job. infra/selfhost/NEON.md walks through it, including moving an existing install across.

Images are amd64. On arm64, or to run a branch, build the ten here instead: same compose file, one flag, about ten minutes and swap on a 4 GB box. Later, ./upgrade.sh moves between releases and takes the snapshot ./rollback.sh needs, because migrations do not go down: the way back is a restore, and a restore discards what arrived after the upgrade. It tells you that before it starts, not at rollback time when you no longer have a choice. RELEASING.md is what a version number here means.

To run it from source instead, for development, or to slot the services into infrastructure you already have, follow Running from source. The order matters and one obvious order does not work: the migration runners are compiled output, so pnpm run build comes before pnpm run migrate:postgres.

infra/selfhost/env/*.env.example documents every variable each service reads, and there is one file per service on purpose, the environment schema forbids some keys to some services, so a single shared .env cannot be correct. The AI assistant (OPENAI_API_KEY) and object storage are optional: unset, those surfaces disable themselves and everything else runs.

Run the test suite the way CI does:

pnpm run test          # unit + contract + tracker, no infrastructure needed
pnpm run verify        # everything CI checks, including boundaries and the size budget

Privacy model

No cookies, no fingerprinting, no cross-site identifiers. Visitor identity is a daily-rotating salted hash; raw IP addresses are never stored. Do Not Track and Global Privacy Control are honored at the collector, before anything is written. City-level geolocation is opt-in per site.

Geolocation is resolved locally against a database on your own disk, no lookup ever leaves the host. None is bundled (a 60 MB download, and stale within a month); infra/selfhost/geoip/fetch-dbip.sh downloads one.

IP Geolocation by DB-IP, https://db-ip.com, used under CC BY 4.0.

Contributing

Pull requests are merged here, with your name on the commit. This repository used to receive periodic exports from a private monorepo, and a merged PR was flattened by the next one; that ended in August 2026. A bot asks you to sign the CLA once, it is not an assignment, you keep your copyright, and there is no DCO sign-off on top of it.

CONTRIBUTING.md has the setup, the ground rules CI enforces, and where to start. Discussions are for questions and for ideas worth talking through first.

Security reports: SECURITY.md, please not a public issue.

License and trademark

Code: AGPL-3.0. If you run a modified OpenAnalytics as a network service, the AGPL requires you to offer your modified source to its users.

The browser tracker is the exception: apps/tracker/ and the oa.js it builds are MIT, because it is the one file that runs on your site, not on the server. Embedding it creates no obligation under the AGPL.

The "OpenAnalytics" name and the hosted service's domain identify the instance its authors operate and are not part of the license grant. A self-hosted instance runs the software, not the brand.

Questions about Openanalytics

What is the Openanalytics MCP server?

Open-source, privacy-first and cookieless web analytics with revenue attribution and an MCP server. Openanalytics is maintained by OpenLabs-so on GitHub at OpenLabs-so/openanalytics, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Openanalytics MCP server?

Openanalytics doesn't publish a one-line install in the MCP registry, so follow the setup steps in its README on GitHub (OpenLabs-so/openanalytics). Like most servers, Openanalytics ends with a command or URL you paste into your AI app's MCP config.

Does Openanalytics need an API key?

The registry lists no required keys for Openanalytics. Check the Openanalytics README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is Openanalytics an official MCP server?

No. Openanalytics is a community server maintained by OpenLabs-so. Community servers can be excellent; read the code and the open issues before you give Openanalytics access to company data.

What license is Openanalytics under?

Openanalytics is released under the AGPL-3.0 license, according to its GitHub repository. The license covers the code of Openanalytics; the service it connects to has its own terms.