Piwik PRO MCP Server
OfficialThe Piwik PRO MCP Server provides AI-assisted management of Piwik PRO Analytics resources through comprehensive CRUD operations and configuration tools.
Core Capabilities:
App Management: Create, read, update, delete, and list analytics applications with detailed information retrieval
Analytics Annotations: Manage user and system annotations with date filtering and visibility controls
Tag Manager: Full lifecycle management of tags, triggers, and variables with copying capabilities, version control (draft/published states), and publishing workflows
Customer Data Platform: Create, manage, and delete CDP audiences with attribute discovery for behavioral targeting
Tracker Configuration: Manage global and app-specific tracking settings including IP anonymization, session management, and campaign tracking
Container Management: Retrieve installation code and container settings for app deployment
Template & Schema Discovery: Explore available templates for tags, triggers, and variables with detailed documentation, plus dynamic JSON schema retrieval for tool parameters and validation rules
Resource Relationships: List triggers attached to specific tags and tags assigned to specific triggers
Provides comprehensive analytics and tag management capabilities through Piwik PRO, including app management, tracker configuration, tag manager operations (tags, triggers, variables), customer data platform features for audience management, and version control for analytics implementations.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Piwik PRO MCP Serverlist all tags in my e-commerce app"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
🤖 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
Related MCP server: Metabase MCP
🚀 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.
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
official installation guide.
{
"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"
}
}
}
}You can enter environment variables directly in the MCP configuration, but storing them in a separate
file is more secure. Create a .piwik-pro-mcp.env file and add configuration to it:
# .piwik.pro.mcp.env
PIWIK_PRO_HOST=ACCOUNT.piwik.pro
PIWIK_PRO_CLIENT_ID=CLIENT_ID
PIWIK_PRO_CLIENT_SECRET=CLIENT_SECRETRefer to this file through --env-file argument:
{
"mcpServers": {
"piwik-pro-analytics": {
"command": "uvx",
"args": [
"piwik-pro-mcp",
"--env-file",
"/absolute/path/to/.piwik-pro-mcp.env"
]
}
}
}Option #2 - Docker
You need to have Docker installed. See the official installation guide.
{
"mcpServers": {
"piwik-pro-analytics": {
"command": "docker",
"args": ["run", "-i", "--rm", "ghcr.io/piwikpro/mcp:latest"],
"env": {
"PIWIK_PRO_HOST": "ACCOUNT.piwik.pro",
"PIWIK_PRO_CLIENT_ID": "CLIENT_ID",
"PIWIK_PRO_CLIENT_SECRET": "CLIENT_SECRET"
}
}
}
}You can enter environment variables directly in the MCP configuration, but storing them in a separate
file is more secure. Create a .piwik-pro-mcp.env file and add the configuration to it:
# .piwik.pro.mcp.env
PIWIK_PRO_HOST=ACCOUNT.piwik.pro
PIWIK_PRO_CLIENT_ID=CLIENT_ID
PIWIK_PRO_CLIENT_SECRET=CLIENT_SECRETRefer to this file through --env-file argument:
{
"mcpServers": {
"piwik-pro-analytics": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"--env-file",
"/absolute/path/to/.piwik-pro-mcp.env",
"ghcr.io/piwikpro/mcp:latest"
]
}
}
}Restart your MCP client to apply configuration changes.
🪄 First Use
You're all set! The server starts in safe mode by default, so you can explore your analytics data without worrying about accidental changes.
Try these prompts to get started:
List my Piwik PRO apps.
List tags in <NAME> app.
What were the top 10 pages last week?
Show me conversion trends from the last month.Ready to make changes?
Once you're comfortable, disable safe mode to enable t create, update, and delete operations:
PIWIK_PRO_SAFE_MODE=0Then try prompts like:
In app <NAME>, add a new tag that shows alert("hello") on every page.
Copy the tag <NAME> from app <APP> to all apps with the <PREFIX> prefix.Other options
PIWIK_PRO_TELEMETRY(default1): Controls anonymous usage telemetry. Set this to0to disable it.PIWIK_PRO_TM_RESOURCE_CHECK(default1): Enables Tag Manager template validation. Set to0to bypass when experimenting with custom templates.
🔈 Feedback
We value your feedback and questions. If you have suggestions, run into issues, or want to request a feature, open an issue on our GitHub Issues page. Your feedback helps us improve the project and support the community.
📡 Telemetry
We collect anonymous telemetry data to help us understand how the MCP server is used and to improve its reliability and features. This telemetry includes information about which MCP tools are invoked and whether the result is a success or an error, but it doesn't include any personal data, tool arguments, or sensitive information.
We use this data only to identify issues, prioritize improvements, and provide the best possible experience for all users.
If you prefer not to send telemetry data, you can opt out at any time by adding the following environment variable
PIWIK_PRO_TELEMETRY=0 to your MCP server configuration.
📚 Documentation
Document | Description |
Complete reference for all MCP tools | |
Setup, running, testing, and architecture | |
How to contribute to the project |
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/PiwikPRO/mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server