This release is a pre-release and may not be stable for production use.
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
Metadata
Release files for matomo-mcp 1.0.0a1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| matomo_mcp-1.0.0a1.tar.gz | 8.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| matomo_mcp-1.0.0a1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.5 kB
Release files / matomo_mcp-1.0.0a1.tar.gz
| Download URL | matomo_mcp-1.0.0a1.tar.gz |
|---|---|
| Size | 8.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
274577ae4722f07a1d85158fea4df964d0acd229a3cf380d8ec0198603f2a201
|
|
BLAKE2b-256 checksum How to use checksums |
eab65977bcc7eeb4617cd3480e616264d985d432c9e8fdd519745ed6fb26bb9a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / matomo_mcp-1.0.0a1-py3-none-any.whl
| Download URL | matomo_mcp-1.0.0a1-py3-none-any.whl |
|---|---|
| Size | 7.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
36b549fb9cb73f2b0d01234342abfcb7c1beb3eb662653869564974ae302241a
|
|
BLAKE2b-256 checksum How to use checksums |
e42eac90ff09689f360f33ba3f26d6b829ca28cf75b5ad049dfab711a1483d98
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|