4,500+ servers built on MCP Fusion
Vinkius
Matomo logo
Vinkius
Mastra AI logo

How to Use the Matomo MCP in Mastra AI

Build reliable, multi-step traffic analysis workflows in Mastra AI using direct Matomo integration.

See Vinkius in Action

Works with every AI agent you already use

…and any MCP-compatible client

Matomo MCP on Cursor AI Code Editor MCP Client Matomo MCP on Claude Desktop App MCP Integration Matomo MCP on OpenAI Agents SDK MCP Compatible Matomo MCP on Visual Studio Code MCP Extension Client Matomo MCP on GitHub Copilot AI Agent MCP Integration Matomo MCP on Google Gemini AI MCP Integration Matomo MCP on Lovable AI Development MCP Client Matomo MCP on Mistral AI Agents MCP Compatible Matomo MCP on Amazon AWS Bedrock MCP Support
MCP Servers - Free for Subscribers
Mastra AI

Connect Matomo MCP to Mastra AI

Create your Vinkius account to connect Matomo to Mastra AI and route execution through our secure gateway. The platform manages server hosting, runtime updates, and security layers. Configuration requires no manual server provisioning.

GDPR Free for Subscribers

Automated Metric Branching

`get_visits_summary` and `get_site_details` give your Mastra AI workflows the baseline metrics they need to trigger conditional logic. Your workflow pulls the daily summary and decides whether to alert the marketing team or keep quiet. Mastra handles the retries automatically. If the analytics database drops the connection, the framework applies exponential backoff until the query succeeds. You never drop a daily report due to a timeout.

Attribution Pipeline Automation

`get_top_pages` and `get_top_referrers` feed your automated attribution pipelines. The agent grabs the highest performing content and maps it against inbound traffic sources. You define these operations inside a structured agent workflow utilizing this MCP server. If the traffic from a specific referrer drops below a threshold, the script branches off to investigate the specific URLs.

Live Visitor Profiling in Mastra AI

`get_live_last_visits` and `get_visitor_profile` let your workflows react to user behavior as it happens. When a high-value customer hits a specific page, the system pulls their history instantly. You spread these tools into your Agent configuration using `mcpClient.listTools()`. If you need human oversight before acting on a VIP visitor alert, you just enable `requireToolApproval` on the specific tool.

Setup guide

Set up Matomo MCP in Mastra AI

Prerequisites

  • Node.js 18+ and a TypeScript project
  • @mastra/mcp + @mastra/core packages
  • Active Vinkius subscription with a valid endpoint token
  1. 1

    Install dependencies

    Run npm install @mastra/mcp @mastra/core plus your preferred model provider (e.g. @ai-sdk/openai).

  2. 2

    Configure the MCPClient

    Create an MCPClient with your Vinkius endpoint as a URL object. Replace [YOUR_TOKEN_HERE] with your token from cloud.vinkius.com.

  3. 3

    Discover and inject tools

    Call mcpClient.listTools() and spread the result into your agent's tools object. All Matomo tools become native Mastra tools.

  4. 4

    Run with any model

    Swap openai("gpt-4o") for any AI SDK-compatible provider. Call agent.generate() and the agent routes tool calls through MCP automatically.

agent.ts
import { MCPClient } from "@mastra/mcp";
import { Agent } from "@mastra/core/agent";
import { openai } from "@ai-sdk/openai";

const mcpClient = new MCPClient({
  id: "matomo-mcp-client",
  servers: {
    "matomo-mcp": {
      url: new URL(
        "https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp"
      ),
    },
  },
});

const agent = new Agent({
  name: "Matomo Agent",
  model: openai("gpt-4o"),
  instructions: "You have access to Matomo tools.",
  tools: {
    ...(await mcpClient.listTools()),
  },
});

const result = await agent.generate(
  "List recent Matomo transactions"
);
console.log(result.text);

Independent Platform Disclaimer: Vinkius is an independent platform and is not affiliated with, endorsed by, sponsored by, verified by, or otherwise authorized by Matomo. All third-party trademarks, logos, and brand names are the property of their respective owners. Their use on this website is strictly for informational purposes to identify service compatibility and interoperability.

Why Choose Vinkius

Vinkius connects your tools to AI with real-time monitoring and automatic cost savings — all from one dashboard.

Real-time monitoring

Live

visibility into every interaction

Connect your favorite tools to your AI and see exactly what's happening — every request, every response, in real time.

Built-in savings

60%

lower AI costs

Vinkius compresses data between your apps and your AI automatically. Lower bills every month — no configuration required.

Single dashboard

One

place for every integration

Every tool your AI connects to, managed from a single screen. One account, complete control.

Common questions about Matomo MCP in Mastra AI

Instantiate an `MCPClient` with your Vinkius server URL in the configuration object. Mastra auto-detects the transport layer and registers the tools.
Mastra wraps every tool call in its workflow engine. If the analytics server hangs, the backoff mechanism kicks in to ensure the pipeline eventually completes.
Yes. You can flag operations like `get_goals` to require manual approval. The workflow pauses until an admin verifies the request.
It calls `list_sites` to grab the available properties. Then it uses `get_site_details` to pull the exact configuration for the target domain before running any queries.
This MCP server handles sensitive behavioral tracking records via `get_visitor_profile`. Vinkius secures this transit using zero-trust authentication, meaning the agent only retains access for the exact millisecond required to execute the tool before the token drops.

Start using the Matomo MCP today

We host it, we monitor it, we maintain it. You just paste one token.

Built & Managed by Vinkius 30s setup 10 tools

We've already built the connector for Matomo. Just plug in your AI agents and start using Vinkius.

No hosting. No infrastructure. No complex setup.
All 10 tools are live and waiting. You're up and running in seconds.

Claude Claude
ChatGPT ChatGPT
Cursor Cursor
Gemini Gemini
Windsurf Windsurf
VS Code VS Code
JetBrains JetBrains
Vercel Vercel
+ other MCP clients

Vinkius gives your AI agents access to the full catalog of app connectors, all fully managed, secure, and enterprise-ready. One subscription, every tool you need.

Zero hosting required Full MCP catalog included Enterprise-grade security Auto-updated by Vinkius

Built, hosted, and secured by Vinkius. You just connect and go.