
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.
概览
Slimlytics 的远程 MCP 服务器,提供无 Cookie 网站分析,让助手创建站点、接入跟踪代码并验证访问是否被记录。
- 可以做什么
- 创建或复用站点,获取跟踪代码片段与服务器配置
- 为 Caddy、Nginx 或 Apache 配置第一方跟踪代理路由
- 验证首个页面访问是否已成功上报
- 在同一账号下处理页面、来源、国家、设备、活动、目标等分析数据以及 Search Console 同步
- 适用场景
- 适合希望让 AI 编程助手用一句提示就为网站安装并验证隐私友好型网站分析的场景,也适合在对话中管理 Slimlytics 站点与跟踪配置。
- 运行要求
- 通过 streamable HTTP 连接 slimlytics.com 的远程端点,需要浏览器 OAuth 登录 Slimlytics 账号。托管服务对单个站点提供免费方案,另有付费方案;自托管则是独立的 Docker、PostgreSQL 与 Caddy 部署。
安装
在 SourceWeft 中
- 打开 控制台中的 Slimlytics,将其添加到工作区。
- 连接 所需的 凭据。它们会被私密存储,绝不会在公开页面上展示。
- 为需要使用其工具的对话启用该服务。
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.
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:
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
backend/— Axum, Tokio, SQLx, PostgreSQLfrontend/— Svelte 5, SvelteKit, TypeScripttracker/— framework-independent TypeScript trackercli/— installable Rust CLI for account, site, and tracking setup automationmigrations/— PostgreSQL schemadocker/— production container definitions and reverse proxyscripts/— 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:
Review the generated URLs and deployment settings before starting. The script refuses to overwrite an existing .env.
Then start the stack:
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:
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+
Docker with live reload
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:
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:
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:
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:
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:
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:
Backups are gzip-verified. Restore requires typing RESTORE and runs PostgreSQL with ON_ERROR_STOP.
Before upgrading:
- Run and verify a backup.
- Pull the desired tagged release.
- Run
docker compose build. - Run
docker compose up -d. - 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:
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_SECRETandVISITOR_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.mddocs/ARCHITECTURE.mddocs/REQUIREMENTS.mddocs/API.mddocs/openapi.jsondocs/PRIVACY.mddocs/PERFORMANCE.mddocs/FIRST_PARTY_PROXY.mddocs/SERVER_INGESTION.mddocs/CLI.mddocs/MCP.mddocs/AGENT_INTEGRATION.mddocs/MIGRATION.mddocs/OPERATIONS.mddocs/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/: theslimlyticscommand-line tool (cli/LICENSE)
Try it in a minute: slimlytics.com. Free hosted plan, no card required.
来源:README.md,提交 e9845ce
工具
0版本历史
1- v1.0.0最新Oct 12, 2026
评分
已满足适用检查项的 85%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通必需25 分
- 已声明认证方式必需10 分
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分