
Matomo Analytics
io.github.LiohtmlPublished by GitHub account Liohtmlv0.1.4Updated Oct 24, 2026
Curated read-only Matomo Analytics tools: traffic, pages, referrers, e-commerce, real-time & more.
Overview
A local MCP server that gives an AI assistant read-only access to Matomo Analytics reports: traffic, pages, referrers, e-commerce, goals and real-time visitors.
- What you can do
- List tracked sites and pull traffic summaries for a chosen period and date range, with optional segments and row limits. Break down pages, entry and exit pages, referrers and campaigns, events, goals and e-commerce revenue and products. Inspect visitor geography, devices and browsers, visit times, site search terms and page performance. Show real-time visitor counters and the live visit log, and read annotations tied to traffic changes. Call any Matomo Reporting API method through a generic escape-hatch tool for funnels, heatmaps or custom dimensions.
- When to use it
- Useful when you want an assistant to answer analytics questions from a Matomo instance in conversation, such as comparing traffic periods, finding top landing pages or checking live visitors, without building dashboards or queries by hand.
- Requirements
- Runs as a local process: a prebuilt binary, cargo install, or the Docker image. Needs MATOMO_URL pointing at the Matomo root and a MATOMO_TOKEN API token with at least view access; MATOMO_DEFAULT_SITE_ID is optional. Network access to the Matomo instance is required.
Installation
In SourceWeft
- Open Matomo Analytics in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
matomo-mcp
Talk to your Matomo Analytics. From Claude, Cursor, VS Code, or any MCP client.
[CI] [Crates.io] [License: MIT] [Rust] [MCP]
15 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?".
✨ Why matomo-mcp?
🚀 Quickstart
1. Install
Prebuilt binary (Linux, macOS, Windows) — grab it from Releases, or:
2. Get a Matomo API token
Matomo → Settings (⚙) → Personal → Security → Auth tokens → Create new token. View-only permissions are all it needs.
3. Verify the connection
4. Connect your client ⬇
🔌 Connect your client
Claude Code
Claude Desktop
Add to claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\):
Cursor
.cursor/mcp.json (project) or ~/.cursor/mcp.json (global):
VS Code (GitHub Copilot)
.vscode/mcp.json:
Windsurf / Zed / other MCP clients
Any client that speaks MCP over stdio works with the generic shape:
Docker (any client)
Streamable HTTP — host once, connect many clients
Run the server once (on a workstation, LAN box, or container) and point any number of MCP clients at it:
Clients connect to http://127.0.0.1:8080/mcp with the streamable HTTP
transport, e.g.:
[!WARNING] The HTTP endpoint has no built-in authentication. Keep it bound to
127.0.0.1, or put a reverse proxy with auth (or a firewall) in front before exposing it beyond localhost.
[!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).
🧭 Tools
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.
Prompts to try
- "Compare this week's traffic with last week — what changed and why?"
- "Top 10 landing pages by conversions this month, with bounce rates."
- "Are we getting traffic from ChatGPT or Perplexity? Trend over 3 months."
- "Which internal searches return no results? Suggest content we should create."
- "Anything unusual in the visitor log right now?"
⚙️ Configuration
🆚 How is this different from 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:
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.
🩺 Troubleshooting
"site_id is required"
Either pass --default-site-id 1 (recommended) or let the model call matomo_list_sites first.
401 / "cannot be authenticated"
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.
404 or HTML instead of JSON
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/.
Behind Cloudflare Access / OAuth2 proxy / Zero Trust?
Inject the bypass headers: --header "CF-Access-Client-Id:..." --header "CF-Access-Client-Secret:..." (or via MATOMO_EXTRA_HEADERS).
Responses feel truncated
That's the context guard doing its job. Ask for fewer rows, a shorter date range, or raise --max-response-chars.
🗺️ Roadmap
- Streamable HTTP transport (
--http, host it once, connect many clients) -
matomo_annotations— read & correlate deploy markers with traffic - Multi-instance support (one server, several Matomo installations)
- Homebrew tap & winget manifest
- MCP registry listing (official registry via
server.json, Glama)
Want one of these sooner? Open an issue — or a PR, see CONTRIBUTING.md.
🛠️ Development
Architecture and design decisions: docs/ARCHITECTURE.md.
📄 License & Credits
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 Registry name:
mcp-name: io.github.Liohtml/matomo-mcp
If matomo-mcp saves you a dashboard visit, a ⭐ helps others find it.
Source: README.md at commit 2be7efb
Tools
0Version history
2- v0.1.4LatestOct 15, 2026
- v0.1.3Sep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts