
Matomo Analytics
io.github.Liohtml由 GitHub 账号 Liohtml 发布v0.1.4更新于 Oct 24, 2026
Curated read-only Matomo Analytics tools: traffic, pages, referrers, e-commerce, real-time & more.
概览
本地运行的 MCP 服务器,让 AI 助手以只读方式查询 Matomo Analytics 报告:流量、页面、来源、电商、目标与实时访客。
- 可以做什么
- 列出被跟踪的站点,并按周期和日期范围获取流量汇总,可加分段与行数限制。细分页面、入口与退出页、来源与广告系列、事件、目标以及电商收入与商品。查看访客地理位置、设备与浏览器、访问时段、站内搜索词和页面性能。显示实时访客计数与访问日志,并读取与流量变化相关的注释。通过通用工具调用任意 Matomo Reporting API 方法,例如漏斗、热图或自定义维度。
- 适用场景
- 适合希望助手在对话中直接回答 Matomo 分析问题的场景,例如对比不同时段的流量、找出主要落地页或查看当前在线访客,而无需手工搭建仪表板或编写查询。
- 运行要求
- 以本地进程运行:预编译二进制、cargo 安装或 Docker 镜像。需要 MATOMO_URL 指向 Matomo 根路径,以及至少具备查看权限的 MATOMO_TOKEN API 令牌;MATOMO_DEFAULT_SITE_ID 可选。需要能访问 Matomo 实例的网络。
安装
在 SourceWeft 中
- 打开 控制台中的 Matomo Analytics,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
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.
来源:README.md,提交 2be7efb
工具
0版本历史
2- v0.1.4最新Oct 15, 2026
- v0.1.3Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分