Matomo JS
@mj-kiwi
A modern JavaScript/TypeScript client library for Matomo Analytics.
Overview
What is Matomo JS?
Matomo JS is a Model Context Protocol (MCP) server that bridges AI agents (like large language models) with Matomo Analytics. It exposes Matomo Reporting API functionalities as MCP tools, enabling AI-driven data access. The project is under active development.
How to use Matomo JS?
Install the @mj-kiwi/matomo-mcp-server package (npm/yarn/pnpm) and configure it via environment variables to connect to your Matomo instance. The server provides MCP tools for the modules currently implemented (SitesManager, TagManager, Tour, UserId) and can be integrated into AI agent workflows.
Key features of Matomo JS
- Implements the Model Context Protocol specification
- Provides AI agents with direct access to Matomo data
- Easy configuration via environment variables
- Modular design mirroring the Matomo API structure
- Currently implements 4 of 47 API modules (8.5%)
- Part of a TypeScript Nx monorepo with tree-shakable design
Use cases of Matomo JS
- AI assistants querying site analytics data on demand
- Automated reporting using natural language interactions
- Integrating Matomo metrics into chatbot or copilot experiences
- Enabling non-technical users to retrieve analytics via conversation
FAQ from Matomo JS
What is the current project status?
The project is still under construction. APIs may change in the future; use with caution in production environments.
What Node.js version is required?
Node.js v18 or later is recommended.
How many Matomo API modules are currently implemented?
4 of 47 modules (8.5%): SitesManager, TagManager, Tour, and UserId.
Is the MCP server ready for production?
No. The README advises using the project with caution in production as it is under construction.
What configuration is needed to use the MCP server?
Configuration is done via environment variables. The exact variables are not detailed in the README, but they are expected to include your Matomo base URL and authentication key.