npm @verygoodplugins/mcp-pirschstdioMITupdated 11d ago
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.
MCP Pirsch 能做什么?
Pirsch MCP Server
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
{
"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
| Tool | Purpose |
|---|---|
pirsch_list_domains |
Lists only id, hostname, display name, and timezone. |
pirsch_query_statistics |
Reads one documented v1 metric, with dates and filters. |
pirsch_list_filter_options |
Lists allowed values for a documented filter dimension. |
pirsch_compare_periods |
Compares 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:
{
"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:
{
"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 tools | Replacement |
|---|---|
pirsch_overview, pirsch_total, pirsch_pages, pirsch_events, and other statistic tools |
pirsch_query_statistics with metric |
pirsch_utm |
pirsch_query_statistics with one of the utm_* metrics |
pirsch_compare |
pirsch_compare_periods |
| Domain discovery | pirsch_list_domains |
Input names are now camel-case and flat (domainId, compareFrom, eventMetaKey), not domain_id, nested filter, or compatibility aliases.
Development
npm install
npm run typecheck
npm run lint
npm test
npm run build
npx -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.
安装
把 MCP Pirsch 添加到你的客户端。选择你正在使用的那个。
claude mcp add mcp-pirsch -- npx -y @verygoodplugins/mcp-pirschcodex mcp add mcp-pirsch -- npx -y @verygoodplugins/mcp-pirschamp mcp add mcp-pirsch -- npx -y @verygoodplugins/mcp-pirsch{
"mcpServers": {
"mcp-pirsch": {
"command": "npx",
"args": [
"-y",
"@verygoodplugins/mcp-pirsch"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"mcp-pirsch": {
"command": "npx",
"args": [
"-y",
"@verygoodplugins/mcp-pirsch"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
code --add-mcp '{"name":"mcp-pirsch","command":"npx","args":["-y","@verygoodplugins/mcp-pirsch"]}'Or add the block manually to `.vscode/mcp.json` under `servers`.
{
"mcpServers": {
"mcp-pirsch": {
"command": "npx",
"args": [
"-y",
"@verygoodplugins/mcp-pirsch"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"mcp-pirsch": {
"command": "npx",
"args": [
"-y",
"@verygoodplugins/mcp-pirsch"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"mcp-pirsch": {
"command": "npx",
"args": [
"-y",
"@verygoodplugins/mcp-pirsch"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"mcp-pirsch": {
"type": "local",
"command": "npx",
"args": [
"-y",
"@verygoodplugins/mcp-pirsch"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"mcp-pirsch": {
"command": {
"path": "npx",
"args": [
"-y",
"@verygoodplugins/mcp-pirsch"
]
}
}
}
}Add to your Zed `settings.json`.
npx -y @verygoodplugins/mcp-pirschRun `goose configure`, choose **Add Extension → Command-line Extension**, and paste this command.
4 个工具
MCP Pirsch 向已连接的智能体提供 4 个工具。
- pirsch_list_domains
- Lists only `id`, hostname, display name, and timezone.
- pirsch_query_statistics
- Reads one documented v1 metric, with dates and filters.
- pirsch_list_filter_options
- Lists allowed values for a documented filter dimension.
- pirsch_compare_periods
- Compares actual totals and visitor series for two periods.
评分
78 / 100
良好
- 文档25/25
- 维护19/25
- 可信度16/20
- 能力6/15
- 安装体验12/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 4 days ago
- Has a release history
- Repository is not archived
- Licensed MIT
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 4 tool(s) documented
- Provides prompt templates
- Provides resources
- 12 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint — no local install
版本历史
| 版本 | 发布于 |
|---|---|
| 0.2.0最新 | 2026年8月26日 |
| 0.1.1 | 2026年4月6日 |