MCP server for Matomo Reporting API
Project description
Matomo MCP Server
A Model Context Protocol (MCP) server that provides access to Matomo's Reporting API.
Features
- Access Matomo reporting data through MCP tools
- Query website statistics, visitor information, and analytics data
- Support for multiple Matomo sites
- Secure API token authentication
Installation
pip install -e .
Configuration
The server requires the following environment variables:
MATOMO_URL: Your Matomo instance URL (e.g.,https://analytics.example.com)MATOMO_TOKEN: Your Matomo API authentication token
You can obtain an API token from your Matomo instance under: Personal Settings → Security → Auth tokens
Usage with Claude Desktop
Add this to your Claude Desktop configuration:
MacOS
~/Library/Application Support/Claude/claude_desktop_config.json
Windows
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"matomo": {
"command": "python",
"args": ["-m", "matomo_mcp"],
"env": {
"MATOMO_URL": "https://your-matomo-instance.com",
"MATOMO_TOKEN": "your_api_token_here"
}
}
}
}
Available Tools
get_site_info
Get information about a specific Matomo site.
Parameters:
site_id: The ID of the site (integer)
get_visits_summary
Get a summary of visits for a site within a date range.
Parameters:
site_id: The ID of the site (integer)period: Time period (day, week, month, year, range)date: Date or date range (e.g., "2024-01-01", "last30", "today")
get_page_urls
Get the most visited page URLs for a site.
Parameters:
site_id: The ID of the site (integer)period: Time period (day, week, month, year, range)date: Date or date rangelimit: Maximum number of results (default: 10)
get_countries
Get visitor statistics by country.
Parameters:
site_id: The ID of the site (integer)period: Time period (day, week, month, year, range)date: Date or date rangelimit: Maximum number of results (default: 10)
get_user_settings
Get visitor browser and device information.
Parameters:
site_id: The ID of the site (integer)period: Time period (day, week, month, year, range)date: Date or date range
query_custom_report
Execute a custom Matomo API query.
Parameters:
method: Matomo API method (e.g., "Actions.getPageUrls")site_id: The ID of the site (integer)period: Time period (day, week, month, year, range)date: Date or date rangeadditional_params: Optional JSON object with additional parameters
Development
Install development dependencies:
pip install -e ".[dev]"
Run tests:
pytest
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file matomo_mcp-1.0.0a1.tar.gz.
File metadata
- Download URL: matomo_mcp-1.0.0a1.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
274577ae4722f07a1d85158fea4df964d0acd229a3cf380d8ec0198603f2a201
|
|
| MD5 |
d30196228cc704191089bfac032bed0f
|
|
| BLAKE2b-256 |
eab65977bcc7eeb4617cd3480e616264d985d432c9e8fdd519745ed6fb26bb9a
|
File details
Details for the file matomo_mcp-1.0.0a1-py3-none-any.whl.
File metadata
- Download URL: matomo_mcp-1.0.0a1-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36b549fb9cb73f2b0d01234342abfcb7c1beb3eb662653869564974ae302241a
|
|
| MD5 |
dc4b1092c8cda9ff87a8928b3946f775
|
|
| BLAKE2b-256 |
e42eac90ff09689f360f33ba3f26d6b829ca28cf75b5ad049dfab711a1483d98
|