Skip to content
MCP server

Matomo Analytics

Ask Matomo for traffic, pages, referrers, e-commerce and real-time visitors, read-only

Runs locallyStatus and history
Install
Pricing
Open source
Platforms
CLI, self-hosted, Linux
Runs
Locally
Version
0.1.4
Listing updated
today

Similar MCP servers

About Matomo Analytics

Matomo Analytics is an open-source MCP server for analytics and data. It runs locally on your machine and is started by your AI client.

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.

Install

Run in a 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

Add to claude_desktop_config.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>"
      }
    }
  }
}

Add to ~/.cursor/mcp.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>"
      }
    }
  }
}

Add to .vscode/mcp.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>"
      }
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.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>"
      }
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "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>"
      }
    }
  }
}

Using several servers? Build one config file with the MCP config generator.

Configuration

  • MATOMO_URLMatomo instance URL, e.g. https://matomo.example.comRequired
  • MATOMO_TOKENMatomo API token (token_auth) with view accessRequired
  • MATOMO_DEFAULT_SITE_IDOptional default site ID so tools don't require an explicit site_id
  • MATOMO_EXTRA_HEADERSExtra HTTP headers as comma-separated 'Name:Value' pairs (auth proxies, Zero-Trust)
  • MATOMO_TIMEOUT_SECSPer-request timeout in seconds (default 30)
  • MATOMO_MAX_RESPONSE_CHARSResponse budget in characters before truncation (default 50000)
  • MATOMO_INSECURESet to 'true' to accept self-signed TLS certificates (explicit opt-in)
  • MATOMO_URLMatomo instance URL, e.g. https://matomo.example.comRequired
  • MATOMO_TOKENMatomo API token (token_auth) with view accessRequired
  • MATOMO_DEFAULT_SITE_IDOptional default site ID so tools don't require an explicit site_id
  • MATOMO_EXTRA_HEADERSExtra HTTP headers as comma-separated 'Name:Value' pairs (auth proxies, Zero-Trust)
  • MATOMO_TIMEOUT_SECSPer-request timeout in seconds (default 30)
  • MATOMO_MAX_RESPONSE_CHARSResponse budget in characters before truncation (default 50000)
  • MATOMO_INSECURESet to 'true' to accept self-signed TLS certificates (explicit opt-in)

Tools this server provides (15)

Taken from the project documentation; the running server may differ.

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.

What it does

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

Pricing

Open source

Open source (Rust); needs your own Matomo instance

Matomo Analytics 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.

How AIPoweredBot checks servers