Matomo Analytics
A Model Context Protocol (MCP) server that exposes your Matomo Analytics API to Claude and other MCP-compatible AI assistants.
What is Matomo Analytics?
Matomo Analytics is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to model context protocol (mcp) server that exposes your matomo analytics api to claude and other mcp-compatible ai assistants.
A Model Context Protocol (MCP) server that exposes your Matomo Analytics API to Claude and other MCP-compatible AI assistants.
This server falls under the Analytics category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- A Model Context Protocol (MCP) server that exposes your Mato
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx mcp-matomoConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Matomo Analytics
mcp-matomo is a Rust-based MCP server that exposes your self-hosted or cloud Matomo Analytics instance to Claude and other MCP-compatible AI assistants. It dynamically generates tools from Matomo's OpenAPI specification, giving the AI direct access to traffic summaries, funnel analysis, referrer data, goal tracking, device breakdowns, and event analytics. You authenticate once with a Matomo API token and the server handles all API communication, enabling natural language queries over your real analytics data without leaving your AI client.
Prerequisites
- Rust toolchain (rustup + cargo) installed, or a pre-built release binary downloaded
- A running Matomo instance (self-hosted or Matomo Cloud) with API access enabled
- A Matomo API authentication token (created under Settings → Personal → Security → Auth tokens)
- Claude Desktop or another MCP-compatible client
- The Matomo site ID you want to analyze (visible in Matomo settings, default is 1)
Clone and build mcp-matomo
Clone the repository and compile the release binary using Cargo. The build produces a single executable in target/release/.
git clone https://github.com/FGRibreau/mcp-matomo.git
cd mcp-matomo
cargo build --releaseObtain your Matomo API token
Log in to your Matomo instance and navigate to Settings → Personal → Security → Auth tokens. Click 'Create new token', give it a descriptive name like 'mcp-matomo', and copy the generated token. Keep it secure as it grants full API access.
Test the server with dynamic introspection
Run mcp-matomo in dynamic mode, pointing it at your Matomo URL and providing the API token. The server will introspect the live Matomo API and generate tools automatically.
./target/release/mcp-matomo \
--url https://your-matomo-instance.com \
--token YOUR_API_TOKEN(Optional) Cache the OpenAPI spec for faster startup
For production use, save the OpenAPI spec locally to avoid introspection on every start. This speeds up startup and makes the server resilient to temporary Matomo downtime.
# First fetch and save the spec, then use it
./target/release/mcp-matomo \
--openapi matomo-api.json \
--token YOUR_API_TOKENConfigure Claude Desktop to use mcp-matomo
Add the server to your Claude Desktop configuration file. Use the absolute path to the compiled binary. Provide the Matomo URL as a command argument and the API token via an environment variable.
# macOS config path: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows config path: %APPDATA%\Claude\claude_desktop_config.jsonRestart Claude Desktop and verify connection
After saving the config, fully quit and reopen Claude Desktop. You should see matomo listed in the connected MCP servers. Ask a simple question like 'How many visits did I get today?' to confirm the integration is working.
Matomo Analytics Examples
Client configuration
Add this to your claude_desktop_config.json, replacing the binary path, Matomo URL, and API token with your real values.
{
"mcpServers": {
"matomo": {
"command": "/absolute/path/to/mcp-matomo/target/release/mcp-matomo",
"args": ["--url", "https://your-matomo-instance.com"],
"env": {
"MCP_MATOMO_TOKEN": "YOUR_API_TOKEN"
}
}
}
}Prompts to try
These natural language queries map to real Matomo API tools like VisitsSummary_get, Referrers_getKeywords, and DevicesDetection_getType.
- "How many unique visitors did I have last week compared to the week before?"
- "Show me the top 10 countries by page views this month."
- "Which search keywords are driving the most traffic to my site?"
- "What percentage of my visitors are using mobile devices?"
- "Show me my goal conversion rates for the past 30 days."Troubleshooting Matomo Analytics
Server fails to start with 'authentication failed' or 401 error
Double-check your Matomo API token. Ensure the token has not expired and that the Matomo user account associated with the token has at least 'view' access to the site. You can test the token directly: curl 'https://your-matomo.com/index.php?module=API&method=API.getMatomoVersion&token_auth=YOUR_TOKEN&format=JSON'
cargo build --release fails with missing dependencies
Ensure you have the latest stable Rust toolchain: run 'rustup update stable'. On Linux you may also need build-essential and libssl-dev packages: sudo apt install build-essential libssl-dev pkg-config
Tools are not appearing or returning empty data
Set the RUST_LOG=debug environment variable when running the binary to see detailed API request/response logging. Also verify the --url matches your actual Matomo base URL (no trailing slash, correct protocol https vs http).
Frequently Asked Questions about Matomo Analytics
What is Matomo Analytics?
Matomo Analytics is a Model Context Protocol (MCP) server that model context protocol (mcp) server that exposes your matomo analytics api to claude and other mcp-compatible ai assistants. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Matomo Analytics?
Follow the installation instructions on the Matomo Analytics GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Matomo Analytics?
Matomo Analytics works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Matomo Analytics free to use?
Yes, Matomo Analytics is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Matomo Analytics Alternatives — Similar Analytics Servers
Looking for alternatives to Matomo Analytics? Here are other popular analytics servers you can use with Claude, Cursor, and VS Code.
OpenMetadata
★ 14.0kOpenMetadata is a unified metadata platform for data discovery, data observability, and data governance powered by a central metadata repository, in-depth column level lineage, and seamless team collaboration.
Superset
★ 10.9kAn MCP server that provides AI assistants with full access to Apache Superset instances, enabling interaction with dashboards, charts, datasets, databases, and SQL execution capabilities.
Horizon
★ 4.4k📡 Your own AI-powered news radar. Generates daily briefings in English & Chinese. | 用 AI 构建你专属的新闻雷达
MCP Server Chart
★ 4.1kEnables generation of 25+ types of charts and data visualizations using AntV, including bar charts, line charts, maps, mind maps, and specialized diagrams like fishbone and sankey charts. Supports both statistical charts and geographic visualizations
Muapi CLI
★ 997Official CLI for muapi.ai — generate images, videos & audio from the terminal. MCP server, 14 AI models, npm + pip installable.
Weather MCP Server
★ 907Weather Data Fetcher MCP server built with Node.js, MCP SDK, and Zod. Provides weather details like temperature and forecast for cities such as Noida and Delhi via a registered tool. Simplifies API integration, enabling structured responses for clien
Browse More Analytics MCP Servers
Explore all analytics servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Matomo Analytics in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Matomo Analytics?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.