Slimlytics

io.github.djedi由 GitHub 帳號 djedi 發布v1.0.0更新於 Nov 2, 2026

Privacy-first cookieless web analytics with agent one-prompt setup via remote MCP OAuth.

已驗證Streamable HTTP可網頁執行開發者工具資料與分析

概覽

AI 產生的概覽

Slimlytics 的遠端 MCP 伺服器,提供無 Cookie 網站分析,讓助理建立網站、接上追蹤程式碼並確認造訪是否被記錄。

可以做什麼
  • 建立或沿用網站,取得追蹤程式碼片段與伺服器設定
  • 為 Caddy、Nginx 或 Apache 設定第一方追蹤代理路由
  • 確認第一個頁面瀏覽是否已成功回報
  • 在同一帳號下處理頁面、來源、國家、裝置、活動、目標等分析資料以及 Search Console 同步
適用情境
適合想讓 AI 程式助理用一句提示就為網站安裝並驗證重視隱私的網站分析的場合,也適合在對話中管理 Slimlytics 網站與追蹤設定。
執行需求
透過 streamable HTTP 連線到 slimlytics.com 的遠端端點,需要以瀏覽器 OAuth 登入 Slimlytics 帳號。託管服務對單一網站提供免費方案,另有付費方案;自架則是獨立的 Docker、PostgreSQL 與 Caddy 部署。
安裝前請注意
此伺服器會操作真實的統計帳號:可建立網站、加入追蹤設定並變更 Search Console 資源,套用前請先確認變更內容。免費方案之外的託管方案需要付費。自架部署需要 JWT_SECRET、VISITOR_HASH_SECRET 等密鑰,且不應以明文 HTTP 對外暴露。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Slimlytics,將其新增到工作區。
  2. 連接 所需的 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
  3. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.djedi%2Fslimlytics/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。 客戶端會在首次連接時完成 OAuth 登入。

{
  "mcpServers": {
    "slimlytics": {
      "type": "http",
      "url": "https://slimlytics.com/api/mcp"
    }
  }
}

README

Slimlytics

Private, real-time web analytics. Know what works, skip the noise.

Website · Start free (hosted) · Pricing · Docs · Agent setup · Privacy model

[Watch the 30-second Slimlytics tour]

Slimlytics shows you who is on your site right now, where they came from, and what they did, without cookies, fingerprinting, or session replay. One small first-party script, a clean dashboard, and a live visitor stream. Your AI coding agent can even install it for you.

Looking for the product? Head to slimlytics.com. You do not need to clone this repository to use Slimlytics. The hosted version has a free plan and takes about a minute to set up.

Hosted or self-hosted: your call

Every feature is included on every option. Pick the one that fits.

Slimlytics Cloud (hosted)Self-hosted (this repo)
Best forAnyone who wants analytics, not another server to babysitTeams who want full control of their infrastructure
SetupCreate an account, paste one script tagDocker Compose, PostgreSQL, Caddy
Servers, upgrades, TLS, GeoIP dataHandled for youYou run them
CostFree plan for one site; paid plans from $7/month$0, unlimited sites and page views
SupportCommunity, email, or priority email by planCommunity
Get startedCreate a free accountQuick start below

Plan limits and current prices are on the pricing page.

Why Slimlytics

  • Private by default. No tracking cookies, no cross-site profiles, no form capture. Sensitive query parameters are redacted before storage, and Do Not Track and Global Privacy Control are respected.
  • Real-time Spy. Watch visitors arrive and move through your site as it happens.
  • Reports that matter. Pages, referrers, countries, devices, campaigns, visitors, and custom events, ranked and exportable to CSV.
  • Goals and marketing insights. Goals, UTM attribution, journeys, sequential funnels, revenue, anomalies, AI referrals and crawlers, and optional Google Search Console sync with a dashboard view of queries, pages, countries, and devices. Slimlytics can add and DNS-verify a site's Search Console property for you.
  • First-party delivery. Serve the tracker from your own domain with generated Caddy, Nginx, or Apache routes, so ad blockers break it less often.
  • Agent-native. A remote MCP server with browser OAuth lets Claude Code, Codex, Hermes, or any MCP client create your site, wire up tracking, and verify it.
  • Fast and small. A Rust API, PostgreSQL, and a Svelte dashboard with light, dark, and system themes.

Let your AI agent install it

Connect your coding agent to the hosted MCP server once, then ask it to set up analytics:

bash
claude mcp add --transport http slimlytics https://slimlytics.com/api/mcp
text
> Set up Slimlytics for https://shop.example.com behind Nginx and verify it.

The agent creates the site, adds the first-party proxy routes and script tag, and confirms the first page view landed. Codex and Hermes instructions are in the agent guide (repository copy: docs/MCP.md). Scoped personal tokens and the REST API are also supported.


Self-hosting and development

Everything below is for running your own instance or contributing. If you just want analytics, Slimlytics Cloud is the faster path.

Feature details

  • Multiple sites with independent write keys, origins, timezones, and retention settings
  • 28-day overview cards and comparison metrics
  • Real-time Spy activity over Server-Sent Events
  • Pages, referrers, countries, devices, campaigns, visitors, and custom events
  • Standard UTM attribution and basic goals
  • CSV export
  • Cookieless tracking by default
  • Bot filtering by crawler product name and by published Google, Meta, and Bing crawler networks
  • "Ignore my visits" opt-out link per browser, with no cookies
  • Sensitive query-parameter redaction and no form capture
  • First-party tracker delivery to reduce accidental blocking
  • Clicky-style first-party proxy setup with per-site paths, Caddy/Nginx/Apache configuration, and test links
  • Responsive Svelte interface with light, dark, and system themes
  • Docker Compose deployment with PostgreSQL and Caddy

Architecture

text
Browser tracker ──POST──▶ Rust/Axum API ──▶ PostgreSQL                              │Dashboard ◀── JSON + SSE ─────┘    ▲    └──────── Caddy ──────── Internet
  • backend/ — Axum, Tokio, SQLx, PostgreSQL
  • frontend/ — Svelte 5, SvelteKit, TypeScript
  • tracker/ — framework-independent TypeScript tracker
  • cli/ — installable Rust CLI for account, site, and tracking setup automation
  • migrations/ — PostgreSQL schema
  • docker/ — production container definitions and reverse proxy
  • scripts/ — verified backup and guarded restore tooling

Self-hosting quick start

Requirements: Docker with Compose v2+. Prefer not to run servers? Slimlytics Cloud is free to start.

Generate a private .env with independent random database, JWT, and visitor-hash secrets:

bash
./scripts/generate-env.sh

Review the generated URLs and deployment settings before starting. The script refuses to overwrite an existing .env.

Then start the stack:

bash
make updocker compose pscurl --fail http://localhost:8080/health

Open http://localhost:8080 for the public marketing site. Create an account at /register (or sign in at /login), then use the dashboard at /app to add a site and copy its generated tracking snippet. Pricing and privacy pages live at /pricing and /privacy. The default listener is deliberately loopback-only and is suitable for local use or an existing TLS reverse proxy.

For a public VPS where this stack should terminate TLS itself, point DNS at the host, set SLIMLYTICS_DOMAIN and ACME_EMAIL in .env, then run:

bash
docker compose -f compose.yaml -f compose.production.yaml up -d --build

The production overlay publishes ports 80/443, enables automatic HTTPS, persists Caddy certificates, and configures the application origin. Do not expose the base HTTP stack directly to the Internet.

Local development

Requirements:

  • Rust 1.97.1 (pinned in rust-toolchain.toml)
  • Node.js 24+
  • PostgreSQL 16+
bash
make setupmake testmake checkmake build

Docker with live reload

bash
make dev        # http://localhost:8080make dev-logs   # follow frontend and backend outputmake down

make dev layers compose.dev.yaml over the normal stack. Svelte changes hot-reload in the browser through Caddy. Changes to backend sources, Cargo.toml/Cargo.lock, build.rs, migrations, or docs/openapi.json rebuild and restart the API automatically. The first backend build compiles every dependency and takes a few minutes; later rebuilds are incremental. If edits are not detected (some network or VM file systems), set VITE_WATCH_POLLING=true in .env. Run make up to return to the production-like images.

Visitor locations

make geoip downloads the free DB-IP City Lite database (CC BY 4.0, no account) to data/geoip/, and Compose mounts it into the backend. Lookups happen locally, so visitor IPs are never sent to a third party. Production deploys refresh it monthly. Without the file, locations are simply disabled. Local requests arrive from private Docker addresses, which have no location; test against a deployment or with cargo test --test enrichment -- --ignored (set GEOIP_TEST_DATABASE). Trusted Cloudflare location headers take precedence when TRUST_PROXY=true.

Test locally with a real account

make sync-account copies one account from a remote deployment into the local Docker database, so you can sign in locally with the same email and password and see the same sites and analytics. Configure SYNC_SOURCE_SSH, SYNC_SOURCE_PATH, SYNC_SOURCE_COMPOSE_FILES, SYNC_EMAIL, and optionally SYNC_EVENT_DAYS in .env (see .env.example). The remote is only read; locally, that account and its sites are replaced, including any local site with the same domain. Other users, API tokens, OAuth state, and Search Console connections are never copied, and report subscriptions arrive disabled. Both databases must be on the same migration.

Without Docker

Start PostgreSQL with Docker if desired, then run the API and Svelte dev server separately:

bash
docker compose up -d dbexport DATABASE_URL='postgres://slimlytics:YOUR_PASSWORD@localhost:5432/slimlytics'cargo run --manifest-path backend/Cargo.tomlnpm --prefix frontend run dev

Tracker

The dashboard generates random, editable first-party paths plus the matching Caddy, Nginx, or Apache configuration. After installing that server configuration, the measured site needs only a same-origin snippet:

html
<script async src="/456bbb63bb86.js"></script>

The generated JavaScript path returns the complete tracker initialized for that site's exact beacon path. The generated test links verify both routes without inserting a fake analytics event. See docs/FIRST_PARTY_PROXY.md.

The tracker never captures form values. Cookieless tracking, Do Not Track, and Global Privacy Control behavior are documented in docs/PRIVACY.md.

Rust CLI and AI agents

Install the slimlytics binary with Rust's Cargo:

bash
cargo install --locked --git https://github.com/djedi/slimlytics --tag cli-v0.2.0 slimlytics-clislimlytics auth login --email [email protected]

Login exchanges the short-lived password session for an expiring, revocable personal API token. The credential file is stored in the operating system's private configuration directory with 0600 permissions; automation can instead provide SLIMLYTICS_TOKEN without writing a file.

The idempotent command intended for AI agents creates or reuses a domain and returns the complete server configuration, same-origin snippet, and test URLs:

bash
slimlytics --json site ensure example.com --server caddy

The complete public guide is available at https://slimlytics.com/docs/cli; docs/CLI.md is the repository copy. The interactive Scalar API reference is at https://slimlytics.com/api/docs, backed by the downloadable OpenAPI 3.1 document at https://slimlytics.com/api/openapi.json.

Operations

Production releases use the guarded deployment script:

bash
make deploy

The script requires a clean main branch whose HEAD is already pushed to origin/main. It connects through the dedicated slimdeploy account, requires canonical-path and repository-sentinel checks before any synchronization, runs the complete local test/check/build suite with a lockfile-pinned OpenAPI validator, creates a verified PostgreSQL backup and a source rollback snapshot, synchronizes source while preserving production .env and backups, applies compose.yaml with the production compose.proxy.yaml overlay, and verifies health, readiness, the exact OpenAPI contract, redirect behavior, and the deployed Scalar stylesheet. A failed deployment automatically restores the prior source snapshot, reapplies Compose, and waits for healthy services.

Manual backup and guarded restore remain available:

bash
./scripts/backup.sh./scripts/restore.sh backups/slimlytics-YYYYMMDDTHHMMSSZ.sql.gz

Backups are gzip-verified. Restore requires typing RESTORE and runs PostgreSQL with ON_ERROR_STOP.

Before upgrading:

  1. Run and verify a backup.
  2. Pull the desired tagged release.
  3. Run docker compose build.
  4. Run docker compose up -d.
  5. Verify /health, /ready, the dashboard, and test ingestion.

Rollback by checking out the previous tag and restoring the pre-upgrade backup if the migration is not backward compatible.

Admin portal

/admin lists accounts, their sites, devices, and passkeys, and can sign accounts out, disable, re-enable, or delete them. Every action is recorded in an audit log. Grant access from the deployment directory:

bash
scripts/admin-grant.sh [email protected]            # make an adminscripts/admin-grant.sh [email protected] --revoke   # remove admin access

An admin must add a passkey under Account security (/account). The portal then requires a session that verified that passkey within the last 12 hours. If someone loses every passkey, confirm their identity and run scripts/passkey-reset.sh EMAIL; they can then sign in with their password and add a new one.

Security

  • Never commit .env.
  • Use unique 32+ byte values for JWT_SECRET and VISITOR_HASH_SECRET.
  • Use the tested production Compose overlay or another trusted TLS reverse proxy; never expose login or analytics traffic over plaintext HTTP.
  • Keep PostgreSQL private; Compose does not publish its port.
  • Restrict each site to expected origins.
  • Rotate site write keys and application secrets after suspected exposure.

See SECURITY.md for reporting and deployment guidance.

Documentation

  • docs/IMPLEMENTATION_PLAN.md
  • docs/ARCHITECTURE.md
  • docs/REQUIREMENTS.md
  • docs/API.md
  • docs/openapi.json
  • docs/PRIVACY.md
  • docs/PERFORMANCE.md
  • docs/FIRST_PARTY_PROXY.md
  • docs/SERVER_INGESTION.md
  • docs/CLI.md
  • docs/MCP.md
  • docs/AGENT_INTEGRATION.md
  • docs/MIGRATION.md
  • docs/OPERATIONS.md
  • docs/BILLING.md

Project status

The current release includes collection diagnostics, marketing insights, sequential funnels, Search Console sync, and scoped REST/MCP access for agents. Retention cohorts, heatmaps, uptime monitoring, scheduled notification delivery, white-labeling, and a plugin marketplace remain later features.

Contributing

Issues and pull requests are welcome. Read CONTRIBUTING.md for the development loop and privacy review checklist, and SECURITY.md for reporting vulnerabilities privately.

This codebase is a ground-up rewrite of the earlier Slimlytics projects.

License

Slimlytics is open source under the GNU Affero General Public License v3.0. You can run, study, modify, and self-host it freely. If you offer a modified version to others as a network service, the AGPL requires you to make your modified source available to its users.

Two components meant to be embedded in other projects use the permissive MIT License instead:

  • tracker/: the browser tracker script that runs on your website (tracker/LICENSE)
  • cli/: the slimlytics command-line tool (cli/LICENSE)

Try it in a minute: slimlytics.com. Free hosted plan, no card required.

來源:README.md,提交 e9845ce

工具

0
該伺服器需要登入,因此 SourceWeft 無法在沒有帳號的情況下讀取其工具,也未收錄。已連接帳號所能看到的內容可能因帳號及其權限而異。

版本歷史

1
  1. v1.0.0最新Oct 12, 2026

評分

已滿足適用檢查項的 85%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分