# Matomo Analytics

> Matomo Analytics is an open-source MCP server for analytics and data. Ask Matomo for traffic, pages, referrers, e-commerce and real-time visitors, read-only. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, self-hosted, Linux, macOS, Windows
- **Repository:** https://github.com/liohtml/matomo-mcp
- **MCP Registry name:** io.github.Liohtml/matomo-mcp
- **Categories:** [analytics and data](https://ai-powered.com/categories/analytics-and-data), [marketing and SEO](https://ai-powered.com/categories/marketing-and-seo)
- **Listing updated:** 2026-11-18

## About

This Rust server connects an assistant to your own Matomo Analytics instance with 15 hand-built, read-only tools instead of dozens of auto-generated API mirrors, which the author says would flood a model's context. It starts instantly as a single binary with no Node or Python runtime, and a full-API tool reaches any Reporting API method such as funnels, heatmaps or custom dimensions.

It is built to protect context and secrets. Each report has a row limit and the response has a character budget with guidance when truncated, the token is sent by POST only and redacted from errors, TLS verification is on by default, and failed calls retry with backoff on rate limits and server errors. Reports accept site, period, date, a Matomo segment and a limit. It can answer questions like how many AI-assistant referrals arrive, which internal searches find nothing or who is on the site right now.

Install by cargo, prebuilt binary or Docker, with a view-only API token. A --check command verifies the connection and lists sites, and an optional HTTP mode lets several clients share one server, though it has no built-in authentication.

## Features

- **Curated tools:** 15 analytics tools modelled on common questions.
- **Full API escape hatch:** Reaches any Matomo Reporting API method.
- **Context protection:** Row limits and a response budget keep outputs small.
- **Real-time view:** Shows live visitors and the visit log.
- **Safe token handling:** Token sent by POST and redacted from errors.
- **Flexible hosting:** Stdio, Docker or a shared HTTP endpoint.

## Good for

- Compare this week's traffic with last week
- Find top landing pages by conversion
- See whether AI assistants send visitors
- Find site searches that return nothing
- Check who is on the site right now

## Install

### Claude Code (Terminal)

```sh
claude mcp add matomo-mcp --env MATOMO_URL='<MATOMO_URL>' --env MATOMO_TOKEN='<MATOMO_TOKEN>' -- docker run -i --rm -e MATOMO_URL -e MATOMO_TOKEN ghcr.io/liohtml/matomo-mcp:v0.1.4
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "matomo-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "MATOMO_URL",
        "-e",
        "MATOMO_TOKEN",
        "ghcr.io/liohtml/matomo-mcp:v0.1.4"
      ],
      "env": {
        "MATOMO_URL": "<MATOMO_URL>",
        "MATOMO_TOKEN": "<MATOMO_TOKEN>"
      }
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "matomo-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "MATOMO_URL",
        "-e",
        "MATOMO_TOKEN",
        "ghcr.io/liohtml/matomo-mcp:v0.1.4"
      ],
      "env": {
        "MATOMO_URL": "<MATOMO_URL>",
        "MATOMO_TOKEN": "<MATOMO_TOKEN>"
      }
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "matomo-mcp": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "MATOMO_URL",
        "-e",
        "MATOMO_TOKEN",
        "ghcr.io/liohtml/matomo-mcp:v0.1.4"
      ],
      "env": {
        "MATOMO_URL": "<MATOMO_URL>",
        "MATOMO_TOKEN": "<MATOMO_TOKEN>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "matomo-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "MATOMO_URL",
        "-e",
        "MATOMO_TOKEN",
        "ghcr.io/liohtml/matomo-mcp:v0.1.4"
      ],
      "env": {
        "MATOMO_URL": "<MATOMO_URL>",
        "MATOMO_TOKEN": "<MATOMO_TOKEN>"
      }
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "matomo-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "MATOMO_URL",
        "-e",
        "MATOMO_TOKEN",
        "ghcr.io/liohtml/matomo-mcp:v0.1.4"
      ],
      "env": {
        "MATOMO_URL": "<MATOMO_URL>",
        "MATOMO_TOKEN": "<MATOMO_TOKEN>"
      }
    }
  }
}
```

## Tools

- `matomo_list_sites`: Lists tracked sites.
- `matomo_visits_summary`: Summarises visits over a period.
- `matomo_pages`: Top pages and exit pages.
- `matomo_referrers`: Referrers, campaigns and AI assistant traffic.
- `matomo_events`: Event counts.
- `matomo_goals`: Goal conversion rates.
- `matomo_ecommerce`: Revenue and top products.
- `matomo_geo`: Visitor countries and cities.
- `matomo_devices`: Device and browser breakdown.
- `matomo_visit_times`: Visits by time of day and week.
- `matomo_site_search`: Internal site search terms.
- `matomo_realtime`: Live visitors and visit log.
- `matomo_page_performance`: Page load performance.
- `matomo_annotations`: Annotations such as deploys and campaigns.
- `matomo_api`: Any Reporting API method.

## FAQ

### What access does it need?

A Matomo URL and an API token with view access.

### Can it change my analytics?

No. The curated reporting tools are read-only.

### How do I check my setup?

Run matomo-mcp with --url, --token and --check.

### Is the HTTP mode secure?

It has no built-in authentication, so keep it on localhost or behind an authenticated proxy.

### Is Matomo Analytics free?

Yes. Matomo Analytics is open source, so you can use and self-host it for free.

### How do I add Matomo Analytics to Claude Code?

Run this command in your terminal: claude mcp add matomo-mcp --env MATOMO_URL='<MATOMO_URL>' --env MATOMO_TOKEN='<MATOMO_TOKEN>' -- docker run -i --rm -e MATOMO_URL -e MATOMO_TOKEN ghcr.io/liohtml/matomo-mcp:v0.1.4

### What are the best alternatives to Matomo Analytics?

The closest alternatives to Matomo Analytics are Agent-Native Analytics, Google Ads + Meta Ads + SEO/GEO MCP, dashboard-icons, Tapetide - Indian Stock Market MCP and World Monitor.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Agent-Native Analytics](https://ai-powered.com/mcp/agent-native-analytics): Agent-Native Analytics is an open-source MCP server for analytics and data.
- [Google Ads + Meta Ads + SEO/GEO MCP](https://ai-powered.com/mcp/google-ads-meta-ads-seo-geo-mcp): Google Ads + Meta Ads + SEO/GEO MCP is a freemium MCP server for marketing and seo.
- [dashboard-icons](https://ai-powered.com/mcp/dashboard-icons): dashboard-icons is an open-source MCP server for analytics and data.
- [Tapetide - Indian Stock Market MCP](https://ai-powered.com/mcp/tapetide-indian-stock-market-mcp): Tapetide - Indian Stock Market MCP is a freemium MCP server for finance and payments.
- [World Monitor](https://ai-powered.com/mcp/world-monitor): World Monitor is a freemium MCP server for analytics and data.
- [Calven](https://ai-powered.com/mcp/calven): Calven is an MCP server for marketing and seo.
- [DataArcus for Power BI](https://ai-powered.com/mcp/dataarcus-for-power-bi): DataArcus for Power BI is a free MCP server for analytics and data.
- [CompanyData](https://ai-powered.com/mcp/companydata): CompanyData is a paid MCP server for analytics and data.

---
Source: https://ai-powered.com/mcp/matomo-analytics
