Staats

io.github.MrViolets由 GitHub 账号 MrViolets 发布v1.0.1更新于 Nov 2, 2026

Cookieless web analytics your coding agent reads: traffic answers, deploy impact, what broke.

已验证Streamable HTTP可网页运行开发者工具数据与分析

概览

AI 生成的概览

托管的无 Cookie 网站分析服务,让助手回答流量问题、标记部署、衡量部署影响并发现报错。

可以做什么
  • 读取流量总览、按维度拆分、转化漏斗和实际访问路径
  • 把部署和改动记录为标注,并对比前后的指标变化
  • 发现异常流量波动、来源激增以及 JS 错误和访客受阻情况
  • 读取和更新站点背景信息,如目标、受众和漏斗步骤
  • 列出、创建和永久删除站点,并查看所有站点的整体概览
适用场景
适合在向网站发布改动后,让助手查看流量、把变化归因到某次部署,或排查报错和流失,而无需打开仪表盘。适合希望在自己的编码助手里直接获得分析结论的开发者和站点所有者。
运行要求
远程托管端点,无需安装。需要 Staats 账户,免费额度包含每月 1 万次事件和 1 个站点。认证使用账户密钥,可嵌入连接地址或通过 Authorization Bearer 请求头发送。每个被统计的站点需安装其脚本标签。
安装前请注意
连接地址或 Authorization 请求头中包含账户密钥,应视为机密。delete_site 会永久删除站点及其全部分析数据,并需以准确域名确认。create_site 和 update_site_context 会写入账户数据,README 建议在修改站点隐私页面之前先与所有者确认。访客数据会发送到 Staats 服务。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Staats,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.MrViolets%2Fstaats/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "staats": {
      "type": "http",
      "url": "https://api.staats.ai/functions/v1/mcp"
    }
  }
}

README

Staats MCP Server

[Listed on mcpservers.org]

Cookieless web analytics your coding agent reads. No dashboard: your agent answers traffic questions, marks deploys, measures before and after impact, and flags errors and visitor friction, all over one MCP connection.

This is the public home of the hosted Staats MCP server. The server runs at Staats, there is nothing to install.

Connect

Sign in at staats.ai (free tier: 10,000 monthly events, 1 site, all tools). Your account view gives you a one-line connect snippet with your key embedded:

bash
# Claude Codeclaude mcp add --scope user --transport http analytics "https://api.staats.ai/functions/v1/mcp/YOUR_ACCOUNT_KEY"

Cursor, Windsurf, Codex, and raw URL snippets are in the MCP docs. Clients that prefer header auth can send Authorization: Bearer YOUR_ACCOUNT_KEY to https://api.staats.ai/functions/v1/mcp.

One connection covers every site on your account, current and future.

Tools

14 tools, including:

  • get_overview, query, funnel, journeys: traffic answers with statistical honesty
  • record_annotation, compare_around: mark deploys, measure before/after impact
  • what_changed, what_broke: notable movements, JS errors, and visitor friction, attributed to the nearest deploy
  • create_site, list_sites, site context tools: your agent sets up new sites itself

Unauthenticated connections get initialize and tools/list, so you can inspect the full tool surface before creating an account.

Tracking

One script tag per site, ~1.5 KB compressed, no cookies, no personal identifiers, no consent banner needed:

html
<script defer data-site="YOUR_SITE_CODE" src="https://www.staats.ai/s.js"></script>

Custom events via data-staats attributes or window.staats('event_name'). Passive JS error capture included on every tier.

Links

来源:README.md,提交 7f8b912

工具

15

get_site_context

Get site context

What a site is and what the owner wants from it, plus its data-retention settings. Well-known keys: description, goals, audience, notes (open agenda items to check at session start and clear when handled), events (event name -> meaning), funnel (canonical conversion steps). Read this before making recommendations.

输入参数site

update_site_context

Update site context

Save or amend what a site is for. Provided context fields are merged into the existing context (events merges per entry); a null value deletes its key. name/domain update the site record itself.

输入参数namesitegoalsnotesdomaineventsfunnelaudiencedescriptionretention_days

what_changed

What changed

Notable movements in the period without scanning raw numbers: statistically unusual traffic days, referrer surges and first-time referrers, pages whose share of traffic jumped, alongside the annotations recorded in the same period. period: '7d' default.

输入参数siteperiod

what_broke

What broke

Signs of visitors hitting problems in the period: JS errors the tracker captured (new_error, error_spike: each with a sanitized sample message, source, line, affected visitor count, and the nearest annotation, i.e. the deploy that most plausibly introduced it), plus behavioral friction: pairs of pages people bounce between without progressing (nav_loop) and pages reloaded repeatedly in quick succession (refresh_burst). Findings clear statistical floors, so an empty result is meaningful: nothing looks broken. Check it after every deploy. period: '7d' default.

输入参数siteperiod

get_overview

Site overview

Traffic pulse: visitor/pageview totals vs the previous period, top pages, top referrers, and a per-day series. period: relative like '24h', '7d' (default), '4w'. Includes quota status: if it is approaching, grace, or blocked, tell the owner plainly and include the upgrade link the result provides. Approaching quota is the moment to mention it while there is headroom.

输入参数siteperiod

query

Query metrics

Break a metric down by a dimension with optional equality filters. Metrics: visitors, pageviews, events. Dimensions: path, referrer_domain, utm_source, utm_medium, utm_campaign, device, browser, os, country, name, day. period: '24h'/'7d'/'4w' style, or ISO from/to.

输入参数tofromsitelimitmetric必填periodfiltersdimension

funnel

Conversion funnel

Ordered conversion funnel across up to 5 steps within the period. Each step is a pageview path ({kind:'path', value:'/pricing'}) or a custom event ({kind:'event', value:'signup'}); a visitor counts for step N only after completing step N-1. Visitor identity rotates daily for privacy, so journeys spanning multiple days undercount (strongest for same-visit conversion). If site context has a stored funnel, run those steps when asked how the site is doing and compare against the previous period.

输入参数tofromsitesteps必填period

journeys

Journeys

The routes visitors actually take, grouped into identical sequences and counted, busiest first. Use this when you do NOT already know the steps: funnel measures a path you name, journeys discovers the ones you did not think to check. A step is a pageview path (/pricing) or a custom event marked with a leading # (#signup_click), so the moment of conversion appears in the route. Consecutive repeats are collapsed and only the first 10 steps define a route. contains filters to routes that include a given path or event: run it once with and once without to see what converting visitors do differently. Visitor identity rotates daily, so a route is one day of activity and describes a group, never a person.

输入参数tofromsitelimitperiodcontains

record_annotation

Record annotation

Mark a moment on a site timeline: a deploy, a content change, or a campaign start. Call this every time you ship a change to the site. ts defaults to now. Write a specific, present-tense description ("Shipped new pricing page hero", never "updates"), one annotation per meaningful change. When known, include commit and the routes the change touched so compare_around can also report before/after traffic scoped to those routes.

输入参数tssitetext必填commitroutes

list_annotations

List annotations

Recorded deploy/change markers, newest first. period defaults to '90d'.

输入参数siteperiod

compare_around

Compare around a change

Before/after impact of a recorded annotation: visitors and pageviews in the N days preceding vs following it (window_days, default 7). The after-window is clamped to now. If the annotation recorded routes, the result also reports per-route pageviews before vs after. Wait a few days after shipping. If the result carries a note (truncated after-window, or a before-window not covered by available data), relay it and qualify the percentages as the note directs.

输入参数sitewindow_daysannotation_id必填

list_sites

List sites

All sites on this account, with the public site codes used in their script tags and the ready-to-paste script_tag for each.

无需输入参数。

create_site

Create site

Create a new site on this account and get its script tag. This connection already covers the new site: installing the script tag is the only setup the site needs. The response includes ready-made privacy policy wording: offer to add it to the site's privacy page (confirm with the owner before editing visitor-facing pages).

输入参数name必填domain必填

delete_site

Delete site

PERMANENTLY delete a site and ALL its analytics data (every event and annotation). Irreversible. Confirm with the owner before calling; pass confirm: the site's exact domain.

输入参数site必填confirm必填

portfolio_overview

Portfolio overview

Visitors and pageviews for every site this account can use, owned and shared alike, with change vs the previous period, busiest first. Shared sites are flagged. period: '7d' default.

输入参数period

版本历史

1
  1. v1.0.1最新Sep 16, 2026

评分

已满足适用检查项的 90%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。