MCP Pirsch

io.github.verygoodplugins由 GitHub 账号 verygoodplugins 发布v0.2.0更新于 Oct 24, 2026

Pirsch Analytics with natural language queries and trend analysis

已验证STDIO仅桌面数据与分析商业与电商

概览

AI 生成的概览

只读访问 Pirsch Analytics,让助手用自然语言查询网站统计、筛选选项和时段对比。

可以做什么
封装 Pirsch Analytics API v1,提供四个只读工具:pirsch_list_domains 列出可访问的域名及其 id、主机名、显示名称和时区;pirsch_query_statistics 按日期和筛选条件读取一个已记录的指标;pirsch_list_filter_options 列出某个筛选维度的允许值;pirsch_compare_periods 对比两个时段的合计值和访客序列。结果以结构化内容加等价的 JSON 文本块返回。
适用场景
适合让助手回答 Pirsch 网站流量相关问题,例如页面浏览量、访客、目标、事件、UTM 活动或同比环比趋势,而无需打开 Pirsch 后台。
运行要求
需要 Node.js 22.19.0 或更高版本,通过 npx 在本地运行。需要一个具有读取权限的 Pirsch OAuth API 客户端,通过环境变量 PIRSCH_CLIENT_ID 和 PIRSCH_CLIENT_SECRET 提供。PIRSCH_DEFAULT_DOMAIN_ID 和 PIRSCH_TIMEZONE 为可选;未设置默认域名 ID 时,每个查询工具都需要显式传入 domainId。
安装前请注意
凭据通过环境变量 PIRSCH_CLIENT_ID 和 PIRSCH_CLIENT_SECRET 传入;建议使用只读 OAuth 客户端,而不是只写访问密钥。所有工具均为只读,不会修改 Pirsch 数据。查询会向 Pirsch API 发送分析请求,错误响应设计为不暴露凭据或上游原始内容。

安装

在 SourceWeft 中

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

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

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Pirsch MCP Server

[npm]

A focused, read-only Model Context Protocol server for Pirsch Analytics API v1. It uses MCP SDK v2 and returns both structured results and JSON text for every successful tool call.

Requirements

  • Node.js 22.19.0 or later
  • A Pirsch OAuth API client with read access. Do not use a write-only access key.

Configure

json
{  "mcpServers": {    "pirsch": {      "command": "npx",      "args": ["-y", "@verygoodplugins/mcp-pirsch@latest"],      "env": {        "PIRSCH_CLIENT_ID": "your-read-only-oauth-client-id",        "PIRSCH_CLIENT_SECRET": "your-oauth-client-secret",        "PIRSCH_DEFAULT_DOMAIN_ID": "optional-default-domain-id"      }    }  }}

PIRSCH_DEFAULT_DOMAIN_ID is optional. When it is unset, every query tool requires domainId; the server never picks the first accessible domain. Use pirsch_list_domains to discover IDs safely.

Optional PIRSCH_TIMEZONE supplies the default timezone for requests that do not explicitly include timezone.

Tools

ToolPurpose
pirsch_list_domainsLists only id, hostname, display name, and timezone.
pirsch_query_statisticsReads one documented v1 metric, with dates and filters.
pirsch_list_filter_optionsLists allowed values for a documented filter dimension.
pirsch_compare_periodsCompares actual totals and visitor series for two periods.

All tools are read-only. They return structuredContent matching their output schema as well as an equivalent JSON text block. Input or API failures use MCP isError: true and do not expose credentials or raw upstream bodies.

Querying statistics

pirsch_query_statistics accepts a metric, optional domainId, and flat camel-case filters. Most metrics require ISO dates:

json
{  "metric": "pages",  "domainId": "your-domain-id",  "from": "2026-08-01",  "to": "2026-08-23",  "limit": 20,  "sort": "visitors",  "direction": "desc"}

The server maps public camel-case fields such as eventMetaKey, entryPath, operatingSystem, and utmCampaign to Pirsch's documented API-v1 parameter names. limit is constrained to 1–100 and active visitor start to 0–3600 seconds.

Metrics include totals, visitors, pages and entry/exit pages, session and page duration, goals, events and event metadata, growth, active visitors, time breakdowns, acquisition, browser/device, geographic, UTM, tags, keywords, funnels, sessions, and session details. session_details requires both visitorId and sessionId; event-specific metrics require event.

Comparing periods

Provide a named period (today, yesterday, week, lastWeek, month, or lastMonth) or both explicit date pairs:

json
{  "domainId": "your-domain-id",  "from": "2026-08-01",  "to": "2026-08-07",  "compareFrom": "2026-07-25",  "compareTo": "2026-07-31",  "scale": "day"}

The response compares /statistics/total and retains the two /statistics/visitor series; it does not estimate totals by summing charts.

1.0 migration

Version 1.0 intentionally replaces the former 17-tool interface. There are no default aliases because aliases would keep unsafe domain-selection and ambiguous input behavior alive.

Previous toolsReplacement
pirsch_overview, pirsch_total, pirsch_pages, pirsch_events, and other statistic toolspirsch_query_statistics with metric
pirsch_utmpirsch_query_statistics with one of the utm_* metrics
pirsch_comparepirsch_compare_periods
Domain discoverypirsch_list_domains

Input names are now camel-case and flat (domainId, compareFrom, eventMetaKey), not domain_id, nested filter, or compatibility aliases.

Development

bash
npm installnpm run typechecknpm run lintnpm testnpm run buildnpx -y @modelcontextprotocol/inspector@latest --cli node dist/index.js --method tools/list --format json

The release workflow publishes to npm with trusted publishing and then publishes the same tagged manifest to the MCP Registry through GitHub OIDC. Local development and CI never publish anything.

Support

For bugs and feature requests, open an issue in this repository. Pirsch questions are best answered through the Pirsch documentation; package support is maintained by Very Good Plugins.

Built with 🧡 by Very Good Plugins.

来源:README.md,提交 4c15bb0

工具

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

版本历史

1
  1. v0.2.0最新Sep 16, 2026

评分

已满足适用检查项的 50%

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

  • 近 30 天内可连通25 分

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

  • 已声明认证方式10 分

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

  • 已列出工具15 分

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

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