integrations tools matomo

    Matomo MCP for your AI agent

    Cogny's Matomo integration exposes 26 tools (17 read, 6 write, 3 destructive) to an AI agent over MCP. The same tools are available on every plan, from your own AI client or inside the Cogny app.

    • 17readonly reads data.
    • 6writecreates or changes something.
    • 3destructivedeletes, removes or replaces something.

    Over MCP your own AI client asks before it runs a write. To take a tool away from your agent, block it in Settings → Integrations. Plans, approvals and limits

    set it up.

    Add Cogny to your AI client once, then connect Matomo in Cogny. Every Matomo tool below appears in the client.

    • Claude CodeRun claude mcp add --transport http cogny https://app.cogny.com/mcp, then authorise in the browser.
    • Claude.aiSettings → Connectors → Add custom connector, URL https://app.cogny.com/mcp, then log in and pick your workspace.
    • ChatGPTSettings → Apps → Advanced settings → Developer mode → Create app, URL https://app.cogny.com/mcp, authentication OAuth.
    • CursorIn Cogny, Settings → Data & Integrations → Connect AI Clients shows the block to paste into .mcp.json, with an API key.
    • CodexRun codex mcp add cogny --url https://app.cogny.com/mcp.

    Full setup, and how to undo it

    Notes

    Matomo connects with an auth token and the URL of your Matomo, either Matomo Cloud or one you host yourself. The token has the permissions of the Matomo user who created it. View access is enough for every report. create_goal, update_goal and delete_goal need Write or Admin access on the site.

    Reports return 100 rows by default and at most 1,000 per call.

    The Tag Manager tools read containers, their versions, and the tags, triggers and variables in a version: what is published to the live site (the default), the unpublished draft, or any saved version. They need the Tag Manager plugin to be active, which it is on Matomo Cloud and by default on Matomo 4 and later, and View access on the site, or more if an admin has restricted Tag Manager access.

    Known gaps

    • There is no fully read-only token. With Matomo's default settings a user with View access can still add annotations and save segments of their own, so create_annotation and create_segment work with a View-only token. Keep the write tools set to ask first.
    • A self-hosted Matomo has to be reachable from the internet over https. One that is only available inside a private network or over plain http cannot be connected.
    • Tag Manager is read-only: tags, triggers, variables and containers cannot be created, edited or published, and preview/debug mode cannot be turned on.
    • Only variables someone created are listed, not Matomo's built-in ones (Page URL, Click Text and the like).
    • No tools for the visitor log, ecommerce item reports, funnels, heatmaps, session recordings or A/B tests.
    • No tools for adding or editing websites or users.
    • A new goal counts conversions from the moment it is created. Matomo does not apply it to past visits.

    what each tool does.

    Read 17 · only reads data

    • get_server_infoReadCheck the connection and report the Matomo version and how many sites the token can see.
    • list_sitesReadList the websites this Matomo token can see, with their site ids.
    • get_visits_summaryReadGet the headline traffic numbers for a site: visits, unique visitors, actions, bounce rate and time on site.
    • get_page_urlsReadGet page performance for a site: pageviews, unique pageviews, entries, exits, bounce rate and time per page URL.
    • get_referrersReadGet where a site's visits came from: channels, referring websites, search engines, keywords, campaigns, social networks or AI assistants.
    • get_countriesReadGet a site's visits, actions and conversions per visitor country.
    • get_device_typesReadGet a site's visits, actions and conversions per device type (desktop, smartphone, tablet and so on).
    • get_eventsReadGet a site's tracked events with their counts and values, grouped by event category, action or name.
    • get_goal_conversionsReadGet goal conversions, conversion rate and revenue for a site, for all goals together or one goal.
    • list_goalsReadList the goals defined for a site, with what each one matches on.
    • list_annotationsReadList the annotations on a site's reporting timeline, optionally for one date or period.
    • list_segmentsReadList the saved segments the token's user can see, with their definitions.
    • list_tag_manager_containersReadList a site's Matomo Tag Manager containers, with their draft and which version is published to each environment.
    • list_tag_manager_versionsReadList the saved versions of a Matomo Tag Manager container and the environments each one is published to.
    • list_tag_manager_tagsReadList the tags in a Matomo Tag Manager container, with their settings and the triggers that fire and block them.
    • list_tag_manager_triggersReadList the triggers in a Matomo Tag Manager container, with the conditions under which each one fires.
    • list_tag_manager_variablesReadList the variables defined in a Matomo Tag Manager container, such as the Matomo configuration and data-layer values.

    Write 6 · creates or changes something

    • create_annotationWriteCreate an annotation on a site's reporting timeline for a given date.
    • update_annotationWriteUpdate the date, text or star of an existing annotation.
    • create_goalWriteCreate a goal on a site that counts a conversion when a visit matches a URL, page title, download, outlink or event.
    • update_goalWriteUpdate an existing goal's name, match rule, revenue or description.
    • create_segmentWriteCreate a saved segment that reports can then be filtered by.
    • update_segmentWriteUpdate a saved segment's name, definition, site or sharing.

    Destructive 3 · deletes, removes or replaces something

    • delete_annotationDestructiveDelete an annotation from a site's reporting timeline.
    • delete_goalDestructiveDelete a goal from a site, which also removes its conversion reports.
    • delete_segmentDestructiveDelete a saved segment.

    Exact input schemas come from tools/list once Matomo is connected; the free plan is enough to check. Missing something? Your agent can ask for it with request_feature.