piwikpro/mcp 是从 https://github.com/piwikpro/mcp. 导入的 MCP 服务器候选。
概览
piwikpro/mcp 是从 https://github.com/piwikpro/mcp. 导入的 MCP 服务器候选。
概述(AI 翻译)
一台基于官方MCP Python SDK构建的模型上下文协议(MCP)服务器,允许您控制Piwik PRO Analytics资源。
🎇 特色
💬 查询API — 与你的分析数据对话
将问题转化为洞察。查询API允许你用自然语言探索分析数据。询问访客、页面浏览量、转化率等,无需手动浏览复杂仪表盘或构建报告。
- 运行灵活查询,带有自定义日期范围和筛选条件
- 发现可用的维度和指标
- 几秒钟内获得分析问题的答案
📊 管理分析
保持你的分析设置井然有序,同时不让你与AI助手的对话中断:
- 注释 — 添加注释以标记重要事件、战役或变更
- 目标 — 建立和管理转化跟踪
- 自定义尺寸 — 用自定义数据点扩展你的追踪
🏷️ 控制标签管理器
管理你的追踪设置,不动用你的网站代码:
- 标签 — 创建和配置追踪标签
- 触发器 — 定义标签何时何地触发
- 变量 — 存储和重用动态值
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
🤖 Piwik PRO MCP Server (beta)
A Model Context Protocol (MCP) server built with the official MCP Python SDK that lets you control Piwik PRO Analytics resources.
🎇 Features
💬 Query API — Have a conversation with your analytics data
Turn questions into insights. The Query API lets you explore your analytics data using natural language. Ask about visitors, page views, conversions, and more without navigating complex dashboards or building reports manually.
- Run flexible queries with custom date ranges and filters
- Discover available dimensions and metrics
- Get answers to analytics questions in seconds
📊 Manage Analytics
Keep your analytics setup organized without leaving your the conversation with your AI assistant:
- Annotations — Add notes to mark important events, campaigns, or changes
- Goals — Set up and manage conversion tracking
- Custom dimensions — Extend your tracking with custom data points
🏷️ Control Tag Manager
Manage your tracking setup without touching your website code:
- Tags — Create and configure tracking tags
- Triggers — Define when and where tags fire
- Variables — Store and reuse dynamic values
- Version control — Publish changes when you’re ready
🎯 Build audiences with Data Activation (DA)
Build and manage your audience segments:
- Create targeted audiences based on user behavior
- Update segmentation rules in real time
⚙️ Configuration and settings
Fine-tune your Piwik PRO setup:
- App management — Organize your sites and apps
- Tracker settings — Configure tracking behavior globally or for each app
- Container settings — Access installation code and container configuration
🚀 Quickstart
Go to your account’s API credentials page: https://ACCOUNT.piwik.pro/profile/api-credentials, then generate new credentials.
You will need these three variables for the MCP configuration:
PIWIK_PRO_HOST- Your piwik host,ACCOUNT.piwik.proPIWIK_PRO_CLIENT_ID- Client IDPIWIK_PRO_CLIENT_SECRET- Client Secret
MCP Client configuration
All of these MCP clients use a JSON file to store the MCP configuration. The file name and location vary by client.
-
Claude Desktop
- Go to
Settings -> Developer -> Edit Configto open the folder containingclaude_desktop_config.json. - Apply one of the snippets from below.
- Restart the application.
- Go to
-
Cursor - The official documentation
-
Claude Code - The official documentation
To use Piwik PRO MCP server, you need to install uv or docker.
Copy the configuration of your preferred option and enter the required environment variables.
Option #1 - UV
If you don’t have uv, check the
安装
uvx piwik-pro-mcp配置
{
"mcpServers": {
"piwik-pro-analytics": {
"command": "uvx",
"args": ["piwik-pro-mcp"],
"env": {
"PIWIK_PRO_HOST": "ACCOUNT.piwik.pro",
"PIWIK_PRO_CLIENT_ID": "CLIENT_ID",
"PIWIK_PRO_CLIENT_SECRET": "CLIENT_SECRET"
}
}
}
}