Matomo MCP Server

Matomo MCP Server

A Model Context Protocol server that provides tools to interact with Matomo Analytics API, enabling management of sites, users, goals, segments, and access to analytics reports through a MCP interface.

Category
Visit Server

Tools

matomo_connect

Kết nối đến Matomo instance với URL và token xác thực

matomo_get_sites

Lấy danh sách tất cả các sites trong Matomo

matomo_get_site

Lấy thông tin chi tiết của một site

matomo_add_site

Thêm một site mới vào Matomo

matomo_get_users

Lấy danh sách tất cả users trong Matomo

matomo_add_user

Thêm một user mới vào Matomo

matomo_get_goals

Lấy danh sách goals của một site

matomo_add_goal

Thêm một goal mới cho site

matomo_get_visits_summary

Lấy tổng quan lượt truy cập của site

matomo_get_top_pages

Lấy danh sách trang được truy cập nhiều nhất

matomo_get_system_info

Lấy thông tin hệ thống Matomo

README

Matomo MCP Server

MCP (Model Context Protocol) server để quản trị Matomo Analytics. Server này cung cấp các công cụ để tương tác với Matomo API thông qua giao diện MCP.

Tính năng

Quản lý Sites

  • Lấy danh sách tất cả sites
  • Lấy thông tin chi tiết của một site
  • Thêm site mới
  • Cập nhật thông tin site
  • Xóa site

Quản lý Users

  • Lấy danh sách tất cả users
  • Lấy thông tin chi tiết của một user
  • Thêm user mới
  • Cập nhật thông tin user
  • Xóa user
  • Thiết lập quyền truy cập cho user

Quản lý Goals

  • Lấy danh sách goals của site
  • Thêm goal mới
  • Cập nhật goal
  • Xóa goal

Quản lý Segments

  • Lấy danh sách segments
  • Thêm segment mới
  • Cập nhật segment
  • Xóa segment

Báo cáo Analytics

  • Tổng quan lượt truy cập
  • Top pages được truy cập nhiều nhất
  • Top keywords
  • Top referrers
  • Visitor log

Quản lý Hệ thống

  • Thông tin hệ thống
  • Quản lý plugins
  • Kích hoạt/vô hiệu hóa plugins

Cài đặt

  1. Clone repository:
git clone <repository-url>
cd matomo-mcp
  1. Cài đặt dependencies:
npm install
  1. Build project:
npm run build

Cấu hình

Tạo file .env trong thư mục gốc:

MATOMO_BASE_URL=https://your-matomo-instance.com
MATOMO_TOKEN_AUTH=your-api-token

Sử dụng

Chạy server:

npm start

Chạy trong chế độ development:

npm run dev

Các Tools có sẵn

1. matomo_connect

Kết nối đến Matomo instance.

Tham số:

  • baseUrl: URL của Matomo instance
  • tokenAuth: Token xác thực API

2. matomo_get_sites

Lấy danh sách tất cả sites.

3. matomo_get_site

Lấy thông tin chi tiết của một site.

Tham số:

  • siteId: ID của site

4. matomo_add_site

Thêm site mới.

Tham số:

  • name: Tên site
  • urls: Danh sách URLs
  • timezone: Múi giờ (tùy chọn, mặc định: UTC)

5. matomo_get_users

Lấy danh sách tất cả users.

6. matomo_add_user

Thêm user mới.

Tham số:

  • userLogin: Tên đăng nhập
  • email: Email
  • password: Mật khẩu
  • alias: Bí danh (tùy chọn)

7. matomo_get_goals

Lấy danh sách goals của site.

Tham số:

  • siteId: ID của site

8. matomo_add_goal

Thêm goal mới.

Tham số:

  • siteId: ID của site
  • name: Tên goal
  • description: Mô tả
  • matchAttribute: Thuộc tính khớp
  • pattern: Mẫu khớp
  • patternType: Loại mẫu

9. matomo_get_visits_summary

Lấy tổng quan lượt truy cập.

Tham số:

  • siteId: ID của site
  • date: Ngày (YYYY-MM-DD)
  • period: Chu kỳ (day, week, month, year)

10. matomo_get_top_pages

Lấy top pages.

Tham số:

  • siteId: ID của site
  • date: Ngày (YYYY-MM-DD)
  • period: Chu kỳ (tùy chọn)
  • limit: Số lượng kết quả (tùy chọn)

11. matomo_get_system_info

Lấy thông tin hệ thống.

Ví dụ sử dụng

Kết nối đến Matomo:

{
  "name": "matomo_connect",
  "arguments": {
    "baseUrl": "https://analytics.example.com",
    "tokenAuth": "your-api-token"
  }
}

Lấy danh sách sites:

{
  "name": "matomo_get_sites",
  "arguments": {}
}

Thêm site mới:

{
  "name": "matomo_add_site",
  "arguments": {
    "name": "My Website",
    "urls": ["https://example.com", "https://www.example.com"],
    "timezone": "Asia/Ho_Chi_Minh"
  }
}

Lưu ý

  • Đảm bảo bạn có quyền truy cập API với token xác thực hợp lệ
  • Một số chức năng có thể yêu cầu quyền admin
  • Luôn kiểm tra kết nối trước khi sử dụng các tools khác

Đóng góp

Mọi đóng góp đều được chào đón! Vui lòng tạo issue hoặc pull request.

License

MIT License

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured