Umami

io.github.mikusnuz由 GitHub 账号 mikusnuz 发布v2.1.1更新于 Nov 3, 2026

MCP server for Umami Analytics v3 — analytics, boards, links, pixels, reports, replay, and more

已验证STDIO仅桌面效率与工作流数据与分析

概览

AI 生成的概览

面向 Umami Analytics v3 API 的 MCP 服务器,让助手查询网站分析数据、运行报表,并管理自建或云端 Umami 资源。

可以做什么
  • 查询分析数据:统计、浏览量、指标、事件、会话、事件序列、实时与收入数据
  • 管理网站:列出、创建、更新、重置、转移网站并配置会话回放
  • 运行与管理报表:已保存报表的增删改查,以及归因、漏斗、目标、热图、旅程、留存、收入和 UTM 报表
  • 管理看板、链接、像素、分群、队列、注释、分享以及 CSV ZIP 导出
  • 发送采集数据:事件、浏览量、identify、性能、原始批量、心跳、链接与像素事件
  • 管理用户、团队和两步验证,包括完成 2FA 登录
适用场景
适合让助手直接回答 Umami 站点的流量与互动问题、构建或运行分析报表,或在对话中管理网站、看板、链接和分群。也适合需要从助手工作流向 Umami 推送事件或浏览量数据的团队。
运行要求
以 npm 包 @mikusnuz/umami-mcp 在本地运行,需要 Node.js 20 或更高版本。需要兼容 Umami v3.3 的自建实例(API 密钥、会话属性分群和注释需 3.4+),或 Umami Cloud。凭据:UMAMI_API_KEY,或自建登录所需的 UMAMI_URL、UMAMI_USERNAME 与 UMAMI_PASSWORD。可选 UMAMI_MODE 与 UMAMI_COLLECTOR_URL。需能访问 Umami 实例的网络。
安装前请注意
需要分析凭据:UMAMI_API_KEY,或自建登录用的 UMAMI_USERNAME 与 UMAMI_PASSWORD,服务器会用其获取并缓存 JWT。许多工具会写入或删除数据,包括网站重置与转移、报表与分群增删改、删除注释、更新分享以及启用或关闭两步验证。采集工具可携带指定的访客 user agent 与服务端 IP 注入事件。分析数据会发送到所配置的 Umami 主机。

安装

在 SourceWeft 中

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

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

English | 한국어

umami-mcp

Model Context Protocol server for the Umami Analytics v3 API. It supports self-hosted username/password or API-key authentication and Umami Cloud API keys, and exposes analytics, collection, administration, and v3 feature families such as boards, links, pixels, segments, session replay, shares, exports, performance, and revenue.

This version intentionally does not claim every private Umami route. Its tools track the documented API, including Umami 3.4 API-key authentication. Report tools use the legacy report contracts that Umami 3.4 continues to support.

Requirements

  • Node.js 20 or newer, matching the MCP SDK's installed runtime dependencies
  • Umami v3.3-compatible self-hosted instance (3.4+ for API keys, session-property segments and annotations), or Umami Cloud with the corresponding routes enabled

Installation

bash
npm install -g @mikusnuz/umami-mcp

Or run it directly:

bash
npx -y @mikusnuz/umami-mcp

Configuration

Self-hosted

json
{  "mcpServers": {    "umami": {      "command": "npx",      "args": ["-y", "@mikusnuz/umami-mcp"],      "env": {        "UMAMI_URL": "https://analytics.example.com",        "UMAMI_USERNAME": "admin",        "UMAMI_PASSWORD": "your-password"      }    }  }}

UMAMI_URL is the instance origin. A trailing /api is accepted, but is not required.

On Umami 3.4+, create an API key under Settings → API keys and replace UMAMI_USERNAME and UMAMI_PASSWORD with UMAMI_API_KEY. Set UMAMI_MODE to self-hosted to select the deployment mode explicitly.

Umami Cloud

json
{  "mcpServers": {    "umami": {      "command": "npx",      "args": ["-y", "@mikusnuz/umami-mcp"],      "env": {        "UMAMI_API_KEY": "your-cloud-api-key"      }    }  }}

Cloud management calls default to https://api.umami.is/v1; tool paths are translated from self-hosted /api/... paths to Cloud /v1/... paths. Set UMAMI_URL to https://api.umami.is/v1/us or https://api.umami.is/v1/eu when an explicit Cloud region is required. For a Cloud API proxy on another hostname, also set UMAMI_MODE to cloud.

Environment variables

VariableWhen requiredDescription
UMAMI_MODEOptionalself-hosted or cloud; auto-detected when omitted
UMAMI_URLSelf-hostedInstance origin; optional for Cloud
UMAMI_USERNAMEWithout a self-hosted API keyLogin username
UMAMI_PASSWORDWithout a self-hosted API keyLogin password
UMAMI_API_KEYCloud; optional for self-hosted 3.4+Bearer API key
UMAMI_COLLECTOR_URLOptionalSeparate host for public collection/share/heartbeat/recorder routes

For Cloud, the collector defaults to https://cloud.umami.is. For self-hosted Umami it defaults to UMAMI_URL. An API key without UMAMI_URL, or a URL on api.umami.is, selects Cloud. Any other configured URL selects self-hosted mode, even when using an API key.

Authentication and public routes

Management and analytics tools send a bearer token. The client logs in to a self-hosted instance lazily and caches the returned JWT when using a password. API keys are sent directly as the bearer credential on both deployment types.

The public collection routes do not require credentials:

  • send_event, send_identify, send_performance
  • batch_events (raw JSON array, up to 500 items)
  • heartbeat, get_share, get_recorder_config

If self-hosted login reports that two-factor authentication is required, call complete_two_factor_login with a current TOTP or backup code, then retry the original tool. Setup and policy tools are also exposed for self-hosted Umami.

Umami Cloud does not expose /me/password, /users, or /users/* through an API key. Those tools are for self-hosted instances.

Tool groups

AreaRepresentative tools
Websiteslist_websites, CRUD, reset, transfer to user/team, replay configuration
Analyticsget_stats, get_pageviews, get_metrics, get_events, get_sessions, event series
Event/session dataevent values, fields, properties, values, session activity
Collectionevent/pageview, identify, performance, raw batch, link/pixel events
Reportssaved-report CRUD and run_report for attribution, breakdown, funnel, goal, heatmap, journey, performance, retention, revenue, and UTM
Boardslist, CRUD, clone, and team boards
Links and pixelslist, CRUD, charts, and collection events
Segmentssegment/cohort list and CRUD
Annotations (3.4+)list_annotations, get_annotation, create_annotation, update_annotation, delete_annotation
Replayrecorder config, replay list/detail, saved replays, session replays
Shares and exportpublic share resolution, managed website shares, update/delete, CSV ZIP export
Revenuestats, chart, metrics, and revenue sessions
Users and teamscurrent admin-user and team membership/transfer routes
2FAlogin completion, enrollment, disable, and admin enforcement policies
Realtimeget_realtime

Use MCP tools/list for the complete, machine-readable list and schemas.

Important v3 contract details

  • A pageview is sent as { "type": "event" } with no event name; the old pageview type is no longer valid.
  • /api/batch receives the event objects as a raw array, not { "events": [...] }. The tool returns Umami's processed, errors, and per-item details fields and marks partial failures as an MCP error result.
  • Collector calls set a stable non-bot User-Agent header as required by Umami; send_event and batch items may also supply the visitor's userAgent and trusted server-side ip in the payload.
  • Analytics URL filters and page metrics use path; the old url metric was removed. Host aggregation uses hostname.
  • Additional filters are preserved even when the corresponding named option is omitted. An explicitly supplied named option takes precedence over filters.
  • Segment creation and updates support filters, sessionPropertyFilters, match, dateRange, and action. Session-property data types are 1=string, 2=number, 3=boolean, 4=date, 5=array. Cohorts do not support session-property filters. Unknown nested fields are rejected rather than silently discarded.
  • Annotations require Umami 3.4+ and website edit permission for writes. Supply an ISO date or timestamp, a 1–500 character note, and optionally allDay (default true). Updates replace all three fields; list date filters require both startAt and endAt in milliseconds. An older server may return 404.
  • Supported time units are minute, hour, day, month, and year.
  • get_event_series and get_sessions_weekly require an IANA timezone.
  • list_reports requires websiteId; report execution sends { websiteId, type, filters, parameters }.
  • Team website membership is changed through transfer_website; the removed team-website POST/DELETE routes are not exposed.

Development

bash
npm installnpm test

npm test builds the TypeScript server, checks Cloud/self-hosted URL and auth behavior, verifies raw public batch requests and the 2FA login flow, and validates key MCP schemas.

Official references

License

MIT

来源:README.md,提交 5bbcee0

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

3
  1. v2.1.1最新Oct 19, 2026
  2. v2.0.1Oct 8, 2026
  3. v1.2.1Sep 16, 2026

评分

已满足适用检查项的 50%

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

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分