
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 分