Before integrating the MCP Server with the ChatGPT web version, review the Security considerations and Privacy and regulatory sections. The MCP allows external AI systems to access analytics data from your Matomo instance. You must ensure that appropriate authentication, data access controls, and privacy safeguards are in place before allowing an AI tool to query your analytics data.

This guide explains how to connect Matomo to ChatGPT on the web. To use other OpenAI tools, see the guide on integrating with the OpenAI desktop app and Codex CLI.

Before you start

  1. Ensure the Matomo MCP server is enabled.
  2. For Matomo On-Premise:
  3. To connect Matomo to ChatGPT, you will need the following to configure the integration:
    • Access to a ChatGPT account with developer mode enabled to create a custom MCP server plugin.
    • Create an OAuth 2.0 client during setup.
    • Copy your Matomo MCP endpoint URL found in Administration admin gear icon > System > General settings > MCP Server.

Create a custom MCP server

  1. Open ChatGPT in your browser and go to Plugins (https://chatgpt.com/plugins).
  2. Click Add and select Add custom MCP server.
    add plugin in chatgpt
  3. Name the plugin, for example Matomo MCP and an optional Description.
  4. For the Connection, select Server URL and paste your MCP Endpoint URL: https://mysite.com/index.php?module=API&method=McpServer.mcp&format=mcp
  5. Select the Authentication as OAuth.
  6. Click Advanced OAuth settings to provide authentication details.
  7. Use the default Registration method: User-Defined OAuth Client.
  8. Copy the Callback URL provided by ChatGPT.
  9. During this process, you will need to setup the OAuth 2.0 client in Matomo while keeping your ChatGPT MCP setup window open.
  10. Open a new browser tab and go to your Matomo instance to create the OAuth client and provide the ChatGPT Callback URL in the Redirect URIs.
    oauth client in matomo
  11. Click Save and the Client ID will be displayed. If the client is created as a Confidential type, it will display the Client secret.
  12. Copy the client credentials and return to the ChatGPT browser tab.
  13. In ChatGPT Web, paste the client credentials in the OAuth client ID field and the OAuth client secret (for Confidential OAuth clients).
  14. The Token endpoint auth method will default to none if no client secret is required.
  15. The Default scopes are applied based on the OAuth client settings in Matomo.
  16. Review the warning and if you choose to continue, select the consent box.
  17. Click Create as a plugin.
    create mcp plugin
  18. Once created, you will be prompted to open the new plugin.
    chatgpt mcp access
  19. Click Allow to continue.
  20. The Matomo MCP will now be visible in your ChatGPT workspace > Plugins. You can select it within ChatGPT when starting a conversation.

Enable the Matomo MCP for your organisation

You can optionally make the MCP available to others in your organisation once it has been created.

Open Plugins and next to the custom MCP server, click the ellipsis (three dots) menu (⋯) and select Share.
share mcp plugin

Refresh tools list

When using the Matomo MCP integration in ChatGPT, it’s important to be aware of how tool updates are handled in ChatGPT. If Matomo exposes new MCP tools (capabilities), these may not automatically appear in your existing configuration. You can manually trigger a refresh of the tool list by using the Refresh tools option.

Open Plugins > View details > Manage app and click Refresh tools.
refresh tools in mcp plugin

ChatGPT will use the MCP connection to query your Matomo data and respond with insights based on your analytics. Learn more about ways to use the MCP Server.

To integrate Matomo MCP with other AI tools, view the available MCP guides.

Previous FAQ: Integrate the Matomo MCP Server with OpenAI Desktop App and Codex CLI