Matomo Analytics

v1.0.0Analyticsstable

A Model Context Protocol (MCP) server that exposes your Matomo Analytics API to Claude and other MCP-compatible AI assistants.

funnelmatomomatomo-pluginmcpmcp-server
Share:
10
Stars
0
Downloads
0
Weekly
0/5

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

Access your Matomo Analytics API data through Claude and other MCP clients.
Analyze website traffic funnels and user behavior.
FGRibreau

Maintainer

LicenseMIT
Languagerust
Versionv1.0.0
UpdatedMay 2, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx mcp-matomo

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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)
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 --release
2

Obtain 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.

3

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
4

(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_TOKEN
5

Configure 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.json
6

Restart 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.

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.

Quick Config Preview

{ "mcpServers": { "mcp-matomo": { "command": "npx", "args": ["-y", "mcp-matomo"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides