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 分