Curated read-only Matomo Analytics tools: traffic, pages, referrers, e-commerce, real-time & more.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
Talk to your Matomo Analytics. From Claude, Cursor, VS Code, or any MCP client.
14 curated, read-only analytics tools + a full-API escape hatch. Single binary, instant startup, context-friendly.
Quickstart Β· Clients Β· Tools Β· Configuration Β· FAQ
Every question your Matomo dashboard can answer, your AI assistant can now answer too β including follow-ups, comparisons, and "why?".
| π― Curated, not generated | 14 hand-crafted tools modeled on real analytics questions β not 70+ auto-generated API mirrors that flood the model's context and degrade tool selection. |
| β‘ Instant startup | No introspection round-trips. One static binary, no Node, no Python, no runtime. Starts in milliseconds. |
| π Safe by default | Read-only reporting tools. Token sent via POST only (never in URLs/logs), redacted from every error. TLS verification on by default. |
| π§ Context-friendly | Row limits on every report and a hard response budget with actionable guidance β one tool call can never blow up the context window. |
| π‘ Real-time included | Live visitor counters and a visit log (matomo_realtime) β see what's happening right now. |
| π§° Never a cage | matomo_api reaches any Reporting API method (funnels, heatmaps, custom dimensions, β¦) when the curated tools don't cover it. |
| π Resilient | Automatic retries with backoff on 429/5xx/network hiccups. Helpful, hint-annotated error messages the model can act on. |
Prebuilt binary (Linux, macOS, Windows) β grab it from Releases, or:
Matomo β Settings (β) β Personal β Security β Auth tokens β Create new token. View-only permissions are all it needs.
Add to claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\):
.cursor/mcp.json (project) or ~/.cursor/mcp.json (global):
.vscode/mcp.json:
Any client that speaks MCP over stdio works with the generic shape:
[!TIP] Set
MATOMO_DEFAULT_SITE_IDand the model never has to ask which site you mean. No token at hand? Try it against the public demo:--url https://demo.matomo.cloud --default-site-id 1(no token needed).
| Tool | Answers questions like |
|---|---|
matomo_list_sites | "Which sites do we track?" |
matomo_visits_summary | "How much traffic did we get last week?" |
matomo_pages | "What are our top pages? Where do people exit?" |
matomo_referrers | "Where do visitors come from? Which campaigns work? What do AI assistants send us?" |
matomo_events | "How often was the configurator opened?" |
matomo_goals | "What's our conversion rate per goal?" |
matomo_ecommerce | "Revenue this month? Best-selling products?" |
matomo_geo | "Which countries/cities do visitors come from?" |
matomo_devices | "Mobile vs. desktop? Which browsers?" |
matomo_visit_times | "When during the day/week do people visit?" |
matomo_site_search | "What do people search for on our site β and find nothing?" |
matomo_realtime | "Who's on the site right now?" |
matomo_page_performance | "Which pages load slowly?" |
matomo_api | Everything else β funnels, heatmaps, custom dimensions, any Module.action of the Reporting API |
All tools accept site_id, period (day/week/month/year/range), date
(today, yesterday, 2026-07-01, last30, or start,end ranges), an optional
segment (e.g. deviceType==mobile;country==DE), and a row limit.
| Flag | Env | Default | Description |
|---|---|---|---|
--url | MATOMO_URL | β (required) | Matomo instance URL (sub-directory installs like https://example.com/matomo/ work) |
--token | MATOMO_TOKEN | β | API token (token_auth), view access is enough |
--default-site-id | MATOMO_DEFAULT_SITE_ID | β | Site used when the model doesn't specify one |
--header | MATOMO_EXTRA_HEADERS | β | Extra HTTP headers (Name:Value, repeatable / comma-separated) β for auth proxies, Zero-Trust, multi-tenant setups |
--timeout-secs | MATOMO_TIMEOUT_SECS | 30 | Per-request timeout |
--max-response-chars | MATOMO_MAX_RESPONSE_CHARS | 50000 | Response budget before truncation |
--insecure | MATOMO_INSECURE | false | Accept self-signed TLS certificates (explicit opt-in) |
--check | β | β | Verify URL + token + site access, then exit |
FGRibreau/mcp-matomo?mcp-matomo (which inspired this project β thanks! π) introspects your Matomo instance at startup and generates one MCP tool per API method. matomo-mcp takes the opposite approach:
| matomo-mcp | mcp-matomo | |
|---|---|---|
| Tool set | 14 curated tools + escape hatch | ~70+ generated tools |
| Model context cost | Small, stable | Large, instance-dependent |
| Parameter types | Exact, hand-written enums/defaults | Inferred from parameter names |
| Startup | Instant (no network I/O) | Introspection round-trips (or cached spec file) |
| TLS verification | On by default | Disabled for introspection |
| Sub-directory installs | β | Path is overwritten |
| Response size guard | Row limits + hard budget | β |
| Retries on transient errors | β | β |
| Real-time (Live) tools | β | β (not part of report metadata) |
If you want every API method as its own tool, use mcp-matomo. If you want the model to reliably pick the right tool and never flood its context, use matomo-mcp.
Either pass --default-site-id 1 (recommended) or let the model call matomo_list_sites first.
Run matomo-mcp --url ... --token ... --check. If it fails: regenerate the token (Settings β Personal β Security), make sure it has at least view access to the site.
MATOMO_URL must point at the Matomo root β the folder containing index.php. For https://example.com/matomo/index.php, use https://example.com/matomo/.
Inject the bypass headers: --header "CF-Access-Client-Id:..." --header "CF-Access-Client-Secret:..." (or via MATOMO_EXTRA_HEADERS).
That's the context guard doing its job. Ask for fewer rows, a shorter date range, or raise --max-response-chars.
matomo_annotations β read & correlate deploy markers with trafficWant one of these sooner? Open an issue β or a PR, see CONTRIBUTING.md.
Architecture and design decisions: docs/ARCHITECTURE.md.
MIT. Not affiliated with or endorsed by Matomo β Matomo is a registered trademark of InnoCraft Ltd.
Built with rmcp, the official Rust MCP SDK. Inspired by FGRibreau/mcp-matomo.
mcp-name: io.github.Liohtml/matomo-mcpIf matomo-mcp saves you a dashboard visit, a β helps others find it.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/matomo-analytics)<a href="https://allmcps.com/mcp/matomo-analytics"><img src="https://allmcps.com/api/badge/matomo-analytics?style=directory" alt="Matomo Analytics on AllMCPs" /></a>