How to Use the Matomo Alternative MCP in LangChain
Get your LangChain agent tracking site analytics. Build chains that report on user behavior and campaign performance automatically.
Works with every AI agent you already use
…and any MCP-compatible client
Connect Matomo Alternative MCP to LangChain
Create your Vinkius account to connect Matomo Alternative to LangChain and route execution through our secure gateway. The platform manages server hosting, runtime updates, and security layers. Configuration requires no manual server provisioning.
Chain Tracking and Reporting
Your agent can now track user activity with precision. Use `track_action` to fire off a single conversion event the moment it happens, or queue up interactions and send them all at once with `track_bulk` to reduce network chatter. This isn't just fire-and-forget; it's the first link in your chain. After tracking, your agent can immediately confirm the results. The next step in the chain could be a call to `get_visits_summary` to check if the new visit or action count is reflected. This creates a closed loop where your agent acts, then verifies, all in one sequence.
Generate Reports On-the-Fly
Pull detailed analytics right into your agent's context. A call to `get_processed_report` gives your agent the raw numbers—visits, bounce rates, conversion details—for a specific period. It can parse this data to decide what to do next, like flagging a drop in traffic. Your agent can also create visuals. Use `get_image_graph` to generate a PNG of a traffic trend graph. That binary data can be saved to a file, passed to another tool, or embedded in a report, turning abstract numbers into something a human can actually see.
Adaptive Analytics with this MCP Server
Your agent doesn't need to have every report hard-coded. Start a chain with `get_report_metadata` and your agent gets a full list of all available reporting functions directly from your Matomo instance. It's a dynamic way for your agent to discover its own capabilities. This lets you build agents that adapt. If a new custom report is added to Matomo, the agent sees it on the next run and can use it without you changing any code. It makes your analytics chains more resilient and less brittle. This MCP server handles the connection.
Set up Matomo Alternative MCP in LangChain
Prerequisites
- Python 3.10+ installed
-
langchain-mcp-adapters+langgraphpackages - Active Vinkius subscription with a valid endpoint token
- 1
Install dependencies
Run
pip install langchain-mcp-adapters langgraph langchain-openai. The MCP adapters package converts MCP tools into native LangChainBaseToolobjects. - 2
Connect via HTTP transport
Use
MultiServerMCPClientwith"transport": "http"pointing to your Vinkius endpoint. Replace[YOUR_TOKEN_HERE]with your token from cloud.vinkius.com. - 3
Create a ReAct agent
Pass the discovered tools to
create_react_agent()from LangGraph. The agent automatically routes Matomo Alternative tool calls through the MCP protocol. - 4
Run with any LLM
Swap
ChatOpenAIforChatAnthropic,ChatGoogleGenerativeAI, or any LangChain-compatible model. The MCP tools work identically across all providers.
from langchain_mcp_adapters.client import MultiServerMCPClient
from langgraph.prebuilt import create_react_agent
from langchain_openai import ChatOpenAI
async with MultiServerMCPClient({
"matomo-alternative-mcp": {
"transport": "http",
"url": "https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp",
}
}) as client:
tools = client.get_tools()
agent = create_react_agent(
ChatOpenAI(model="gpt-4o"),
tools,
)
result = await agent.ainvoke({
"messages": "List recent Matomo Alternative transactions"
})
print(result["messages"][-1].content) 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 Alternative MCP in LangChain
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the Matomo Alternative MCP today
We host it, we monitor it, we maintain it. You just paste one token.